Class JDatabaseQuerySqlsrv

Description

Implements interfaces:

Query Building Class.

  • since: 11.1

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

JDatabaseQuery
   |
   --JDatabaseQuerySqlsrv
Direct descendents
Class Description
 class JDatabaseQuerySqlazure Query Building Class.
Variable Summary
 integer $limit
 string $name_quotes
 string $null_date
 integer $offset
Method Summary
 string castAsChar (string $value)
 string charLength (string $field, [string $operator = null], [string $condition = null])
 string concatenate (array $values, [string $separator = null])
 string currentTimestamp ()
 string dateAdd (datetime $date, string $interval, string $datePart)
 integer length (string $value)
 string processLimit (string $query, integer $limit, [integer $offset = 0])
 JDatabaseQuery setLimit ([integer $limit = 0], [integer $offset = 0])
 string __toString ()
Variables
integer $limit = 0 (line 45)
  • var: The affected row limit for the current SQL statement.
  • since: 3.2 CMS
  • access: protected
string $name_quotes = '`' (line 30)

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: 11.1
  • access: protected

Redefined in descendants as:
  • JDatabaseQuerySqlazure::$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.
string $null_date = '1900-01-01 00:00:00' (line 39)

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: 11.1
  • access: protected
integer $offset = 0 (line 51)
  • var: The affected row offset to apply for the current SQL statement.
  • since: 3.2 CMS
  • 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 160)

Casts a value to a char.

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

  • return: Returns the cast value.
  • since: 11.1
  • 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.
charLength (line 176)

Gets the function to determine the length of a character string.

  • return: The required char length call.
  • since: 11.1
  • access: public
string charLength (string $field, [string $operator = null], [string $condition = null])
  • string $field: A value.
  • string $operator: Comparison operator between charLength integer value and $condition
  • string $condition: Integer value to compare charLength with.

Redefinition of:
JDatabaseQuery::charLength()
Gets the number of characters in a string.
concatenate (line 191)

Concatenates an array of column names or values.

  • return: The concatenated values.
  • since: 11.1
  • 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 210)

Gets the current date and time.

  • since: 11.1
  • access: public
string currentTimestamp ()

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

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.

  • return: The string with the appropriate sql for addition of dates
  • link: for more information
  • since: 13.1
  • access: public
string dateAdd (datetime $date, string $interval, string $datePart)
  • datetime $date: The date to add to; type may be time or datetime.
  • 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.
length (line 224)

Get the length of a string in bytes.

  • since: 11.1
  • access: public
integer length (string $value)
  • string $value: The string to measure.

Redefinition of:
JDatabaseQuery::length()
Get the length of a string in bytes.
processLimit (line 263)

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
setLimit (line 299)

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
JDatabaseQuery 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.
__toString (line 60)

Magic function to convert the query to a string.

  • return: The completed query.
  • since: 11.1
  • 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:14:17 +0100 by phpDocumentor 1.4.3