[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/database/src/Sqlite/ -> SqliteQuery.php (summary)

Part of the Joomla Framework Database Package

Copyright: Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 285 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

SqliteQuery:: (7 methods):
  __toString()
  charLength()
  concatenate()
  processLimit()
  selectRowNumber()
  union()
  groupConcat()


Class: SqliteQuery  - X-Ref

SQLite Query Building Class.

__toString()   X-Ref
Magic function to convert the query to a string.

return: string  The completed query.

charLength($field, $operator = null, $condition = null)   X-Ref
Gets the number of characters in a string.

Note, use 'length' to find the number of bytes in a string.

Usage:
$query->select($query->charLength('a'));

param: string       $field      A value.
param: string|null  $operator   Comparison operator between charLength integer value and $condition
param: string|null  $condition  Integer value to compare charLength with.
return: string  The required char length call.

concatenate($values, $separator = null)   X-Ref
Concatenates an array of column names or values.

Usage:
$query->select($query->concatenate(array('a', 'b')));

param: string[]     $values     An array of values to concatenate.
param: string|null  $separator  As separator to place between each value.
return: string  The concatenated values.

processLimit($query, $limit, $offset = 0)   X-Ref
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.

param: string   $query   The query in string format
param: integer  $limit   The limit for the result set
param: integer  $offset  The offset for the result set
return: string

selectRowNumber($orderBy, $orderColumnAlias)   X-Ref
Return the number of the current row.

Usage:
$query->select('id');
$query->selectRowNumber('ordering,publish_up DESC', 'new_ordering');
$query->from('#__content');

param: string  $orderBy           An expression of ordering for window function.
param: string  $orderColumnAlias  An alias for new ordering column.
return: $this

union($query, $distinct = true)   X-Ref
Add a query to UNION with the current query.

Usage:
$query->union('SELECT name FROM  #__foo')
$query->union('SELECT name FROM  #__foo', true)

param: DatabaseQuery|string  $query     The DatabaseQuery object or string to union.
param: boolean               $distinct  True to only return distinct rows from the union.
return: $this

groupConcat($expression, $separator = ',')   X-Ref
Aggregate function to get input values concatenated into a string, separated by delimiter

Usage:
$query->groupConcat('id', ',');

param: string  $expression  The expression to apply concatenation to, this may be a column name or complex SQL statement.
param: string  $separator   The delimiter of each concatenated value
return: string  Input values concatenated into a string, separated by delimiter



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer