Neevo Public API
  • Namespace
  • Class
  • Tree

Namespaces

  • Neevo
    • Cache
    • Drivers
    • Nette
  • PHP

Classes

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

Interfaces

  • DriverInterface
  • ObservableInterface
  • ObserverInterface

Exceptions

  • DriverException
  • ImplementationException
  • NeevoException

Class Parser

Neevo\BaseStatement to SQL command parser.

Direct known subclasses

Neevo\Drivers\MySQLDriver, Neevo\Drivers\MySQLiDriver, Neevo\Drivers\PDODriver, Neevo\Drivers\SQLite2Driver, Neevo\Drivers\SQLite3Driver

Namespace: Neevo
Author: Smasty
Located at Neevo/Parser.php

Methods summary

public
# __construct( Neevo\BaseStatement $statement )

Instantiates the parser for given statement.

Instantiates the parser for given statement.

Parameters

$statement
Neevo\BaseStatement
$statement
public string
# parse( )

Parses the given statement.

Parses the given statement.

Returns

string
The SQL statement
protected string
# parseSelectStmt( )

Parses SELECT statement.

Parses SELECT statement.

Returns

string
protected string
# parseInsertStmt( )

Parses INSERT statement.

Parses INSERT statement.

Returns

string
protected string
# parseUpdateStmt( )

Parses UPDATE statement.

Parses UPDATE statement.

Returns

string
protected string
# parseDeleteStmt( )

Parses DELETE statement.

Parses DELETE statement.

Returns

string
protected string
# parseSource( )

Parses statement source.

Parses statement source.

Returns

string
protected string
# parseWhere( )

Parses WHERE clause.

Parses WHERE clause.

Returns

string
protected string
# parseSorting( )

Parses ORDER BY clause.

Parses ORDER BY clause.

Returns

string
protected string
# parseGrouping( )

Parses GROUP BY clause.

Parses GROUP BY clause.

Returns

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

Parses column name.

Parses column name.

Parameters

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

Returns

string
protected string
# applyLimit( string $sql )

Applies LIMIT/OFFSET to SQL command.

Applies LIMIT/OFFSET to SQL command.

Parameters

$sql
string
$sql SQL command

Returns

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

Escapes given value.

Escapes given value.

Parameters

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

Returns

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

Applies modifiers to expression.

Applies modifiers to expression.

Parameters

$expr
string
$expr
$modifiers
array
$modifiers
$values
array
$values

Returns

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

Tries to delimite fields in given expression.

Tries to delimite fields in given expression.

Parameters

$expr
string|Neevo\Literal
$expr

Returns

string

Magic methods summary

Properties summary

protected Neevo\BaseStatement $stmt
#
protected array $clauses
#
Neevo Public API API documentation generated by ApiGen 2.8.0