JDatabaseQuerySqlazure
Extends \JDatabaseQuerySqlsrvQuery Building Class.
since |
1.7.0 |
---|---|
package |
Joomla.Platform |
Methods
__call
Magic method to provide method alias support for quote() and quoteName().
__call(string $method, array $args) : string
since |
1.7.0 |
---|
Arguments
- $method
string
The called method.- $args
array
The array of arguments passed to the method.
Response
string
The aliased method's return value or null.
__clone
Method to provide deep copy support to nested objects and arrays when cloning.
__clone() : void
since |
1.7.3 |
---|
__construct
Class constructor.
__construct(\JDatabaseDriver $db = null)
__get
Magic function to get protected variable value
__get(string $name) : mixed
since |
1.7.0 |
---|
Arguments
- $name
string
The name of the variable.
Response
mixed
__toString
Magic function to convert the query to a string.
__toString() : string
since |
1.7.0 |
---|
Response
string
The completed query.
andWhere
Extend the WHERE clause with an AND and a single condition or an array of conditions.
andWhere(mixed $conditions, string $glue = 'OR') : \JDatabaseQuery
Usage: $query->where(array('a = 1', 'b = 2'))->andWhere(array('c = 3', 'd = 4')); will produce: WHERE ((a = 1 AND b = 2) AND (c = 3 OR d = 4)
since |
3.6 |
---|
Arguments
- $conditions
mixed
A string or array of WHERE conditions.- $glue
string
The glue by which to join the conditions. Defaults to OR.
Response
\JDatabaseQuery
Returns this object to allow chaining.
call
Add a single column, or array of columns to the CALL clause of the query.
call(mixed $columns) : \JDatabaseQuery
Note that you must not mix insert, update, delete and select method calls when building a query. The call method can, however, be called multiple times in the same query.
Usage: $query->call('a.')->call('b.id'); $query->call(array('a.', 'b.id'));
since |
3.0.0 |
---|
Arguments
- $columns
mixed
A string or an array of field names.
Response
\JDatabaseQuery
Returns this object to allow chaining.
castAsChar
Casts a value to a char.
castAsChar(string $value) : string
Ensure that the value is properly quoted before passing to the method.
Usage: $query->select($query->castAsChar('a'));
since |
1.7.0 |
---|
Arguments
- $value
string
The value to cast as a char.
Response
string
Returns the cast value.
charLength
Gets the number of characters in a string.
charLength(string $field, string $operator = null, string $condition = null) : string
Note, use 'length' to find the number of bytes in a string.
Usage: $query->select($query->charLength('a'));
since |
1.7.0 |
---|
Arguments
- $field
string
A value.- $operator
string
Comparison operator between charLength integer value and $condition- $condition
string
Integer value to compare charLength with.
Response
string
The required char length call.
clear
Clear data from the query or a specific clause of the query.
clear(string $clause = null) : \JDatabaseQuery
since |
1.7.0 |
---|
Arguments
- $clause
string
Optionally, the name of the clause to clear, or nothing to clear the whole query.
Response
\JDatabaseQuery
Returns this object to allow chaining.
columns
Adds a column, or array of column names that would be used for an INSERT INTO statement.
columns(mixed $columns) : \JDatabaseQuery
since |
1.7.0 |
---|
Arguments
- $columns
mixed
A column name, or array of column names.
Response
\JDatabaseQuery
Returns this object to allow chaining.
concatenate
Concatenates an array of column names or values.
concatenate(array $values, string $separator = null) : string
Usage: $query->select($query->concatenate(array('a', 'b')));
since |
1.7.0 |
---|
Arguments
- $values
array
An array of values to concatenate.- $separator
string
As separator to place between each value.
Response
string
The concatenated values.
currentTimestamp
Gets the current date and time.
currentTimestamp() : string
Usage: $query->where('published_up < '.$query->currentTimestamp());
since |
1.7.0 |
---|
Response
string
dateAdd
Add to the current date and time.
dateAdd(string $date, string $interval, string $datePart) : string
Usage: $query->select($query->dateAdd()); Prefixing the interval with a - (negative sign) will cause subtraction to be used. Note: Not all drivers support all units.
link |
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-add |
---|---|
since |
3.2.0 |
Arguments
- $date
string
The db quoted string representation of the date to add to. May be date or datetime- $interval
string
The string representation of the appropriate number of units- $datePart
string
The part of the date to perform the addition on
Response
string
The string with the appropriate sql for addition of dates
dateFormat
Returns a PHP date() function compliant date format for the database driver.
dateFormat() : string
This method is provided for use where the query object is passed to a function for modification. If you have direct access to the database object, it is recommended you use the getDateFormat method directly.
since |
1.7.0 |
---|
Response
string
The format string.
day
Used to get a string to extract day from date column.
day(string $date) : string
Usage: $query->select($query->day($query->quoteName('dateColumn')));
since |
3.0.0 |
---|
Arguments
- $date
string
Date column containing day to be extracted.
Response
string
Returns string to extract day from a date.
delete
Add a table name to the DELETE clause of the query.
delete(string $table = null) : \JDatabaseQuery
Note that you must not mix insert, update, delete and select method calls when building a query.
Usage: $query->delete('#__a')->where('id = 1');
since |
1.7.0 |
---|
Arguments
- $table
string
The name of the table to delete from.
Response
\JDatabaseQuery
Returns this object to allow chaining.
dump
Creates a formatted dump of the query for debugging purposes.
dump() : string
Usage: echo $query->dump();
since |
1.7.3 |
---|
Response
string
e
e(mixed $text, \= $extra) : string
Alias for escape method
Arguments
- $text
mixed
- $extra
\=
Response
string
escape
Method to escape a string for usage in an SQL statement.
escape(string $text, boolean $extra = false) : string
This method is provided for use where the query object is passed to a function for modification. If you have direct access to the database object, it is recommended you use the escape method directly.
Note that 'e' is an alias for this method as it is in JDatabaseDriver.
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $text
string
The string to be escaped.- $extra
boolean
Optional parameter to provide extra escaping.
Response
string
The escaped string.
exec
Add a single column, or array of columns to the EXEC clause of the query.
exec(mixed $columns) : \JDatabaseQuery
Note that you must not mix insert, update, delete and select method calls when building a query. The exec method can, however, be called multiple times in the same query.
Usage: $query->exec('a.')->exec('b.id'); $query->exec(array('a.', 'b.id'));
since |
3.0.0 |
---|
Arguments
- $columns
mixed
A string or an array of field names.
Response
\JDatabaseQuery
Returns this object to allow chaining.
extendWhere
Extend the WHERE clause with a single condition or an array of conditions, with a potentially different logical operator from the one in the current WHERE clause.
extendWhere(string $outerGlue, mixed $conditions, string $innerGlue = 'AND') : \JDatabaseQuery
Usage: $query->where(array('a = 1', 'b = 2'))->extendWhere('XOR', array('c = 3', 'd = 4')); will produce: WHERE ((a = 1 AND b = 2) XOR (c = 3 AND d = 4)
since |
3.6 |
---|
Arguments
- $outerGlue
string
The glue by which to join the conditions to the current WHERE conditions.- $conditions
mixed
A string or array of WHERE conditions.- $innerGlue
string
The glue by which to join the conditions. Defaults to AND.
Response
\JDatabaseQuery
Returns this object to allow chaining.
fixGroupColumns
Add missing columns names to GROUP BY clause.
fixGroupColumns(array<mixed,array> $selectColumns) : \JDatabaseQuery
since |
3.7.0 |
---|
Arguments
- $selectColumns
array<mixed,array>
Array of columns from splitSqlExpression method.
Response
\JDatabaseQuery
Returns this object to allow chaining.
fixSelectAliases
Add required aliases to columns for select statement in subquery.
fixSelectAliases() : array<mixed,array>
since |
3.7.0 |
---|
Response
array<mixed,array>
Array of columns with added missing aliases.
format
Find and replace sprintf-like tokens in a format string.
format(string $format) : string
Each token takes one of the following forms: %% - A literal percent character. %[t] - Where [t] is a type specifier. %[n]$[x] - Where [n] is an argument specifier and [t] is a type specifier.
Types: a - Numeric: Replacement text is coerced to a numeric type but not quoted or escaped. e - Escape: Replacement text is passed to $this->escape(). E - Escape (extra): Replacement text is passed to $this->escape() with true as the second argument. n - Name Quote: Replacement text is passed to $this->quoteName(). q - Quote: Replacement text is passed to $this->quote(). Q - Quote (no escape): Replacement text is passed to $this->quote() with false as the second argument. r - Raw: Replacement text is used as-is. (Be careful)
Date Types:
- Replacement text automatically quoted (use uppercase for Name Quote).
- Replacement text should be a string in date format or name of a date column. y/Y - Year m/M - Month d/D - Day h/H - Hour i/I - Minute s/S - Second
Invariable Types:
- Takes no argument.
- Argument index not incremented. t - Replacement text is the result of $this->currentTimestamp(). z - Replacement text is the result of $this->nullDate(false). Z - Replacement text is the result of $this->nullDate(true).
Usage:
$query->format('SELECT %1$n FROM %2$n WHERE %3$n = %4$a', 'foo', '#foo', 'bar', 1);
Returns: SELECT foo
FROM `#fooWHERE
bar` = 1
Notes: The argument specifier is optional but recommended for clarity. The argument index used for unspecified tokens is incremented only when used.
since |
3.1.4 |
---|
Arguments
- $format
string
The formatting string.
Response
string
Returns a string produced according to the formatting string.
from
Add a table to the FROM clause of the query.
from(mixed $tables, string $subQueryAlias = null) : \JDatabaseQuery
Note that while an array of tables can be provided, it is recommended you use explicit joins.
Usage: $query->select('*')->from('#__a');
throws |
|
---|---|
since |
1.7.0 |
Arguments
- $tables
mixed
A string or array of table names. This can be a JDatabaseQuery object (or a child of it) when used as a subquery in FROM clause along with a value for $subQueryAlias.- $subQueryAlias
string
Alias used when $tables is a JDatabaseQuery.
Response
\JDatabaseQuery
Returns this object to allow chaining.
group
Add a grouping column to the GROUP clause of the query.
group(mixed $columns) : \JDatabaseQuery
Usage: $query->group('id');
since |
1.7.0 |
---|
Arguments
- $columns
mixed
A string or array of ordering columns.
Response
\JDatabaseQuery
Returns this object to allow chaining.
having
A conditions to the HAVING clause of the query.
having(mixed $conditions, string $glue = 'AND') : \JDatabaseQuery
Usage: $query->group('id')->having('COUNT(id) > 5');
since |
1.7.0 |
---|
Arguments
- $conditions
mixed
A string or array of columns.- $glue
string
The glue by which to join the conditions. Defaults to AND.
Response
\JDatabaseQuery
Returns this object to allow chaining.
hour
Used to get a string to extract hour from date column.
hour(string $date) : string
Usage: $query->select($query->hour($query->quoteName('dateColumn')));
since |
3.0.0 |
---|
Arguments
- $date
string
Date column containing hour to be extracted.
Response
string
Returns string to extract hour from a date.
innerJoin
Add an INNER JOIN clause to the query.
innerJoin(string $condition) : \JDatabaseQuery
Usage: $query->innerJoin('b ON b.id = a.id')->innerJoin('c ON c.id = b.id');
since |
1.7.0 |
---|
Arguments
- $condition
string
The join condition.
Response
\JDatabaseQuery
Returns this object to allow chaining.
insert
Add a table name to the INSERT clause of the query.
insert(mixed $table, boolean $incrementField = false) : \JDatabaseQuery
Note that you must not mix insert, update, delete and select method calls when building a query.
Usage: $query->insert('#a')->set('id = 1'); $query->insert('#a')->columns('id, title')->values('1,2')->values('3,4'); $query->insert('#__a')->columns('id, title')->values(array('1,2', '3,4'));
since |
1.7.0 |
---|
Arguments
- $table
mixed
The name of the table to insert data into.- $incrementField
boolean
The name of the field to auto increment.
Response
\JDatabaseQuery
Returns this object to allow chaining.
join
Add a JOIN clause to the query.
join(string $type, string $conditions) : \JDatabaseQuery
Usage: $query->join('INNER', 'b ON b.id = a.id);
since |
1.7.0 |
---|
Arguments
- $type
string
The type of join. This string is prepended to the JOIN keyword.- $conditions
string
A string or array of conditions.
Response
\JDatabaseQuery
Returns this object to allow chaining.
leftJoin
Add a LEFT JOIN clause to the query.
leftJoin(string $condition) : \JDatabaseQuery
Usage: $query->leftJoin('b ON b.id = a.id')->leftJoin('c ON c.id = b.id');
since |
1.7.0 |
---|
Arguments
- $condition
string
The join condition.
Response
\JDatabaseQuery
Returns this object to allow chaining.
length
Get the length of a string in bytes.
length(string $value) : integer
Note, use 'charLength' to find the number of characters in a string.
Usage: query->where($query->length('a').' > 3');
since |
1.7.0 |
---|
Arguments
- $value
string
The string to measure.
Response
integer
minute
Used to get a string to extract minute from date column.
minute(string $date) : string
Usage: $query->select($query->minute($query->quoteName('dateColumn')));
since |
3.0.0 |
---|
Arguments
- $date
string
Date column containing minute to be extracted.
Response
string
Returns string to extract minute from a date.
month
Used to get a string to extract month from date column.
month(string $date) : string
Usage: $query->select($query->month($query->quoteName('dateColumn')));
since |
3.0.0 |
---|
Arguments
- $date
string
Date column containing month to be extracted.
Response
string
Returns string to extract month from a date.
nullDate
Get the null or zero representation of a timestamp for the database driver.
nullDate(boolean $quoted = true) : string
This method is provided for use where the query object is passed to a function for modification. If you have direct access to the database object, it is recommended you use the nullDate method directly.
Usage: $query->where('modified_date <> '.$query->nullDate());
since |
1.7.0 |
---|
Arguments
- $quoted
boolean
Optionally wraps the null date in database quotes (true by default).
Response
string
Null or zero representation of a timestamp.
order
Add an ordering column to the ORDER clause of the query.
order(mixed $columns) : \JDatabaseQuery
Usage: $query->order('foo')->order('bar'); $query->order(array('foo','bar'));
since |
1.7.0 |
---|
Arguments
- $columns
mixed
A string or array of ordering columns.
Response
\JDatabaseQuery
Returns this object to allow chaining.
orWhere
Extend the WHERE clause with an OR and a single condition or an array of conditions.
orWhere(mixed $conditions, string $glue = 'AND') : \JDatabaseQuery
Usage: $query->where(array('a = 1', 'b = 2'))->orWhere(array('c = 3', 'd = 4')); will produce: WHERE ((a = 1 AND b = 2) OR (c = 3 AND d = 4)
since |
3.6 |
---|
Arguments
- $conditions
mixed
A string or array of WHERE conditions.- $glue
string
The glue by which to join the conditions. Defaults to AND.
Response
\JDatabaseQuery
Returns this object to allow chaining.
outerJoin
Add an OUTER JOIN clause to the query.
outerJoin(string $condition) : \JDatabaseQuery
Usage: $query->outerJoin('b ON b.id = a.id')->outerJoin('c ON c.id = b.id');
since |
1.7.0 |
---|
Arguments
- $condition
string
The join condition.
Response
\JDatabaseQuery
Returns this object to allow chaining.
processLimit
Method to modify a query already in string format with the needed additions to make the query limited to a particular number of results, or start at a particular offset.
processLimit(string $query, integer $limit, integer $offset) : string
since |
3.0.0 |
---|
Arguments
- $query
string
The query in string format- $limit
integer
The limit for the result set- $offset
integer
The offset for the result set
Response
string
q
q(mixed $text, \= $escape) : string
Alias for quote method
Arguments
- $text
mixed
- $escape
\=
Response
string
qn
qn(mixed $name, \= $as) : string
Alias for quoteName method
Arguments
- $name
mixed
- $as
\=
Response
string
quote
Method to quote and optionally escape a string to database requirements for insertion into the database.
quote(mixed $text, boolean $escape = true) : string
This method is provided for use where the query object is passed to a function for modification. If you have direct access to the database object, it is recommended you use the quote method directly.
Note that 'q' is an alias for this method as it is in JDatabaseDriver.
Usage: $query->quote('fulltext'); $query->q('fulltext'); $query->q(array('option', 'fulltext'));
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $text
mixed
A string or an array of strings to quote.- $escape
boolean
True to escape the string, false to leave it unchanged.
Response
string
The quoted input string.
quoteName
Wrap an SQL statement identifier name such as column, table or database names in quotes to prevent injection risks and reserved word conflicts.
quoteName(mixed $name, mixed $as = null) : mixed
This method is provided for use where the query object is passed to a function for modification. If you have direct access to the database object, it is recommended you use the quoteName method directly.
Note that 'qn' is an alias for this method as it is in JDatabaseDriver.
Usage: $query->quoteName('#a'); $query->qn('#a');
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $name
mixed
The identifier name to wrap in quotes, or an array of identifier names to wrap in quotes. Each type supports dot-notation name.- $as
mixed
The AS query part associated to $name. It can be string or array, in latter case it has to be same length of $name; if is null there will not be any AS part for string or array element.
Response
mixed
The quote wrapped name, same type of $name.
Rand
Return correct rand() function for MSSQL.
Rand() : string
Ensure that the rand() function is MSSQL compatible.
Usage: $query->Rand();
since |
3.5 |
---|
Response
string
The correct rand function.
rightJoin
Add a RIGHT JOIN clause to the query.
rightJoin(string $condition) : \JDatabaseQuery
Usage: $query->rightJoin('b ON b.id = a.id')->rightJoin('c ON c.id = b.id');
since |
1.7.0 |
---|
Arguments
- $condition
string
The join condition.
Response
\JDatabaseQuery
Returns this object to allow chaining.
second
Used to get a string to extract seconds from date column.
second(string $date) : string
Usage: $query->select($query->second($query->quoteName('dateColumn')));
since |
3.0.0 |
---|
Arguments
- $date
string
Date column containing second to be extracted.
Response
string
Returns string to extract second from a date.
select
Add a single column, or array of columns to the SELECT clause of the query.
select(mixed $columns) : \JDatabaseQuery
Note that you must not mix insert, update, delete and select method calls when building a query. The select method can, however, be called multiple times in the same query.
Usage: $query->select('a.')->select('b.id'); $query->select(array('a.', 'b.id'));
since |
1.7.0 |
---|
Arguments
- $columns
mixed
A string or an array of field names.
Response
\JDatabaseQuery
Returns this object to allow chaining.
selectRowNumber
Return the number of the current row.
selectRowNumber(string $orderBy, string $orderColumnAlias) : \JDatabaseQuery
Usage: $query->select('id'); $query->selectRowNumber('ordering,publish_up DESC', 'new_ordering'); $query->from('#__content');
since |
3.7.0 |
---|---|
throws |
|
Arguments
- $orderBy
string
An expression of ordering for window function.- $orderColumnAlias
string
An alias for new ordering column.
Response
\JDatabaseQuery
Returns this object to allow chaining.
set
Add a single condition string, or an array of strings to the SET clause of the query.
set(mixed $conditions, string $glue = ',') : \JDatabaseQuery
Usage: $query->set('a = 1')->set('b = 2'); $query->set(array('a = 1', 'b = 2');
since |
1.7.0 |
---|
Arguments
- $conditions
mixed
A string or array of string conditions.- $glue
string
The glue by which to join the condition strings. Defaults to ,. Note that the glue is set on first use and cannot be changed.
Response
\JDatabaseQuery
Returns this object to allow chaining.
setLimit
Sets the offset and limit for the result set, if the database driver supports it.
setLimit(integer $limit, integer $offset) : \JDatabaseQuery
Usage: $query->setLimit(100, 0); (retrieve 100 rows, starting at first record) $query->setLimit(50, 50); (retrieve 50 rows, starting at 50th record)
since |
3.0.0 |
---|
Arguments
- $limit
integer
The limit for the result set- $offset
integer
The offset for the result set
Response
\JDatabaseQuery
Returns this object to allow chaining.
setQuery
Allows a direct query to be provided to the database driver's setQuery() method, but still allow queries to have bounded variables.
setQuery(mixed $sql) : \JDatabaseQuery
Usage: $query->setQuery('select * from #__users');
since |
3.0.0 |
---|
Arguments
- $sql
mixed
An SQL Query
Response
\JDatabaseQuery
Returns this object to allow chaining.
splitSqlExpression
Split a string of sql expression into an array of individual columns.
splitSqlExpression(string $string) : array<mixed,array>
Single line or line end comments and multi line comments are stripped off. Always return at least one column.
since |
3.7.0 |
---|
Arguments
- $string
string
Input string of sql expression like select expression.
Response
array<mixed,array>
The columns from the input string separated into an array.
union
Add a query to UNION with the current query.
union(mixed $query, boolean $distinct = false, string $glue = '') : \JDatabaseQuery
Multiple unions each require separate statements and create an array of unions.
Usage (the $query base query MUST be a select query): $query->union('SELECT name FROM #foo') $query->union('SELECT name FROM #foo', true) $query->union($query2)->union($query3)
The $query attribute as an array is deprecated and will not be supported in 4.0.
$query->union(array('SELECT name FROM #foo','SELECT name FROM #bar')) $query->union(array($query2, $query3))
link | |
---|---|
since |
3.0.0 |
Arguments
- $query
mixed
The JDatabaseQuery object or string to union.- $distinct
boolean
True to only return distinct rows from the union.- $glue
string
The glue by which to join the conditions.
Response
\JDatabaseQuery
Returns this object to allow chaining.
unionAll
Add a query to UNION ALL with the current query.
unionAll(mixed $query, boolean $distinct = false, string $glue = '') : \JDatabaseQuery
Multiple unions each require separate statements and create an array of unions.
Usage: $query->union('SELECT name FROM #__foo')
The $query attribute as an array is deprecated and will not be supported in 4.0.
$query->union(array('SELECT name FROM #foo','SELECT name FROM #bar'))
see | \union |
---|---|
since |
3.2.0 |
Arguments
- $query
mixed
The JDatabaseQuery object or string to union.- $distinct
boolean
Not used - ignored.- $glue
string
Not used - ignored.
Response
\JDatabaseQuery
Returns this object to allow chaining.
unionDistinct
Add a query to UNION DISTINCT with the current query. Simply a proxy to union with the DISTINCT keyword.
unionDistinct(mixed $query, string $glue = '') : \JDatabaseQuery
Usage: $query->unionDistinct('SELECT name FROM #__foo')
see | \union |
---|---|
since |
3.0.0 |
deprecated |
4.0 Use union() instead. |
Arguments
- $query
mixed
The JDatabaseQuery object or string to union.- $glue
string
The glue by which to join the conditions.
Response
\JDatabaseQuery
Returns this object to allow chaining.
update
Add a table name to the UPDATE clause of the query.
update(string $table) : \JDatabaseQuery
Note that you must not mix insert, update, delete and select method calls when building a query.
Usage: $query->update('#__foo')->set(...);
since |
1.7.0 |
---|
Arguments
- $table
string
A table to update.
Response
\JDatabaseQuery
Returns this object to allow chaining.
validateRowNumber
Validate arguments which are passed to selectRowNumber method and set up common variables.
validateRowNumber(string $orderBy, string $orderColumnAlias) : void
since |
3.7.0 |
---|---|
throws |
|
Arguments
- $orderBy
string
An expression of ordering for window function.- $orderColumnAlias
string
An alias for new ordering column.
values
Adds a tuple, or array of tuples that would be used as values for an INSERT INTO statement.
values(string $values) : \JDatabaseQuery
Usage: $query->values('1,2,3')->values('4,5,6'); $query->values(array('1,2,3', '4,5,6'));
since |
1.7.0 |
---|
Arguments
- $values
string
A single tuple, or array of tuples.
Response
\JDatabaseQuery
Returns this object to allow chaining.
where
Add a single condition, or an array of conditions to the WHERE clause of the query.
where(mixed $conditions, string $glue = 'AND') : \JDatabaseQuery
Usage: $query->where('a = 1')->where('b = 2'); $query->where(array('a = 1', 'b = 2'));
since |
1.7.0 |
---|
Arguments
- $conditions
mixed
A string or array of where conditions.- $glue
string
The glue by which to join the conditions. Defaults to AND. Note that the glue is set on first use and cannot be changed.
Response
\JDatabaseQuery
Returns this object to allow chaining.
year
Used to get a string to extract year from date column.
year(string $date) : string
Usage: $query->select($query->year($query->quoteName('dateColumn')));
since |
3.0.0 |
---|
Arguments
- $date
string
Date column containing year to be extracted.
Response
string
Returns string to extract year from a date.
Properties
name_quotes
The character(s) used to quote SQL statement names such as table names or field names, etc. The child classes should define this as necessary. If a single character string the same character is used for both sides of the quoted name, else the first character will be used for the opening quote and the second for the closing quote.
since |
1.7.0 |
---|
Type(s)
string
null_date
The null or zero representation of a timestamp for the database driver. This should be defined in child classes to hold the appropriate value for the engine.
since |
1.7.0 |
---|
Type(s)
string
limit
The affected row limit for the current SQL statement.
since |
3.2 |
---|
Type(s)
integer
offset
The affected row offset to apply for the current SQL statement.
since |
3.2 |
---|
Type(s)
integer
sql
The SQL query (if a direct query string was provided).
since |
3.0.0 |
---|
Type(s)
string
type
The query type.
since |
1.7.0 |
---|
Type(s)
string
element
The query element for a generic query (type = null).
columns
The column list for an INSERT statement.
values
The values list for an INSERT statement.
autoIncrementField
The auto increment insert field element.
since |
1.7.0 |
---|
Type(s)
object
union
The union element.
since |
3.0.0 |
---|---|
deprecated |
4.0 Will be transformed and moved to $merge variable. |
Type(s)
\JDatabaseQueryElement
unionAll
The unionAll element.
since |
3.2.0 |
---|---|
deprecated |
4.0 Will be transformed and moved to $merge variable. |
Type(s)
\JDatabaseQueryElement
selectRowNumber
Details of window function.
since |
3.7.0 |
---|
Type(s)
array
type
Type(s)
\JDatabaseQueryElement
select
Type(s)
\JDatabaseQueryElement
group
Type(s)
\JDatabaseQueryElement
having
Type(s)
\JDatabaseQueryElement