# classes/phing/tasks/ext/pdo/DefaultPDOQuerySplitter.php

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This software consists of voluntary contributions made by many individuals and is licensed under the LGPL. For more information please see http://phing.info.

package
  phing.tasks.ext.pdo
version
  SVN: $Id: DefaultPDOQuerySplitter.php 1274 2011-08-17 13:38:07Z mrook $

## \DefaultPDOQuerySplitter
jump to top

Splits SQL source into queries using simple regular expressions

Extracted from PDOSQLExecTask::runStatements()

Extends from
  \PDOQuerySplitter
author
  Hans Lellelid
author
  Alexey Borzov
package
  phing.tasks.ext.pdo
version
  $Revision: 1274 $

### Properties

`string $delimiterType= ''`

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

Details

Type
  string

`string $sqlBacklog= ''`

Leftover SQL from previous line

Details

Type
  string

### Methods

`__construct( \PDOSQLExecTask $parent, \Reader $reader, string $delimiterType = PDOSQLExecTask ) :`
Constructor, sets the parent task, reader with SQL source and delimiter type
Parameters

Name | Type | Description
--- | --- | ---
$parent | \PDOSQLExecTask |
$reader | \Reader |
$delimiterType | string |

`nextQuery( ) : string|null`
Returns next query from SQL source, null if no more queries left

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

Type | Description
--- | ---
stringnull |

Documentation was generated by DocBlox 0.13.1.