Overview

Namespaces

  • Neevo
    • Cache
    • Drivers
    • Nette
  • PHP

Classes

  • BaseStatement
  • Connection
  • Literal
  • Loader
  • Manager
  • Parser
  • Result
  • ResultIterator
  • Row
  • Statement

Interfaces

  • ICache
  • IDriver
  • IObservable
  • IObserver

Exceptions

  • DriverException
  • ImplementationException
  • NeevoException
  • Overview
  • Namespace
  • Class
  • Tree

Class Parser

Neevo\BaseStatement to SQL command parser.

Direct known subclasses

Neevo\Drivers\MySQLDriver, Neevo\Drivers\MySQLiDriver, Neevo\Drivers\SQLite2Driver, Neevo\Drivers\SQLite3Driver
Namespace: Neevo
Author: Smasty
Located at Neevo/Parser.php
Methods summary
public
# __construct( Neevo\BaseStatement $statement )

Instantiate the parser for given statement.

Instantiate the parser for given statement.

Parameters

$statement
Neevo\BaseStatement
public string
# parse( )

Parse the given statement.

Parse the given statement.

Returns

string
The SQL statement
protected string
# parseSelectStmt( )

Parse SELECT statement.

Parse SELECT statement.

Returns

string
protected string
# parseInsertStmt( )

Parse INSERT statement.

Parse INSERT statement.

Returns

string
protected string
# parseUpdateStmt( )

Parse UPDATE statement.

Parse UPDATE statement.

Returns

string
protected string
# parseDeleteStmt( )

Parse DELETE statement.

Parse DELETE statement.

Returns

string
protected string
# parseSource( )

Parse statement source.

Parse statement source.

Returns

string
protected string
# parseWhere( )

Parse WHERE clause.

Parse WHERE clause.

Returns

string
protected string
# parseSorting( )

Parse ORDER BY clause.

Parse ORDER BY clause.

Returns

string
protected string
# parseGrouping( )

Parse GROUP BY clause.

Parse GROUP BY clause.

Returns

string
protected string
# parseFieldName( string|array|Neevo\Literal $field, boolean $table = false )

Parse column name.

Parse column name.

Parameters

$field
string|array|Neevo\Literal
$table
boolean
Parse table name.

Returns

string
protected string
# applyLimit( string $sql )

Apply LIMIT/OFFSET to SQL command.

Apply LIMIT/OFFSET to SQL command.

Parameters

$sql
string
SQL command

Returns

string
protected mixed|array
# escapeValue( mixed|array|Traversable $value, string|array|null $type = null )

Escape given value.

Escape given value.

Parameters

$value
mixed|array|Traversable
$type
string|array|null

Returns

mixed|array
protected string
# applyModifiers( string $expr, array $modifiers, array $values )

Apply modifiers to expression.

Apply modifiers to expression.

Parameters

$expr
string
$modifiers
array
$values
array

Returns

string
protected string
# tryDelimite( string|Neevo\Literal $expr )

Try delimite fields in given expression.

Try delimite fields in given expression.

Parameters

$expr
string|Neevo\Literal

Returns

string
Properties summary
protected Neevo\BaseStatement $stmt
#
protected array $clauses array()
#
Neevo Public API API documentation generated by ApiGen 2.6.1