Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Structures de données | |
interface | LimitableInterface |
interface | PreparableInterface |
class | QueryElement |
Fonctions | |
regexp ($value) | |
rand () | |
findInSet ($value, $set) | |
selectRowNumber ($orderBy, $orderColumnAlias) | |
castAs (string $type, string $value, ?string $length=null) | |
__toString () | |
clear ($clause=null) | |
concatenate ($values, $separator=null) | |
currentTimestamp () | |
forUpdate ($tableName, $glue=',') | |
forShare ($tableName, $glue=',') | |
groupConcat ($expression, $separator=',') | |
year ($date) | |
month ($date) | |
day ($date) | |
hour ($date) | |
minute ($date) | |
second ($date) | |
noWait () | |
limit ($limit=0) | |
offset ($offset=0) | |
returning ($pkCol) | |
processLimit ($query, $limit, $offset=0) | |
dateAdd ($date, $interval, $datePart) | |
Variables | |
trait | MysqlQueryBuilder |
trait | PostgresqlQueryBuilder |
$forShare | |
$noWait | |
$limit | |
$offset | |
$returning | |
Part of the Joomla Framework Database Package
Joomla\Database\Query\__toString | ( | ) |
Magic function to convert the query to a string, only for PostgreSQL specific queries
Références $query, $this, elseif, Joomla\Database\Query\forShare(), Joomla\Database\Query\forUpdate(), Joomla\Database\Query\limit(), Joomla\Database\Query\noWait(), null, Joomla\Database\Query\offset(), Joomla\Database\Query\processLimit(), Joomla\Database\Query\returning(), et Joomla\Database\Query\selectRowNumber().
Référencé par SqliteQuery\__toString(), OtherObject\__toString(), ByteStringWithChunkObject\__toString(), TextStringWithChunkObject\__toString(), SignedIntegerObject\__toString(), UnsignedIntegerObject\__toString(), TagObject\__toString(), SqlsrvQuery\__toString(), InfiniteListObject\__toString(), InfiniteMapObject\__toString(), ByteStringObject\__toString(), TextStringObject\__toString(), MapObject\__toString(), ListObject\__toString(), et EC\__toString().
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. |
Référencé par SqlsrvQuery\castAs().
Joomla\Database\Query\clear | ( | $clause = null | ) |
Clear data from the query or a specific clause of the query.
string | $clause | Optionally, the name of the clause to clear, or nothing to clear the whole query. |
Références $this, Joomla\Database\Query\forShare(), Joomla\Database\Query\forUpdate(), Joomla\Database\Query\limit(), Joomla\Database\Query\noWait(), null, Joomla\Database\Query\offset(), et Joomla\Database\Query\returning().
Référencé par Session\clear().
Joomla\Database\Query\concatenate | ( | $values, | |
$separator = null |
|||
) |
Concatenates an array of column names or values.
Usage: $query->select($query->concatenate(array('a', 'b')));
string[] | $values An array of values to concatenate. | |
string | null | $separator | As separator to place between each value. |
Références $separator, et null.
Joomla\Database\Query\currentTimestamp | ( | ) |
Gets the current date and time.
Joomla\Database\Query\dateAdd | ( | $date, | |
$interval, | |||
$datePart | |||
) |
Add to the current date and time.
Usage: $query->select($query->dateAdd());
Prefixing the interval with a - (negative sign) will cause subtraction to be used.
string | $date | The db quoted string representation of the date to add to |
string | $interval | The string representation of the appropriate number of units |
string | $datePart | The part of the date to perform the addition on |
Références $date.
Joomla\Database\Query\day | ( | $date | ) |
Used to get a string to extract day from date column.
Usage: $query->select($query->day($query->quoteName('dateColumn')));
string | $date | Date column containing day to be extracted. |
Références $date.
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. |
Références $value.
Joomla\Database\Query\forShare | ( | $tableName, | |
$glue = ',' |
|||
) |
Sets the FOR SHARE lock on select's output row
string | $tableName | The table to lock |
string | $glue | The glue by which to join the conditions. Defaults to ',' . |
Référencé par Joomla\Database\Query\__toString(), et Joomla\Database\Query\clear().
Joomla\Database\Query\forUpdate | ( | $tableName, | |
$glue = ',' |
|||
) |
Sets the FOR UPDATE lock on select's output row
string | $tableName | The table to lock |
string | $glue | The glue by which to join the conditions. Defaults to ',' . |
Référencé par Joomla\Database\Query\__toString(), et Joomla\Database\Query\clear().
Joomla\Database\Query\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 |
Références $separator.
Joomla\Database\Query\hour | ( | $date | ) |
Used to get a string to extract hour from date column.
Usage: $query->select($query->hour($query->quoteName('dateColumn')));
string | $date | Date column containing hour to be extracted. |
Références $date.
Joomla\Database\Query\limit | ( | $limit = 0 | ) |
Set the LIMIT clause to the query
integer | $limit | Number of rows to return |
Références Joomla\Database\Query\$limit, $this, et null.
Référencé par SourceContextProvider\__construct(), Pagination\__construct(), SqliteQuery\__toString(), SqlsrvQuery\__toString(), Joomla\Database\Query\__toString(), DatabaseQuery\__toString(), Pagination\_buildDataObject(), Joomla\Database\Query\clear(), DatabaseQuery\clear(), PdoDriver\connected(), SourceContextProvider\getContext(), Pagination\getListFooter(), Pagination\getPagesLinks(), Pagination\getPaginationLinks(), Pagination\getPaginationPages(), DatabaseQuery\setLimit(), et DatabaseDriver\setQuery().
Joomla\Database\Query\minute | ( | $date | ) |
Used to get a string to extract minute from date column.
Usage: $query->select($query->minute($query->quoteName('dateColumn')));
string | $date | Date column containing minute to be extracted. |
Références $date.
Joomla\Database\Query\month | ( | $date | ) |
Used to get a string to extract month from date column.
Usage: $query->select($query->month($query->quoteName('dateColumn')));
string | $date | Date column containing month to be extracted. |
Références $date.
Joomla\Database\Query\noWait | ( | ) |
Sets the NOWAIT lock on select's output row
Référencé par Joomla\Database\Query\__toString(), et Joomla\Database\Query\clear().
Joomla\Database\Query\offset | ( | $offset = 0 | ) |
Set the OFFSET clause to the query
integer | $offset | An integer for skipping rows |
Références Joomla\Database\Query\$offset, $this, et null.
Référencé par ParserException\__construct(), RelativeStream\__construct(), SqliteQuery\__toString(), SqlsrvQuery\__toString(), Joomla\Database\Query\__toString(), DatabaseQuery\__toString(), Parser\cleanup(), Joomla\Database\Query\clear(), DatabaseQuery\clear(), PdoDriver\connected(), Parser\doParse(), Parser\isCurrentLineLastLineInDocument(), Parser\parse(), RelativeStream\seek(), DatabaseQuery\setLimit(), et DatabaseDriver\setQuery().
Joomla\Database\Query\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 |
Références Joomla\Database\Query\$limit, Joomla\Database\Query\$offset, et $query.
Référencé par Joomla\Database\Query\__toString().
rand | ( | ) |
Get the function to return a random floating-point value
Usage: $query->rand();
Référencé par ArticlesCategoryHelper\getList().
regexp | ( | $value | ) |
Get the regular expression operator
Usage: $query->where('field ' . $query->regexp($search));
string | $value | The regex pattern. |
Références $value.
Joomla\Database\Query\returning | ( | $pkCol | ) |
Add the RETURNING element to INSERT INTO statement.
mixed | $pkCol | The name of the primary key column. |
Référencé par Joomla\Database\Query\__toString(), et Joomla\Database\Query\clear().
Joomla\Database\Query\second | ( | $date | ) |
Used to get a string to extract seconds from date column.
Usage: $query->select($query->second($query->quoteName('dateColumn')));
string | $date | Date column containing second to be extracted. |
Références $date.
Joomla\Database\Query\selectRowNumber | ( | $orderBy, | |
$orderColumnAlias | |||
) |
Return the number of the current row.
Usage: $query->select('id'); $query->selectRowNumber('ordering,publish_up DESC', 'new_ordering'); $query->from('#__content');
string | $orderBy | An expression of ordering for window function. |
string | $orderColumnAlias | An alias for new ordering column. |
Référencé par Joomla\Database\Query\__toString().
Joomla\Database\Query\year | ( | $date | ) |
Used to get a string to extract year from date column.
Usage: $query->select($query->year($query->quoteName('dateColumn')));
string | $date | Date column containing year to be extracted. |
Références $date.
|
protected |
|
protected |
Référencé par Joomla\Database\Query\limit(), et Joomla\Database\Query\processLimit().
|
protected |
|
protected |
Référencé par Pagination\_buildDataObject(), Stream\_stream_seek(), Tobscure\JsonApi\addPaginationLink(), Tobscure\JsonApi\addPaginationLinks(), AbstractString\after(), AbstractString\afterLast(), ASN1\asn1map(), PHPMailer\base64EncodeWrapMB(), AbstractString\before(), AbstractString\beforeLast(), ActionlogsModel\buildDateRange(), UsersModel\buildDateRange(), ByteString\bytesAt(), QuestionHelper\cloneInputStream(), CodePointString\codePointsAt(), SymmetricKey\decrypt(), HtmlView\display(), JsonapiView\displayList(), ASN1\encode_der(), CalendarField\filter(), FileStorage\find(), RedisStorage\find(), MemcachedStorage\find(), OpenHandler\find(), PdoStorage\find(), OutputFormatter\formatAndWrap(), SFTP\get(), Totp\getCode(), Adapter\getItems(), TagsModel\getListQuery(), Parameters\getOffset(), AbstractField\getRangeForExpression(), Grapheme\grapheme_position(), Grapheme\grapheme_stripos(), Grapheme\grapheme_strpos(), Grapheme\grapheme_strripos(), Grapheme\grapheme_strrpos(), Iconv\iconv_strpos(), CodePointString\indexOf(), UnicodeString\indexOf(), ByteString\indexOf(), AbstractString\indexOf(), CodePointString\indexOfLast(), UnicodeString\indexOfLast(), ByteString\indexOfLast(), AbstractString\indexOfLast(), PuTTY\load(), DatabaseDriver\loadColumn(), ByteString\match(), Mbstring\mb_stripos(), Mbstring\mb_strpos(), Mbstring\mb_strripos(), Mbstring\mb_strrpos(), Nested\moveByReference(), Joomla\Database\Query\offset(), Construct\offsetExists(), ParagonIE_Sodium_Core_Curve25519_Fe\offsetExists(), ParagonIE_Sodium_Core_ChaCha20_Ctx\offsetExists(), Collection\offsetExists(), ParagonIE_Sodium_Core32_ChaCha20_Ctx\offsetExists(), ParagonIE_Sodium_Core32_Curve25519_Fe\offsetExists(), DataShapeObject\offsetExists(), Feed\offsetExists(), Registry\offsetExists(), DataSet\offsetExists(), Construct\offsetGet(), Collection\offsetGet(), ParagonIE_Sodium_Core_Curve25519_Fe\offsetGet(), ParagonIE_Sodium_Core_ChaCha20_Ctx\offsetGet(), ParagonIE_Sodium_Core32_ChaCha20_Ctx\offsetGet(), DataShapeObject\offsetGet(), Feed\offsetGet(), Registry\offsetGet(), DataSet\offsetGet(), ParagonIE_Sodium_Core_Curve25519_Fe\offsetSet(), ParagonIE_Sodium_Core_ChaCha20_Ctx\offsetSet(), ParagonIE_Sodium_Core32_ChaCha20_Ctx\offsetSet(), Construct\offsetSet(), ParagonIE_Sodium_Core32_Curve25519_Fe\offsetSet(), Collection\offsetSet(), DataShapeObject\offsetSet(), Feed\offsetSet(), Registry\offsetSet(), DataSet\offsetSet(), Construct\offsetUnset(), ParagonIE_Sodium_Core_Curve25519_Fe\offsetUnset(), ParagonIE_Sodium_Core_ChaCha20_Ctx\offsetUnset(), ParagonIE_Sodium_Core32_ChaCha20_Ctx\offsetUnset(), Collection\offsetUnset(), ParagonIE_Sodium_Core32_Curve25519_Fe\offsetUnset(), Feed\offsetUnset(), Registry\offsetUnset(), DataSet\offsetUnset(), Adapter\onBuildIndex(), Hash\poly(), NewsfeedModel\populateState(), TagsModel\populateState(), ArticleModel\populateState(), TagModel\populateState(), Iconv\pregOffset(), Query\processDates(), Joomla\Database\Query\processLimit(), Query\processString(), SFTP\put(), Zip\readZipInfo(), Html\removeBlocks(), Image\resize(), PrivateKey\rsaes_oaep_decrypt(), Image\sanitizeOffset(), Stem\search(), Stream\seek(), BufferStreamHandler\seek_cur(), BufferStreamHandler\seek_end(), BufferStreamHandler\seek_set(), DatabaseDriver\setQuery(), Application\splitStringByWidth(), Buffer\stream_seek(), BufferStreamHandler\stream_seek(), StringWrapper\stream_seek(), StreamString\stream_seek(), PharStreamWrapper\stream_seek(), StringHelper\strpos(), StringHelper\strrpos(), StringHelper\substr(), StringHelper\truncate(), ParagonIE_Sodium_Core32_BLAKE2b\update(), ParagonIE_Sodium_Core_BLAKE2b\update(), utf8_byte_position(), utf8_strpos(), utf8_strrpos(), et utf8_substr().
|
protected |
Référencé par ApcuStorage\lock(), FileStorage\lock(), Cache\lock(), et MemcachedStorage\lock().
trait MysqlQueryBuilder |
Trait for MySQL Query Building.
trait PostgresqlQueryBuilder |