2017 © Pedro Peláez
 

library sql

SQL parsing library

image

tiny/sql

SQL parsing library

  • Sunday, October 29, 2017
  • by tiny
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 100 % Grown

The README.md

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., (*1)

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

The Versions

29/10 2017

dev-master

9999999-dev

SQL parsing library

  Sources   Download

MIT

by Mike Shmatov

sql php parsing