tiny / sql
SQL parsing library
Installs: 17
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/tiny/sql
This package is auto-updated.
Last update: 2025-11-17 00:37:23 UTC
README
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