Skip to content

mike-shmatov/tiny-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny/Sql

About

Currently package has single useful component with functionality to split string with multiple SQL statements into array of separate statements. Being developed mostly as helper for Tiny/DbUnit project.

Example

$inputString = 'CREATE TABLE tbl (col TEXT); INSERT INTO tbl (col) VALUES ("one;");';
$splitter = Tiny\Sql\Parsers\StatementsSplitter::make();
$statements = $splitter->parse($inputString);
foreach($statements as $statement){
    print $statement."\n";
}
// CREATE TABLE tbl (col TEXT ) ;
// INSERT INTO tbl ( col ) VALUES ( "one;" ) ;

Installing

composer require tiny/sql

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages