class PropelSQLParser
Service class for parsing a large SQL string into an array of SQL statements
Methods
setSQL(string $sql)
Sets the inner SQL string for this object. |
||
string |
getSQL()
Gets the inner SQL string for this object. |
|
static integer |
executeString(string $input, PDO $connection)
Execute a list of DDL statements based on a string Does not use transactions since they are not supported in DDL statements |
|
static integer |
executeFile(string $file, PDO $connection)
Execute a list of DDL statements based on the path to the SQL file Does not use transactions since they are not supported in DDL statements |
|
static array |
parseString(string $input)
Explodes a SQL string into an array of SQL statements. |
|
static array |
parseFile($file)
Explodes a SQL file into an array of SQL statements. |
|
convertLineFeedsToUnixStyle()
|
||
stripSQLCommentLines()
|
||
array |
explodeIntoStatements()
Explodes the inner SQL string into statements based on the SQL statement delimiter (;) |
|
string |
getNextStatement()
Gets the next SQL statement in the inner SQL string, and advances the cursor to the end of this statement. |
Details
at line 33
public
setSQL(string $sql)
Sets the inner SQL string for this object.
Also resets the parsing cursor (see getNextStatement)
at line 45
public string
getSQL()
Gets the inner SQL string for this object.
at line 59
static public integer
executeString(string $input, PDO $connection)
Execute a list of DDL statements based on a string Does not use transactions since they are not supported in DDL statements
at line 73
static public integer
executeFile(string $file, PDO $connection)
Execute a list of DDL statements based on the path to the SQL file Does not use transactions since they are not supported in DDL statements
at line 127
static public array
parseString(string $input)
Explodes a SQL string into an array of SQL statements.
at line 158
static public array
parseFile($file)
Explodes a SQL file into an array of SQL statements.
at line 167
public
convertLineFeedsToUnixStyle()
at line 172
public
stripSQLCommentLines()
at line 185
public array
explodeIntoStatements()
Explodes the inner SQL string into statements based on the SQL statement delimiter (;)
at line 202
public string
getNextStatement()
Gets the next SQL statement in the inner SQL string, and advances the cursor to the end of this statement.