Path

ez components / documentation / api reference / 1.0.1 / database


eZ Components 1.0.1

Database: ezcQuerySelectSqlite

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcQuerySelectSqlite

SQLite specific implementation of ezcQuery. [source]
This class reimplements methods where SQLite differs from the standard implementation in ezcQuery. The only difference is the right join syntax.

Parents

ezcQuery
   |
   --ezcQuerySelect
      |
      --ezcQuerySelectSqlite

Inherited Constants

From ezcQuerySelect:
ezcQuerySelect::ASC    Sort the result ascendingly.
ezcQuerySelect::DESC    Sort the result descendingly.

Inherited Member Variables

From ezcQuerySelect:
protected  ezcQuerySelect::$fromString
protected  ezcQuerySelect::$groupString
protected  ezcQuerySelect::$limitString
protected  ezcQuerySelect::$orderString
protected  ezcQuerySelect::$selectString
protected  ezcQuerySelect::$whereString
From ezcQuery:
protected  ezcQuery::$db
public  ezcQuery::$expr

Method Summary

public ezcQuerySelectSqlite __construct( $db )
Constructs a new ezcQueryOracle object.
public string rightJoin( $table1, $table2, $column1, $column2 )
Returns the SQL for a right join.

Inherited Methods

From ezcQuerySelect :
public ezcQuerySelect ezcQuerySelect::__construct()
Constructs a new ezcQuery object.
public string ezcQuerySelect::alias()
Returns SQL to create an alias
public a ezcQuerySelect::from()
Select which tables you want to select from.
public static bool|string ezcQuerySelect::getDummyTableName()
Returns dummy table name.
public string ezcQuerySelect::getQuery()
Returns the complete select query.
public ezcQuery ezcQuerySelect::groupBy()
Returns SQL that groups the result set by a given column.
public string ezcQuerySelect::innerJoin()
Returns the SQL for an inner join.
public string ezcQuerySelect::leftJoin()
Returns the SQL for a left join.
public string ezcQuerySelect::limit()
Returns SQL that limits the result set.
public ezcQuery ezcQuerySelect::orderBy()
Returns SQL that orders the result set by a given column.
public void ezcQuerySelect::reset()
Resets the query object for reuse.
public string ezcQuerySelect::rightJoin()
Returns the SQL for a right join.
public ezcQuery ezcQuerySelect::select()
Opens the query and selects which columns you want to return with the query.
public ezcQuerySelect ezcQuerySelect::where()
Adds a where clause with logical expressions to the query.
From ezcQuery :
public ezcQuery ezcQuery::__construct()
Constructs a new ezcQuery that works on the database $db and with the aliases $aliases.
public static array ezcQuery::arrayFlatten()
Returns all the elements in $array as one large single dimensional array.
public &mixed ezcQuery::bindParam()
Binds the parameter $param to the specified variable name $placeHolder..
public &mixed ezcQuery::bindValue()
Binds the value $value to the specified variable name $placeHolder.
public void ezcQuery::doBind()
Performs binding of variables bound with bindValue and bindParam on the statement $stmt.
protected string ezcQuery::getIdentifier()
Returns the correct identifier for the alias $alias.
protected array(string) ezcQuery::getIdentifiers()
Returns the correct identifiers for the aliases found in $aliases.
public abstract string ezcQuery::getQuery()
Returns the query string for this query object.
public bool ezcQuery::hasAliases()
Returns true if this object has aliases.
public PDOStatement ezcQuery::prepare()
Returns a prepared statement from this query which can be used for execution.
public void ezcQuery::setAliases()
Sets the aliases $aliases for this object.

Methods

__construct

ezcQuerySelectSqlite __construct( $db )
Constructs a new ezcQueryOracle object.

Parameters

Name Type Description
$db PDO  

Redefinition of

Method Description
ezcQuerySelect::__construct() Constructs a new ezcQuery object.

rightJoin

string rightJoin( string $table1, string $table2, string $column1, string $column2 )
Returns the SQL for a right join.
SQLite doesn't support a RIGHT OUTER JOIN, so we are rewriting it to a LEFT OUTER JOIN instead.
Example:
1.  // the following code will produce the SQL
2.  // SELECT id FROM t2 LEFT JOIN t1 ON t1.id = t2.id
3.   $q->select'id' )->from$q->rightJoin't1''t2''t1.id''t2.id' ) );

Parameters

Name Type Description
$table1 string the name of the table to join with
$table2 string the name of the table to join
$column1 string the column to join with
$column2 string the column to join on

Redefinition of

Method Description
ezcQuerySelect::rightJoin() Returns the SQL for a right join.

Last updated: Fri, 02 Nov 2007