Splits SQL source into queries using simple regular expressions

Extracted from PDOSQLExecTask::runStatements()

author Hans Lellelid
author Alexey Borzov
package phing.tasks.ext.pdo
version $Id$

 Methods

Constructor, sets the parent task, reader with SQL source and delimiter type

__construct(\PDOSQLExecTask $parent, \Reader $reader, string $delimiterType) 

Parameters

$parent

\PDOSQLExecTask

$reader

\Reader

$delimiterType

string

Returns next query from SQL source, null if no more queries left

nextQuery() : string | null

In case of "row" delimiter type this searches for strings containing only delimiters. In case of "normal" delimiter type, this uses simple regular expression logic to search for delimiters.

Returns

stringnull

 Properties

 

$parent : \PDOSQLExecTask
Inherited
inherited_from \PDOQuerySplitter::$$parent
 

$sqlReader : \BufferedReader
Inherited
inherited_from \PDOQuerySplitter::$$sqlReader
 

$delimiterType : string
 

$sqlBacklog : string