Class JDatabaseQueryPostgresql

Description

Implements interfaces:

Query Building Class.

  • since: 11.3

Located in /libraries/joomla/database/query/postgresql.php (line 19)

JDatabaseQuery
   |
   --JDatabaseQueryPostgresql
Variable Summary
 object The $forShare
 object The $forUpdate
 object The $limit
 object The $noWait
 object The $offset
 object The $returning
Method Summary
 string castAsChar (string $value)
 JDatabaseQueryPostgresql clear ([string $clause = null])
 string concatenate (array $values, [string $separator = null])
 string currentTimestamp ()
 string dateAdd (datetime $date, string $interval, string $datePart)
 string day (string $date)
 JDatabaseQueryPostgresql forShare (string $table_name, [string $glue = ','])
 JDatabaseQueryPostgresql forUpdate (string $table_name, [string $glue = ','])
 string hour (string $date)
 JDatabaseQueryPostgresql limit ([integer $limit = 0])
 string minute (string $date)
 string month (string $date)
 JDatabaseQueryPostgresql offset ([integer $offset = 0])
 string processLimit (string $query, integer $limit, [integer $offset = 0])
 string second (string $date)
 JDatabaseQueryPostgresql setLimit ([integer $limit = 0], [integer $offset = 0])
 string year (string $date)
 string __toString ()
Variables
object The $forShare = null (line 31)
  • var: FOR SHARE element used in "FOR SHARE" lock
  • since: 11.3
  • access: protected
object The $forUpdate = null (line 25)
  • var: FOR UPDATE element used in "FOR UPDATE" lock
  • since: 11.3
  • access: protected
object The $limit = null (line 43)
  • var: LIMIT element
  • since: 11.3
  • access: protected
object The $noWait = null (line 37)
  • var: NOWAIT element used in "FOR SHARE" and "FOR UPDATE" lock
  • since: 11.3
  • access: protected
object The $offset = null (line 49)
  • var: OFFSET element
  • since: 11.3
  • access: protected
object The $returning = null (line 55)
  • var: RETURNING element of INSERT INTO
  • since: 11.3
  • access: protected

Inherited Variables

Inherited from JDatabaseQuery

JDatabaseQuery::$autoIncrementField
JDatabaseQuery::$call
JDatabaseQuery::$columns
JDatabaseQuery::$db
JDatabaseQuery::$delete
JDatabaseQuery::$element
JDatabaseQuery::$exec
JDatabaseQuery::$from
JDatabaseQuery::$group
JDatabaseQuery::$having
JDatabaseQuery::$insert
JDatabaseQuery::$join
JDatabaseQuery::$order
JDatabaseQuery::$select
JDatabaseQuery::$set
JDatabaseQuery::$sql
JDatabaseQuery::$type
JDatabaseQuery::$union
JDatabaseQuery::$unionAll
JDatabaseQuery::$update
JDatabaseQuery::$values
JDatabaseQuery::$where
Methods
castAsChar (line 273)

Casts a value to a char.

Ensure that the value is properly quoted before passing to the method.

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

  • return: Returns the cast value.
  • since: 11.3
  • access: public
string castAsChar (string $value)
  • string $value: The value to cast as a char.

Redefinition of:
JDatabaseQuery::castAsChar()
Casts a value to a char.
clear (line 200)

Clear data from the query or a specific clause of the query.

  • return: Returns this object to allow chaining.
  • since: 11.3
  • access: public
JDatabaseQueryPostgresql clear ([string $clause = null])
  • string $clause: Optionally, the name of the clause to clear, or nothing to clear the whole query.

Redefinition of:
JDatabaseQuery::clear()
Clear data from the query or a specific clause of the query.
concatenate (line 291)

Concatenates an array of column names or values.

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

  • return: The concatenated values.
  • since: 11.3
  • access: public
string concatenate (array $values, [string $separator = null])
  • array $values: An array of values to concatenate.
  • string $separator: As separator to place between each value.

Redefinition of:
JDatabaseQuery::concatenate()
Concatenates an array of column names or values.
currentTimestamp (line 310)

Gets the current date and time.

  • return: Return string used in query to obtain
  • since: 11.3
  • access: public
string currentTimestamp ()

Redefinition of:
JDatabaseQuery::currentTimestamp()
Gets the current date and time.
dateAdd (line 613)

Add to the current date and time in Postgresql.

Usage: $query->select($query->dateAdd()); Prefixing the interval with a - (negative sign) will cause subtraction to be used.

string dateAdd (datetime $date, string $interval, string $datePart)
  • datetime $date: 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

Redefinition of:
JDatabaseQuery::dateAdd()
Add to the current date and time.
day (line 415)

Used to get a string to extract day from date column.

Usage: $query->select($query->day($query->quoteName('dateColumn')));

  • return: Returns string to extract day from a date.
  • since: 12.1
  • access: public
string day (string $date)
  • string $date: Date column containing day to be extracted.

Redefinition of:
JDatabaseQuery::day()
Used to get a string to extract day from date column.
forShare (line 352)

Sets the FOR SHARE lock on select's output row

  • return: FOR SHARE query element
  • since: 11.3
  • access: public
JDatabaseQueryPostgresql forShare (string $table_name, [string $glue = ','])
  • string $table_name: The table to lock
  • string $glue: The glue by which to join the conditions. Defaults to ',' .
forUpdate (line 325)

Sets the FOR UPDATE lock on select's output row

  • return: FOR UPDATE query element
  • since: 11.3
  • access: public
JDatabaseQueryPostgresql forUpdate (string $table_name, [string $glue = ','])
  • string $table_name: The table to lock
  • string $glue: The glue by which to join the conditions. Defaults to ',' .
hour (line 432)

Used to get a string to extract hour from date column.

Usage: $query->select($query->hour($query->quoteName('dateColumn')));

  • return: Returns string to extract hour from a date.
  • since: 12.1
  • access: public
string hour (string $date)
  • string $date: Date column containing hour to be extracted.

Redefinition of:
JDatabaseQuery::hour()
Used to get a string to extract hour from date column.
limit (line 499)

Set the LIMIT clause to the query

  • return: Returns this object to allow chaining.
  • since: 11.3
  • access: public
JDatabaseQueryPostgresql limit ([integer $limit = 0])
  • integer $limit: An int of how many row will be returned
minute (line 449)

Used to get a string to extract minute from date column.

Usage: $query->select($query->minute($query->quoteName('dateColumn')));

  • return: Returns string to extract minute from a date.
  • since: 12.1
  • access: public
string minute (string $date)
  • string $date: Date column containing minute to be extracted.

Redefinition of:
JDatabaseQuery::minute()
Used to get a string to extract minute from date column.
month (line 398)

Used to get a string to extract month from date column.

Usage: $query->select($query->month($query->quoteName('dateColumn')));

  • return: Returns string to extract month from a date.
  • since: 12.1
  • access: public
string month (string $date)
  • string $date: Date column containing month to be extracted.

Redefinition of:
JDatabaseQuery::month()
Used to get a string to extract month from date column.
noWait (line 478)

Sets the NOWAIT lock on select's output row

  • return: NO WAIT query element
  • since: 11.3
  • access: public
offset (line 518)

Set the OFFSET clause to the query

  • return: Returns this object to allow chaining.
  • since: 11.3
  • access: public
JDatabaseQueryPostgresql offset ([integer $offset = 0])
  • integer $offset: An int for skipping row
processLimit (line 582)

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.

  • since: 12.1
  • access: public
string processLimit (string $query, integer $limit, [integer $offset = 0])
  • string $query: The query in string format
  • integer $limit: The limit for the result set
  • integer $offset: The offset for the result set

Implementation of:
JDatabaseQueryLimitable::processLimit()
Method to modify a query already in string format with the needed
returning (line 537)

Add the RETURNING element to INSERT INTO statement.

  • return: Returns this object to allow chaining.
  • since: 11.3
  • access: public
JDatabaseQueryPostgresql returning (mixed $pkCol)
  • mixed $pkCol: The name of the primary key column.
second (line 466)

Used to get a string to extract seconds from date column.

Usage: $query->select($query->second($query->quoteName('dateColumn')));

  • return: Returns string to extract second from a date.
  • since: 12.1
  • access: public
string second (string $date)
  • string $date: Date column containing second to be extracted.

Redefinition of:
JDatabaseQuery::second()
Used to get a string to extract seconds from date column.
setLimit (line 561)

Sets the offset and limit for the result set, if the database driver supports it.

Usage: $query->setLimit(100, 0); (retrieve 100 rows, starting at first record) $query->setLimit(50, 50); (retrieve 50 rows, starting at 50th record)

  • return: Returns this object to allow chaining.
  • since: 12.1
  • access: public
JDatabaseQueryPostgresql setLimit ([integer $limit = 0], [integer $offset = 0])
  • integer $limit: The limit for the result set
  • integer $offset: The offset for the result set

Implementation of:
JDatabaseQueryLimitable::setLimit()
Sets the offset and limit for the result set, if the database driver supports it.
year (line 381)

Used to get a string to extract year from date column.

Usage: $query->select($query->year($query->quoteName('dateColumn')));

  • return: Returns string to extract year from a date.
  • since: 12.1
  • access: public
string year (string $date)
  • string $date: Date column containing year to be extracted.

Redefinition of:
JDatabaseQuery::year()
Used to get a string to extract year from date column.
__toString (line 64)

Magic function to convert the query to a string, only for postgresql specific query

  • return: The completed query.
  • since: 11.3
  • access: public
string __toString ()

Redefinition of:
JDatabaseQuery::__toString()
Magic function to convert the query to a string.

Inherited Methods

Inherited From JDatabaseQuery

 JDatabaseQuery::__construct()
 JDatabaseQuery::call()
 JDatabaseQuery::castAsChar()
 JDatabaseQuery::charLength()
 JDatabaseQuery::clear()
 JDatabaseQuery::columns()
 JDatabaseQuery::concatenate()
 JDatabaseQuery::currentTimestamp()
 JDatabaseQuery::dateAdd()
 JDatabaseQuery::dateFormat()
 JDatabaseQuery::day()
 JDatabaseQuery::delete()
 JDatabaseQuery::dump()
 JDatabaseQuery::escape()
 JDatabaseQuery::exec()
 JDatabaseQuery::format()
 JDatabaseQuery::from()
 JDatabaseQuery::group()
 JDatabaseQuery::having()
 JDatabaseQuery::hour()
 JDatabaseQuery::innerJoin()
 JDatabaseQuery::insert()
 JDatabaseQuery::join()
 JDatabaseQuery::leftJoin()
 JDatabaseQuery::length()
 JDatabaseQuery::minute()
 JDatabaseQuery::month()
 JDatabaseQuery::nullDate()
 JDatabaseQuery::order()
 JDatabaseQuery::outerJoin()
 JDatabaseQuery::quote()
 JDatabaseQuery::quoteName()
 JDatabaseQuery::rightJoin()
 JDatabaseQuery::second()
 JDatabaseQuery::select()
 JDatabaseQuery::set()
 JDatabaseQuery::setQuery()
 JDatabaseQuery::union()
 JDatabaseQuery::unionAll()
 JDatabaseQuery::unionDistinct()
 JDatabaseQuery::update()
 JDatabaseQuery::values()
 JDatabaseQuery::where()
 JDatabaseQuery::year()
 JDatabaseQuery::__call()
 JDatabaseQuery::__clone()
 JDatabaseQuery::__get()
 JDatabaseQuery::__toString()

Documentation generated on Tue, 19 Nov 2013 15:11:01 +0100 by phpDocumentor 1.4.3