PHP Class SqlParser\Utils\BufferedQuery

Implements a specialized lexer used to extract statements from large inputs that are being buffered. After each statement has been extracted, a lexer or a parser may be used. All comments are skipped, with one exception: MySQL commands inside /*!.
Datei anzeigen Open project: phpmyadmin/sql-parser Class Usage Examples

Public Properties

Property Type Description
$current string The last incomplete query that was extracted.
$delimiter string The last delimiter used.
$delimiterLen integer The length of the delimiter.
$options array The options of this parser.
$query string This field can be modified just by appending to it!
$status integer The current status of the parser.

Public Methods

Method Description
__construct ( string $query = '', array $options = [] ) Constructor.
extract ( boolean $end = false ) : string Extracts a statement from the buffer.
setDelimiter ( string $delimiter ) Sets the delimiter.

Method Details

__construct() public method

Constructor.
public __construct ( string $query = '', array $options = [] )
$query string The query to be parsed.
$options array The options of this parser.

extract() public method

Extracts a statement from the buffer.
public extract ( boolean $end = false ) : string
$end boolean Whether the end of the buffer was reached.
return string

setDelimiter() public method

Used to update the length of it too.
public setDelimiter ( string $delimiter )
$delimiter string

Property Details

$current public_oe property

The last incomplete query that was extracted.
public string $current
return string

$delimiter public_oe property

The last delimiter used.
public string $delimiter
return string

$delimiterLen public_oe property

The length of the delimiter.
public int $delimiterLen
return integer

$options public_oe property

The options of this parser.
public array $options
return array

$query public_oe property

This field can be modified just by appending to it!
public string $query
return string

$status public_oe property

The current status of the parser.
public int $status
return integer