DefaultPDOQuerySplitter

Extends \PDOQuerySplitter

Splits SQL source into queries using simple regular expressions

Extracted from PDOSQLExecTask::runStatements()

author

Hans Lellelid [email protected]

author

Alexey Borzov [email protected]

package

phing.tasks.ext.pdo

version

$Id: 563de4c6ee3205957b431776847204ef6fb139a9 $

Methods

Constructor, sets the parent task and reader with SQL source

__construct(\PDOSQLExecTask $parent, \Reader $reader) 
inherited

Arguments

$parent

\PDOSQLExecTask

$reader

\Reader

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

nextQuery() : string|null
inherited abstract

Response

string|null

Properties

Delimiter type, one of PDOSQLExecTask::DELIM_ROW or PDOSQLExecTask::DELIM_NORMAL

delimiterType : string
var

Type(s)

string

Leftover SQL from previous line

sqlBacklog : string
var

Type(s)

string

Task that uses the splitter

parent : \PDOSQLExecTask
inherited
var

Type(s)

\PDOSQLExecTask

Reader with SQL source

sqlReader : \BufferedReader
inherited
var

Type(s)

\BufferedReader