BufferedQuery
class BufferedQuery (View source)
Buffer query utilities.
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.
Constants
STATUS_STRING |
|
STATUS_STRING_SINGLE_QUOTES |
|
STATUS_STRING_DOUBLE_QUOTES |
|
STATUS_STRING_BACKTICK |
|
STATUS_COMMENT |
|
STATUS_COMMENT_BASH |
|
STATUS_COMMENT_C |
|
STATUS_COMMENT_SQL |
|
Properties
string | $query | The query that is being processed. |
|
array<string,bool|string> | $options | The options of this parser. |
|
string | $delimiter | The last delimiter used. |
|
int | $delimiterLen | The length of the delimiter. |
|
int|null | $status | The current status of the parser. |
|
string | $current | The last incomplete query that was extracted. |
Methods
__construct(string $query = '', array $options = [])
No description
void
setDelimiter(string $delimiter)
Sets the delimiter.
string|false
extract(bool $end = false)
Extracts a statement from the buffer.
Details
__construct(string $query = '', array $options = [])
No description
void
setDelimiter(string $delimiter)
Sets the delimiter.
Used to update the length of it too.
string|false
extract(bool $end = false)
Extracts a statement from the buffer.