\JDatabaseQuery
Query Building Class.
Synopsis
class JDatabaseQuery
{
- // members
- protected JDatabaseDriver $db;
- protected $sql;
- protected $type;
- protected JDatabaseQueryElement $element;
- protected JDatabaseQueryElement $select;
- protected JDatabaseQueryElement $delete;
- protected JDatabaseQueryElement $update;
- protected JDatabaseQueryElement $insert;
- protected JDatabaseQueryElement $from;
- protected JDatabaseQueryElement $join;
- protected JDatabaseQueryElement $set;
- protected JDatabaseQueryElement $where;
- protected JDatabaseQueryElement $group;
- protected JDatabaseQueryElement $having;
- protected JDatabaseQueryElement $columns;
- protected JDatabaseQueryElement $values;
- protected JDatabaseQueryElement $order;
- protected $autoIncrementField;
- protected JDatabaseQueryElement $call;
- protected JDatabaseQueryElement $exec;
- protected JDatabaseQueryElement $union;
- protected JDatabaseQueryElement $unionAll;
- // methods
- public string __call()
- public void __construct()
- public string __toString()
- public mixed __get()
- public JDatabaseQuery call()
- public string castAsChar()
- public string charLength()
- public JDatabaseQuery clear()
- public JDatabaseQuery columns()
- public string concatenate()
- public string currentTimestamp()
- public string dateFormat()
- public string dump()
- public JDatabaseQuery delete()
- public string escape()
- public JDatabaseQuery exec()
- public JDatabaseQuery from()
- public string year()
- public string month()
- public string day()
- public string hour()
- public string minute()
- public string second()
- public JDatabaseQuery group()
- public JDatabaseQuery having()
- public JDatabaseQuery innerJoin()
- public JDatabaseQuery insert()
- public JDatabaseQuery join()
- public JDatabaseQuery leftJoin()
- public int length()
- public string nullDate()
- public JDatabaseQuery order()
- public JDatabaseQuery outerJoin()
- public string quote()
- public mixed quoteName()
- public JDatabaseQuery rightJoin()
- public JDatabaseQuery select()
- public JDatabaseQuery set()
- public JDatabaseQuery setQuery()
- public JDatabaseQuery update()
- public JDatabaseQuery values()
- public JDatabaseQuery where()
- public void __clone()
- public mixed union()
- public mixed unionDistinct()
- public string format()
- public string dateAdd()
- public mixed unionAll()
Hierarchy
Extended by
Members
protected
- $autoIncrementField —
- $call — JDatabaseQueryElement
- $columns — JDatabaseQueryElement
- $db — JDatabaseDriver
- $delete — JDatabaseQueryElement
- $element — JDatabaseQueryElement
- $exec — JDatabaseQueryElement
- $from — JDatabaseQueryElement
- $group — JDatabaseQueryElement
- $having — JDatabaseQueryElement
- $insert — JDatabaseQueryElement
- $join — JDatabaseQueryElement
- $order — JDatabaseQueryElement
- $select — JDatabaseQueryElement
- $set — JDatabaseQueryElement
- $sql — string
- $type — string
- $union — JDatabaseQueryElement
- $unionAll — JDatabaseQueryElement
- $update — JDatabaseQueryElement
- $values — JDatabaseQueryElement
- $where — JDatabaseQueryElement
Methods
public
- __construct() — Class constructor.
- __call() — Magic method to provide method alias support for quote() and quoteName().
- __clone() — Method to provide deep copy support to nested objects and arrays when cloning.
- __get() — Magic function to get protected variable value
- __toString() — Magic function to convert the query to a string.
- call() — Add a single column, or array of columns to the CALL clause of the query.
- castAsChar() — Casts a value to a char.
- charLength() — Gets the number of characters in a string.
- clear() — Clear data from the query or a specific clause of the query.
- columns() — Adds a column, or array of column names that would be used for an INSERT INTO statement.
- concatenate() — Concatenates an array of column names or values.
- currentTimestamp() — Gets the current date and time.
- dateAdd() — Add to the current date and time.
- dateFormat() — Returns a PHP date() function compliant date format for the database driver.
- day() — Used to get a string to extract day from date column.
- delete() — Add a table name to the DELETE clause of the query.
- dump() — Creates a formatted dump of the query for debugging purposes.
- escape() — Method to escape a string for usage in an SQL statement.
- exec() — Add a single column, or array of columns to the EXEC clause of the query.
- format() — Find and replace sprintf-like tokens in a format string.
- from() — Add a table to the FROM clause of the query.
- group() — Add a grouping column to the GROUP clause of the query.
- having() — A conditions to the HAVING clause of the query.
- hour() — Used to get a string to extract hour from date column.
- innerJoin() — Add an INNER JOIN clause to the query.
- insert() — Add a table name to the INSERT clause of the query.
- join() — Add a JOIN clause to the query.
- leftJoin() — Add a LEFT JOIN clause to the query.
- length() — Get the length of a string in bytes.
- minute() — Used to get a string to extract minute from date column.
- month() — Used to get a string to extract month from date column.
- nullDate() — Get the null or zero representation of a timestamp for the database driver.
- order() — Add a ordering column to the ORDER clause of the query.
- outerJoin() — Add an OUTER JOIN clause to the query.
- quote() — Method to quote and optionally escape a string to database requirements for insertion into the database.
- quoteName() — Wrap an SQL statement identifier name such as column, table or database names in quotes to prevent injection risks and reserved word conflicts.
- rightJoin() — Add a RIGHT JOIN clause to the query.
- second() — Used to get a string to extract seconds from date column.
- select() — Add a single column, or array of columns to the SELECT clause of the query.
- set() — Add a single condition string, or an array of strings to the SET clause of the query.
- setQuery() — Allows a direct query to be provided to the database driver's setQuery() method, but still allow queries to have bounded variables.
- union() — Add a query to UNION with the current query.
- unionAll() — Add a query to UNION ALL with the current query.
- unionDistinct() — Add a query to UNION DISTINCT with the current query. Simply a proxy to Union with the Distinct clause.
- update() — Add a table name to the UPDATE clause of the query.
- values() — Adds a tuple, or array of tuples that would be used as values for an INSERT INTO statement.
- where() — Add a single condition, or an array of conditions to the WHERE clause of the query.
- year() — Used to get a string to extract year from date column.