Query\QueryBuilderInterface
Interface defining the Query Builder class
Synopsis
interface QueryBuilderInterface
{
- // methods
- public QueryBuilderInterface select()
- public QueryBuilderInterface selectMax()
- public QueryBuilderInterface selectMin()
- public QueryBuilderInterface selectAvg()
- public QueryBuilderInterface selectSum()
- public QueryBuilderInterface distinct()
- public QueryBuilderInterface explain()
- public QueryBuilderInterface from()
- public QueryBuilderInterface like()
- public QueryBuilderInterface orLike()
- public QueryBuilderInterface notLike()
- public QueryBuilderInterface orNotLike()
- public QueryBuilderInterface having()
- public QueryBuilderInterface orHaving()
- public QueryBuilderInterface where()
- public QueryBuilderInterface orWhere()
- public QueryBuilderInterface whereIn()
- public QueryBuilderInterface orWhereIn()
- public QueryBuilderInterface whereNotIn()
- public QueryBuilderInterface orWhereNotIn()
- public QueryBuilderInterface set()
- public QueryBuilderInterface join()
- public QueryBuilderInterface groupBy()
- public QueryBuilderInterface orderBy()
- public QueryBuilderInterface limit()
- public QueryBuilderInterface groupStart()
- public QueryBuilderInterface notGroupStart()
- public QueryBuilderInterface orGroupStart()
- public QueryBuilderInterface orNotGroupStart()
- public QueryBuilderInterface groupEnd()
- public PDOStatement get()
- public PDOStatement getWhere()
- public int countAll()
- public int countAllResults()
- public PDOStatement insert()
- public ?PDOStatement insertBatch()
- public PDOStatement update()
- public ?int updateBatch()
- public PDOStatement delete()
- public string getCompiledSelect()
- public string getCompiledInsert()
- public string getCompiledUpdate()
- public string getCompiledDelete()
- public void resetQuery()
Methods
public
- countAll() — Retrieve the number of rows in the selected table
- countAllResults() — Retrieve the number of results for the generated query - used in place of the get() method
- delete() — Deletes data from a table
- distinct() — Adds the 'distinct' keyword to a query
- explain() — Shows the query plan for the query
- from() — Specify the database table to select from
- get() — Select and retrieve all records from the current table, and/or execute current compiled query
- getCompiledDelete() — Returns the generated 'delete' sql query
- getCompiledInsert() — Returns the generated 'insert' sql query
- getCompiledSelect() — Returns the generated 'select' sql query
- getCompiledUpdate() — Returns the generated 'update' sql query
- getWhere() — Convenience method for get() with a where clause
- groupBy() — Group the results by the selected field(s)
- groupEnd() — Ends a query group
- groupStart() — Adds a paren to the current query for query grouping
- having() — Generates a 'Having' clause
- insert() — Creates an insert clause, and executes it
- insertBatch() — Creates and executes a batch insertion query
- join() — Creates a join phrase in a compiled query
- like() — Creates a Like clause in the sql statement
- limit() — Set a limit on the current sql statement
- notGroupStart() — Adds a paren to the current query for query grouping, prefixed with 'NOT'
- notLike() — Generates a NOT LIKE clause
- orGroupStart() — Adds a paren to the current query for query grouping, prefixed with 'OR'
- orHaving() — Generates a 'Having' clause prefixed with 'OR'
- orLike() — Generates an OR Like clause
- orNotGroupStart() — Adds a paren to the current query for query grouping, prefixed with 'OR NOT'
- orNotLike() — Generates a OR NOT LIKE clause
- orWhere() — Where clause prefixed with "OR"
- orWhereIn() — Where in statement prefixed with "or"
- orWhereNotIn() — OR WHERE NOT IN (FOO) clause
- orderBy() — Order the results by the selected field(s)
- resetQuery() — Clear out the class variables, so the next query can be run
- select() — Specifies rows to select in a query
- selectAvg() — Selects the average value of a field from a query
- selectMax() — Selects the maximum value of a field from a query
- selectMin() — Selects the minimum value of a field from a query
- selectSum() — Selects the sum of a field from a query
- set() — Sets values for inserts / updates / deletes
- update() — Creates an update clause, and executes it
- updateBatch() — Creates a batch update, and executes it.
- where() — Specify condition(s) in the where clause of a query Note: this function works with key / value, or a passed array with key / value pairs
- whereIn() — Where clause with 'IN' statement
- whereNotIn() — WHERE NOT IN (FOO) clause