Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__toString () | |
castAs (string $type, string $value, ?string $length=null) | |
charLength ($field, $operator=null, $condition=null) | |
concatenate ($values, $separator=null) | |
currentTimestamp () | |
length ($value) | |
group ($columns) | |
groupConcat ($expression, $separator=',') | |
rand () | |
findInSet ($value, $set) | |
processLimit ($query, $limit, $offset=0) | |
union ($query, $distinct=true) | |
Fonctions membres publiques hérités de DatabaseQuery | |
__construct (DatabaseInterface $db=null) | |
__toString () | |
__get ($name) | |
call ($columns) | |
castAs (string $type, string $value, ?string $length=null) | |
castAsChar ($value) | |
charLength ($field, $operator=null, $condition=null) | |
clear ($clause=null) | |
columns ($columns) | |
concatenate ($values, $separator=null) | |
currentTimestamp () | |
dateAdd ($date, $interval, $datePart) | |
dateFormat () | |
dump () | |
delete ($table=null) | |
e ($text, $extra=false) | |
escape ($text, $extra=false) | |
exec ($columns) | |
findInSet ($value, $set) | |
from ($table) | |
alias ($alias) | |
year ($date) | |
month ($date) | |
day ($date) | |
hour ($date) | |
minute ($date) | |
second ($date) | |
group ($columns) | |
having ($conditions, $glue='AND') | |
insert ($table, $incrementField=false) | |
join ($type, $table, $condition=null) | |
innerJoin ($table, $condition=null) | |
outerJoin ($table, $condition=null) | |
leftJoin ($table, $condition=null) | |
rightJoin ($table, $condition=null) | |
length ($value) | |
nullDate ($quoted=true) | |
isNullDatetime ($column) | |
order ($columns) | |
q ($text, $escape=true) | |
quote ($text, $escape=true) | |
qn ($name, $as=null) | |
quoteName ($name, $as=null) | |
rand () | |
regexp ($value) | |
select ($columns) | |
set ($conditions, $glue=',') | |
setLimit ($limit=0, $offset=0) | |
setQuery ($sql) | |
update ($table) | |
values ($values) | |
where ($conditions, $glue='AND') | |
whereIn (string $keyName, array $keyValues, $dataType=ParameterType::INTEGER) | |
whereNotIn (string $keyName, array $keyValues, $dataType=ParameterType::INTEGER) | |
extendWhere ($outerGlue, $conditions, $innerGlue='AND') | |
orWhere ($conditions, $glue='AND') | |
andWhere ($conditions, $glue='OR') | |
bind ($key, &$value, $dataType=ParameterType::STRING, $length=0, $driverOptions=[]) | |
unbind ($key) | |
bindArray (array $values, $dataType=ParameterType::INTEGER) | |
__clone () | |
& | getBounded ($key=null) |
union ($query, $distinct=true) | |
unionAll ($query) | |
querySet ($query) | |
toQuerySet () | |
format ($format) | |
selectRowNumber ($orderBy, $orderColumnAlias) | |
Fonctions membres protégées | |
fixSelectAliases () | |
fixGroupColumns ($selectColumns) | |
splitSqlExpression ($string) | |
Fonctions membres protégées hérités de DatabaseQuery | |
merge ($name, $query) | |
validateRowNumber ($orderBy, $orderColumnAlias) | |
Attributs protégés | |
$nullDatetimeList = ['1900-01-01 00:00:00'] | |
Attributs protégés hérités de DatabaseQuery | |
$bounded = [] | |
$parameterMapping | |
$db | |
$sql | |
$type = '' | |
$alias = null | |
$element | |
$select | |
$delete | |
$update | |
$insert | |
$from | |
$join | |
$set | |
$where | |
$group | |
$having | |
$columns | |
$values | |
$order | |
$autoIncrementField = false | |
$call | |
$exec | |
$merge | |
$querySet | |
$selectRowNumber | |
$nullDatetimeList = [] | |
$offset | |
$limit | |
$preparedIndex = 0 | |
SQL Server Query Building Class.
__toString | ( | ) |
Magic function to convert the query to a string.
Implémente QueryInterface.
Références DatabaseQuery\$alias, DatabaseQuery\$columns, DatabaseQuery\$element, DatabaseQuery\$from, DatabaseQuery\$join, $query, DatabaseQuery\$querySet, DatabaseQuery\$sql, DatabaseQuery\$update, Joomla\Database\Query\__toString(), DatabaseQuery\alias(), DatabaseQuery\columns(), elseif, SqlsrvQuery\fixGroupColumns(), SqlsrvQuery\fixSelectAliases(), DatabaseQuery\from(), SqlsrvQuery\group(), DatabaseQuery\having(), DatabaseQuery\insert(), DatabaseQuery\join(), Joomla\Database\Query\limit(), DatabaseQuery\merge(), null, Joomla\Database\Query\offset(), DatabaseQuery\order(), SqlsrvQuery\processLimit(), DatabaseQuery\select(), DatabaseQuery\selectRowNumber(), DatabaseQuery\update(), DatabaseQuery\values(), et DatabaseQuery\where().
castAs | ( | string | $type, |
string | $value, | ||
?string | $length = null |
||
) |
Casts a value to a char.
Ensure that the value is properly quoted before passing to the method.
Usage: $query->select($query->castAs('CHAR', 'a'));
string | $type | The type of string to cast as. |
string | $value | The value to cast as a char. |
string | $length | The value to cast as a char. |
Implémente QueryInterface.
Références DatabaseQuery\$type, $value, et Joomla\Database\Query\castAs().
Gets the function to determine the length of a character string.
string | $field | A value. |
string | null | $operator | Comparison operator between charLength integer value and $condition |
string | null | $condition | Integer value to compare charLength with. |
Implémente QueryInterface.
concatenate | ( | $values, | |
$separator = null |
|||
) |
Concatenates an array of column names or values.
string[] | $values An array of values to concatenate. | |
string | null | $separator | As separator to place between each value. |
Implémente QueryInterface.
Références $separator, DatabaseQuery\$values, null, et DatabaseQuery\quote().
currentTimestamp | ( | ) |
findInSet | ( | $value, | |
$set | |||
) |
Find a value in a varchar used like a set.
Ensure that the value is an integer before passing to the method.
Usage: $query->findInSet((int) $parent->id, 'a.assigned_cat_ids')
string | $value | The value to search for. |
string | $set | The set of values. |
Implémente QueryInterface.
|
protected |
Add missing columns names to GROUP BY clause.
array[] | $selectColumns Array of columns from splitSqlExpression method. |
Références DatabaseQuery\$alias, $dir, $i, DatabaseQuery\$join, $name, $size, $this, DatabaseQuery\$type, elseif, DatabaseQuery\from(), SqlsrvQuery\group(), DatabaseQuery\join(), DatabaseQuery\order(), et SqlsrvQuery\splitSqlExpression().
Référencé par SqlsrvQuery\__toString().
|
protected |
Add required aliases to columns for select statement in subquery.
Références DatabaseQuery\$columns, $i, $size, elseif, DatabaseQuery\quoteName(), DatabaseQuery\select(), et SqlsrvQuery\splitSqlExpression().
Référencé par SqlsrvQuery\__toString().
group | ( | $columns | ) |
Add a grouping column to the GROUP clause of the query.
Usage: $query->group('id');
mixed | $columns | A string or array of ordering columns. |
Implémente QueryInterface.
Références DatabaseQuery\$alias, $cols, DatabaseQuery\$columns, DatabaseQuery\$join, $key, $name, $this, DatabaseQuery\$type, DatabaseQuery\from(), DatabaseQuery\join(), et DatabaseQuery\select().
Référencé par SqlsrvQuery\__toString(), et SqlsrvQuery\fixGroupColumns().
groupConcat | ( | $expression, | |
$separator = ',' |
|||
) |
Aggregate function to get input values concatenated into a string, separated by delimiter
Usage: $query->groupConcat('id', ',');
string | $expression | The expression to apply concatenation to, this may be a column name or complex SQL statement. |
string | $separator | The delimiter of each concatenated value |
Implémente QueryInterface.
Références $separator, et DatabaseQuery\quote().
length | ( | $value | ) |
Get the length of a string in bytes.
string | $value | The string to measure. |
Implémente QueryInterface.
Références $value.
processLimit | ( | $query, | |
$limit, | |||
$offset = 0 |
|||
) |
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.
string | $query | The query in string format |
integer | $limit | The limit for the result set |
integer | $offset | The offset for the result set |
Implémente LimitableInterface.
Références DatabaseQuery\$limit, DatabaseQuery\$offset, $position, $query, et elseif.
Référencé par SqlsrvQuery\__toString().
rand | ( | ) |
Get the function to return a random floating-point value
Usage: $query->rand();
Implémente QueryInterface.
|
protected |
Split a string of sql expression into an array of individual columns. Single line or line end comments and multi line comments are stripped off. Always return at least one column.
string | $string | Input string of sql expression like select expression. |
Références DatabaseQuery\$columns, $i, $n, $start, elseif, et null.
Référencé par SqlsrvQuery\fixGroupColumns(), et SqlsrvQuery\fixSelectAliases().
union | ( | $query, | |
$distinct = true |
|||
) |
Add a query to UNION with the current query.
Usage: $query->union('SELECT name FROM #__foo') $query->union('SELECT name FROM #__foo', true)
DatabaseQuery | string | $query | The DatabaseQuery object or string to union. |
boolean | $distinct | True to only return distinct rows from the union. |
Implémente QueryInterface.
Références $query, et DatabaseQuery\merge().
|
protected |