PHP Класс 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 /*!.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
__construct ( string $query = '', array $options = [] ) Constructor.
extract ( boolean $end = false ) : string Extracts a statement from the buffer.
setDelimiter ( string $delimiter ) Sets the delimiter.

Описание методов

__construct() публичный Метод

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

extract() публичный Метод

Extracts a statement from the buffer.
public extract ( boolean $end = false ) : string
$end boolean Whether the end of the buffer was reached.
Результат string

setDelimiter() публичный Метод

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

Описание свойств

$current публичное свойство

The last incomplete query that was extracted.
public string $current
Результат string

$delimiter публичное свойство

The last delimiter used.
public string $delimiter
Результат string

$delimiterLen публичное свойство

The length of the delimiter.
public int $delimiterLen
Результат integer

$options публичное свойство

The options of this parser.
public array $options
Результат array

$query публичное свойство

This field can be modified just by appending to it!
public string $query
Результат string

$status публичное свойство

The current status of the parser.
public int $status
Результат integer