Overview

Namespaces

  • zsql
  • PHP

Classes

  • Database
  • Delete
  • Expression
  • ExtendedQuery
  • Insert
  • Model
  • Query
  • Result
  • Select
  • Update

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree

Class Query

Base abstract query

Direct known subclasses

zsql\ExtendedQuery, zsql\Insert

Indirect known subclasses

zsql\Delete, zsql\Select, zsql\Update
Abstract
Namespace: zsql
Located at zsql/Query.php
Methods summary
public
# __construct( callable $queryCallback = null )

Constructor

Constructor

Parameters

$queryCallback
callable
$queryCallback
public string
# __toString( )

Magic string conversion. Alias of zsql\Query::toString()

Magic string conversion. Alias of zsql\Query::toString()

Returns

string
abstract protected
# assemble( )

Assemble parts

Assemble parts

protected
# interpolateParams( )

Interpolate parameters into query

Interpolate parameters into query

Throws

zsql\Exception
public zsql\Query
# interpolation( mixed $interpolation = true )

Toggle whether to interpolate parameters into the query

Toggle whether to interpolate parameters into the query

Returns

zsql\Query
public array
# params( )

Get the parameters

Get the parameters

Returns

array
public array
# parts( )

Get the array of parts

Get the array of parts

Returns

array
protected zsql\Query
# push( string $string )

Push an arbitrary string onto parts

Push an arbitrary string onto parts

Parameters

$string
string
$string

Returns

zsql\Query
protected zsql\Query
# pushTable( )

Push table onto parts

Push table onto parts

Returns

zsql\Query

Throws

zsql\Exception
protected zsql\Query
# pushValues( )

Push values onto parts

Push values onto parts

Returns

zsql\Query

Throws

zsql\Exception
public zsql\Result|boolean
# query( )

Proxy to query callback

Proxy to query callback

Returns

zsql\Result|boolean

Throws

zsql\Exception
protected string
# quoteIdentifier( string $identifier )

Quotes an identifier

Quotes an identifier

Parameters

$identifier
string
$identifier

Returns

string
protected string
# quoteIdentifierIfNotExpression( mixed $identifier )

Quotes an identifier if not an zsql\Expression

Quotes an identifier if not an zsql\Expression

Parameters

$identifier
mixed
$identifier

Returns

string
public zsql\Query
# setQuoteCallback( type $callback )

Set the function to use to quote strings

Set the function to use to quote strings

Parameters

$callback
type
$callback

Returns

zsql\Query

Throws

zsql\Exception
public zsql\Query
# table( mixed $table )

Set the table

Set the table

Parameters

$table
mixed
$table

Returns

zsql\Query
public string
# toString( )

Convert to string

Convert to string

Returns

string
Properties summary
protected zsql\Database $database
#

The database adapter for this query

The database adapter for this query

protected boolean $interpolation false
#

Toggle whether to interpolate parameters into the query

Toggle whether to interpolate parameters into the query

protected string $table
#

The table

The table

protected array $params
#

The parameters to bind

The parameters to bind

protected array $parts
#

Array of query fragments

Array of query fragments

protected callable $quoteCallback
#

Callback to quote a string

Callback to quote a string

protected string $query
#

The current query

The current query

protected callable $queryCallback
#

The function to proxy calls to query to

The function to proxy calls to query to

protected string $quoteChar "'"
#

The character to use to quote strings

The character to use to quote strings

protected string $quoteIdentifierChar '`'
#

The character to use to quote identifiers

The character to use to quote identifiers

API documentation generated by ApiGen 2.8.0