Test to see if the SQLSRV connector is available.
static
boolean
test
()
Constructor.
JDatabaseSQLSrv
__construct
(array $options)
-
array
$options: List of options used to configure the connection
Redefinition of:
- JDatabase::__construct()
- Constructor.
Destructor.
void
__destruct
()
Method to check and see if a field exists in a table.
boolean
checkFieldExists
(string $table, string $field)
-
string
$table: The table in which to verify the field.
-
string
$field: The field to verify.
Determines if the connection to the server is active.
boolean
connected
()
Redefinition of:
- JDatabase::connected()
- Determines if the connection to the server is active.
Drops a table from the database.
-
string
$tableName: The name of the database table to drop.
-
boolean
$ifExists: Optionally specify that the table must exist before it is dropped.
Redefinition of:
- JDatabase::dropTable()
- Drops a table from the database.
Method to escape a string for usage in an SQL statement.
The escaping for MSSQL isn't handled in the driver though that would be nice. Because of this we need to handle the escaping ourselves.
string
escape
(string $text, [boolean $extra = false])
-
string
$text: The string to be escaped.
-
boolean
$extra: Optional parameter to provide extra escaping.
Redefinition of:
- JDatabase::escape()
- Method to escape a string for usage in an SQL statement.
Execute the SQL statement.
mixed
execute
()
Redefinition of:
- JDatabase::execute()
- Execute the SQL statement.
Diagnostic method to return explain information for a query.
string
explain
()
Redefinition of:
- JDatabase::explain()
- Diagnostic method to return explain information for a query.
Method to fetch a row from the result set cursor as an array.
mixed
fetchArray
([mixed $cursor = null])
-
mixed
$cursor: The optional result set cursor from which to fetch the row.
Redefinition of:
- JDatabase::fetchArray()
- Method to fetch a row from the result set cursor as an array.
Method to fetch a row from the result set cursor as an associative array.
mixed
fetchAssoc
([mixed $cursor = null])
-
mixed
$cursor: The optional result set cursor from which to fetch the row.
Redefinition of:
- JDatabase::fetchAssoc()
- Method to fetch a row from the result set cursor as an associative array.
Method to fetch a row from the result set cursor as an object.
mixed
fetchObject
([mixed $cursor = null], [string $class = 'stdClass'])
-
mixed
$cursor: The optional result set cursor from which to fetch the row.
-
string
$class: The class name to use for the returned row object.
Redefinition of:
- JDatabase::fetchObject()
- Method to fetch a row from the result set cursor as an object.
Method to free up the memory used for the result set.
void
freeResult
([mixed $cursor = null])
-
mixed
$cursor: The optional result set cursor from which to fetch the row.
Redefinition of:
- JDatabase::freeResult()
- Method to free up the memory used for the result set.
Get the number of affected rows for the previous executed SQL statement.
integer
getAffectedRows
()
Redefinition of:
- JDatabase::getAffectedRows()
- Get the number of affected rows for the previous executed SQL statement.
Method to get the database collation in use by sampling a text field of a table in the database.
mixed
getCollation
()
Redefinition of:
- JDatabase::getCollation()
- Method to get the database collation in use by sampling a text field of a table in the database.
Gets an exporter class object.
JDatabaseExporterSQLAzure
getExporter
()
Gets an importer class object.
JDatabaseImporterSQLAzure
getImporter
()
Get the number of returned rows for the previous executed SQL statement.
integer
getNumRows
([resource $cursor = null])
-
resource
$cursor: An optional database cursor resource to extract the row count from.
Redefinition of:
- JDatabase::getNumRows()
- Get the number of returned rows for the previous executed SQL statement.
Get the current or query, or new JDatabaseQuery object.
mixed
getQuery
([boolean $new = false])
-
boolean
$new: False to return the last query set, True to return a new JDatabaseQuery object.
Redefinition of:
- JDatabase::getQuery()
- Get the current query object or a new JDatabaseQuery object.
Redefined in descendants as:
Retrieves field information about the given tables.
array
getTableColumns
(mixed $table, [boolean $typeOnly = true])
-
mixed
$table: A table name
-
boolean
$typeOnly: True to only return field types.
Redefinition of:
- JDatabase::getTableColumns()
- Retrieves field information about the given tables.
Get table constraints
array
getTableConstraints
(string $tableName)
-
string
$tableName: The name of the database table.
Shows the table CREATE statement that creates the given tables.
This is unsupported by MSSQL.
array
getTableCreate
(mixed $tables)
-
mixed
$tables: A table name or a list of table names.
Redefinition of:
- JDatabase::getTableCreate()
- Shows the table CREATE statement that creates the given tables.
Get the details list of keys for a table.
array
getTableKeys
(string $table)
-
string
$table: The name of the table.
Redefinition of:
- JDatabase::getTableKeys()
- Retrieves field information about the given tables.
Method to get an array of all tables in the database.
array
getTableList
()
Redefinition of:
- JDatabase::getTableList()
- Method to get an array of all tables in the database.
Get the version of the database connector.
string
getVersion
()
Redefinition of:
- JDatabase::getVersion()
- Get the version of the database connector
Determines if the database engine supports UTF-8 character encoding.
boolean
hasUTF
()
Redefinition of:
- JDatabase::hasUTF()
- Determines if the database engine supports UTF-8 character encoding.
Method to get the auto-incremented value from the last INSERT statement.
integer
insertid
()
Redefinition of:
- JDatabase::insertid()
- Method to get the auto-incremented value from the last INSERT statement.
Inserts a row into a table based on an object's properties.
boolean
insertObject
(string $table, object &$object, [string $key = null])
-
string
$table: The name of the database table to insert into.
-
object
&$object: A reference to an object whose public properties match the table fields.
-
string
$key: The name of the primary key. If provided the object property is updated.
Redefinition of:
- JDatabase::insertObject()
- Inserts a row into a table based on an object's properties.
Method to wrap an SQL statement to provide a LIMIT and OFFSET behavior for scrolling through a result set.
string
limit
(string $sql, integer $limit, integer $offset)
-
string
$sql: The SQL statement to process.
-
integer
$limit: The maximum affected rows to set.
-
integer
$offset: The affected row offset to set.
Method to get the first field of the first row of the result set from the database query.
mixed
loadResult
()
Redefinition of:
- JDatabase::loadResult()
- Method to get the first field of the first row of the result set from the database query.
Locks a table in the database.
-
string
$tableName: The name of the table to lock.
Redefinition of:
- JDatabase::lockTable()
- Locks a table in the database.
Execute a query batch.
mixed
queryBatch
([boolean $abortOnError = true], [boolean $transactionSafe = false])
-
boolean
$abortOnError: Abort on error.
-
boolean
$transactionSafe: Transaction safe queries.
Redefinition of:
- JDatabase::queryBatch()
- Execute a query batch.
Method to quote and optionally escape a string to database requirements for insertion into the database.
string
quote
(string $text, [boolean $escape = true])
-
string
$text: The string to quote.
-
boolean
$escape: True to escape the string, false to leave it unchanged.
Redefinition of:
- JDatabase::quote()
- Method to quote and optionally escape a string to database requirements for insertion into the database.
Rename constraints.
void
renameConstraints
([array $constraints = array()], [string $prefix = null], [string $backup = null])
-
array
$constraints: Array(strings) of table constraints
-
string
$prefix: A string
-
string
$backup: A string
Renames a table in the database.
JDatabase
renameTable
(
string $oldTable,
string $newTable, [
string $backup =
null], [
string $prefix =
null])
-
string
$oldTable: The name of the table to be renamed
-
string
$newTable: The new name for the table.
-
string
$backup: Table prefix
-
string
$prefix: For the table - used to rename constraints in non-mysql databases
Redefinition of:
- JDatabase::renameTable()
- Renames a table in the database.
This function replaces a string identifier $prefix with the string held is the tablePrefix class variable.
string
replacePrefix
(string $sql, [string $prefix = '#__'])
-
string
$sql: The SQL statement to prepare.
-
string
$prefix: The common table prefix.
Redefinition of:
- JDatabase::replacePrefix()
- This function replaces a string identifier $prefix with the string held is the tablePrefix class variable.
Select a database for use.
boolean
select
(string $database)
-
string
$database: The name of the database to select for use.
Redefinition of:
- JDatabase::select()
- Select a database for use.
Set the connection to use UTF-8 character encoding.
boolean
setUTF
()
Redefinition of:
- JDatabase::setUTF()
- Set the connection to use UTF-8 character encoding.
Inherited Methods
Inherited From JDatabase
JDatabase::__construct()
JDatabase::addQuoted()
JDatabase::connected()
JDatabase::debug()
JDatabase::dropTable()
JDatabase::escape()
JDatabase::execute()
JDatabase::explain()
JDatabase::fetchArray()
JDatabase::fetchAssoc()
JDatabase::fetchObject()
JDatabase::freeResult()
JDatabase::getAffectedRows()
JDatabase::getCollation()
JDatabase::getConnection()
JDatabase::getConnectors()
JDatabase::getCount()
JDatabase::getDatabase()
JDatabase::getDateFormat()
JDatabase::getErrorMsg()
JDatabase::getErrorNum()
JDatabase::getEscaped()
JDatabase::getInstance()
JDatabase::getLog()
JDatabase::getMinimum()
JDatabase::getNullDate()
JDatabase::getNumRows()
JDatabase::getPrefix()
JDatabase::getQuery()
JDatabase::getTableColumns()
JDatabase::getTableCreate()
JDatabase::getTableFields()
JDatabase::getTableKeys()
JDatabase::getTableList()
JDatabase::getTicker()
JDatabase::getUTFSupport()
JDatabase::getVersion()
JDatabase::hasUTF()
JDatabase::insertid()
JDatabase::insertObject()
JDatabase::isMinimumVersion()
JDatabase::isQuoted()
JDatabase::loadAssoc()
JDatabase::loadAssocList()
JDatabase::loadColumn()
JDatabase::loadNextObject()
JDatabase::loadNextRow()
JDatabase::loadObject()
JDatabase::loadObjectList()
JDatabase::loadResult()
JDatabase::loadResultArray()
JDatabase::loadRow()
JDatabase::loadRowList()
JDatabase::lockTable()
JDatabase::nameQuote()
JDatabase::query()
JDatabase::queryBatch()
JDatabase::quote()
JDatabase::quoteName()
JDatabase::quoteNameStr()
JDatabase::renameTable()
JDatabase::replacePrefix()
JDatabase::select()
JDatabase::setDebug()
JDatabase::setQuery()
JDatabase::setUTF()
JDatabase::splitSql()
JDatabase::stderr()
JDatabase::transactionCommit()
JDatabase::transactionRollback()
JDatabase::transactionStart()
JDatabase::truncateTable()
JDatabase::unlockTables()
JDatabase::updateObject()
JDatabase::__call()