|
| __construct ($options) |
|
| __destruct () |
|
| connect () |
|
| disconnect () |
|
| escape ($text, $extra=false) |
|
| connected () |
|
| dropTable ($tableName, $ifExists=true) |
|
| getAffectedRows () |
|
| getCollation () |
|
| getConnectionCollation () |
|
| getNumRows ($cursor=null) |
|
| getTableColumns ($table, $typeOnly=true) |
|
| getTableCreate ($tables) |
|
| getTableKeys ($table) |
|
| getTableList () |
|
| getVersion () |
|
| insertObject ($table, &$object, $key=null) |
|
| insertid () |
|
| loadResult () |
|
| execute () |
|
| replacePrefix ($query, $prefix='#__') |
|
| select ($database) |
|
| setUtf () |
|
| transactionCommit ($toSavepoint=false) |
|
| transactionRollback ($toSavepoint=false) |
|
| transactionStart ($asSavepoint=false) |
|
| renameTable ($oldTable, $newTable, $backup=null, $prefix=null) |
|
| lockTable ($tableName) |
|
| unlockTables () |
|
| __call ($method, $args) |
|
| __construct ($options) |
|
| alterDbCharacterSet ($dbName) |
|
| alterTableCharacterSet ($tableName, $rethrow=false) |
|
| connect () |
|
| connected () |
|
| createDatabase ($options, $utf=true) |
|
| disconnect () |
|
| addDisconnectHandler ($callable) |
|
| dropTable ($table, $ifExists=true) |
|
| escape ($text, $extra=false) |
|
| getAffectedRows () |
|
| getAlterDbCharacterSet ($dbName) |
|
| getAlterTableCharacterSet ($tableName) |
|
| convertUtf8mb4QueryToUtf8 ($query) |
|
| getCollation () |
|
| getConnectionCollation () |
|
| getConnection () |
|
| getCount () |
|
| getDateFormat () |
|
| getLog () |
|
| getTimings () |
|
| getCallStacks () |
|
| getMinimum () |
|
| getNullDate () |
|
| getNumRows ($cursor=null) |
|
| getPrefix () |
|
| getExporter () |
|
| getImporter () |
|
| getName () |
|
| getServerType () |
|
| getQuery ($new=false) |
|
| getIterator ($column=null, $class='stdClass') |
|
| getTableColumns ($table, $typeOnly=true) |
|
| getTableCreate ($tables) |
|
| getTableKeys ($tables) |
|
| getTableList () |
|
| getUTFSupport () |
|
| hasUTFSupport () |
|
| hasUTF8mb4Support () |
|
| getVersion () |
|
| insertid () |
|
| insertObject ($table, &$object, $key=null) |
|
| isMinimumVersion () |
|
| loadAssoc () |
|
| loadAssocList ($key=null, $column=null) |
|
| loadColumn ($offset=0) |
|
| loadNextObject ($class='stdClass') |
|
| loadNextRow () |
|
| loadObject ($class='stdClass') |
|
| loadObjectList ($key='', $class='stdClass') |
|
| loadResult () |
|
| loadRow () |
|
| loadRowList ($key=null) |
|
| lockTable ($tableName) |
|
| quote ($text, $escape=true) |
|
| quoteName ($name, $as=null) |
|
| replacePrefix ($sql, $prefix='#__') |
|
| renameTable ($oldTable, $newTable, $backup=null, $prefix=null) |
|
| select ($database) |
|
| setDebug ($level) |
|
| setQuery ($query, $offset=0, $limit=0) |
|
| setUtf () |
|
| transactionCommit ($toSavepoint=false) |
|
| transactionRollback ($toSavepoint=false) |
|
| transactionStart ($asSavepoint=false) |
|
| truncateTable ($table) |
|
| updateObject ($table, &$object, $key, $nulls=false) |
|
| execute () |
|
| unlockTables () |
|
| query () |
|
| getErrorMsg ($escaped=false) |
|
| getErrorNum () |
|
| stderr ($showSQL=false) |
|
◆ __construct()
Constructor.
- Paramètres
-
array | $options | List of options used to configure the connection |
- Depuis
- 12.1
Références $options.
◆ __destruct()
◆ checkFieldExists()
checkFieldExists |
( |
|
$table, |
|
|
|
$field |
|
) |
| |
|
protected |
Method to check and see if a field exists in a table.
- Paramètres
-
string | $table | The table in which to verify the field. |
string | $field | The field to verify. |
- Renvoie
- boolean True if the field exists in the table.
- Depuis
- 12.1
Références $query.
◆ connect()
Connects to the database if needed.
- Renvoie
- void Returns void if the database connected successfully.
- Depuis
- 12.1
- Exceptions
-
Références $config.
◆ connected()
Determines if the connection to the server is active.
- Renvoie
- boolean True if connected to the database engine.
- Depuis
- 12.1
◆ disconnect()
Disconnects the database.
- Renvoie
- void
- Depuis
- 12.1
Références null.
◆ dropTable()
dropTable |
( |
|
$tableName, |
|
|
|
$ifExists = true |
|
) |
| |
Drops a table from the database.
- Paramètres
-
string | $tableName | The name of the database table to drop. |
boolean | $ifExists | Optionally specify that the table must exist before it is dropped. |
- Renvoie
- FOFDatabaseDriverSqlsrv Returns this object to support chaining.
- Depuis
- 12.1
Références $query.
◆ escape()
escape |
( |
|
$text, |
|
|
|
$extra = false |
|
) |
| |
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.
- Paramètres
-
string | $text | The string to be escaped. |
boolean | $extra | Optional parameter to provide extra escaping. |
- Renvoie
- string The escaped string.
- Depuis
- 12.1
Références $text.
◆ execute()
Execute the SQL statement.
- Renvoie
- mixed A database cursor resource on success, boolean false on failure.
- Depuis
- 12.1
- Exceptions
-
RuntimeException | |
Exception | |
Références $query, et null.
◆ fetchArray()
fetchArray |
( |
|
$cursor = null | ) |
|
|
protected |
Method to fetch a row from the result set cursor as an array.
- Paramètres
-
mixed | $cursor | The optional result set cursor from which to fetch the row. |
- Renvoie
- mixed Either the next row from the result set or false if there are no more rows.
- Depuis
- 12.1
◆ fetchAssoc()
fetchAssoc |
( |
|
$cursor = null | ) |
|
|
protected |
Method to fetch a row from the result set cursor as an associative array.
- Paramètres
-
mixed | $cursor | The optional result set cursor from which to fetch the row. |
- Renvoie
- mixed Either the next row from the result set or false if there are no more rows.
- Depuis
- 12.1
◆ fetchObject()
fetchObject |
( |
|
$cursor = null , |
|
|
|
$class = 'stdClass' |
|
) |
| |
|
protected |
Method to fetch a row from the result set cursor as an object.
- Paramètres
-
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. |
- Renvoie
- mixed Either the next row from the result set or false if there are no more rows.
- Depuis
- 12.1
Références $class.
◆ freeResult()
freeResult |
( |
|
$cursor = null | ) |
|
|
protected |
Method to free up the memory used for the result set.
- Paramètres
-
mixed | $cursor | The optional result set cursor from which to fetch the row. |
- Renvoie
- void
- Depuis
- 12.1
◆ getAffectedRows()
Get the number of affected rows for the previous executed SQL statement.
- Renvoie
- integer The number of affected rows.
- Depuis
- 12.1
◆ getCollation()
Method to get the database collation in use by sampling a text field of a table in the database.
- Renvoie
- mixed The collation in use by the database or boolean false if not supported.
- Depuis
- 12.1
◆ getConnectionCollation()
getConnectionCollation |
( |
| ) |
|
Method to get the database connection collation, as reported by the driver. If the connector doesn't support reporting this value please return an empty string.
- Renvoie
- string
◆ getErrorMessage()
getErrorMessage |
( |
|
$query | ) |
|
|
protected |
Return the actual SQL Error message
- Paramètres
-
string | $query | The SQL Query that fails |
- Renvoie
- string The SQL Error message
- Depuis
- 3.4.6
Références $query.
◆ getErrorNumber()
Return the actual SQL Error number
- Renvoie
- integer The SQL Error number
- Depuis
- 3.4.6
◆ getNumRows()
getNumRows |
( |
|
$cursor = null | ) |
|
Get the number of returned rows for the previous executed SQL statement.
- Paramètres
-
resource | $cursor | An optional database cursor resource to extract the row count from. |
- Renvoie
- integer The number of returned rows.
- Depuis
- 12.1
◆ getTableColumns()
getTableColumns |
( |
|
$table, |
|
|
|
$typeOnly = true |
|
) |
| |
Retrieves field information about the given tables.
- Paramètres
-
mixed | $table | A table name |
boolean | $typeOnly | True to only return field types. |
- Renvoie
- array An array of fields.
- Depuis
- 12.1
- Exceptions
-
Références $field, et $fields.
◆ getTableConstraints()
getTableConstraints |
( |
|
$tableName | ) |
|
|
protected |
Get table constraints
- Paramètres
-
string | $tableName | The name of the database table. |
- Renvoie
- array Any constraints available for the table.
- Depuis
- 12.1
Références $query.
◆ getTableCreate()
getTableCreate |
( |
|
$tables | ) |
|
Shows the table CREATE statement that creates the given tables.
This is unsupported by MSSQL.
- Paramètres
-
mixed | $tables | A table name or a list of table names. |
- Renvoie
- array A list of the create SQL for the tables.
- Depuis
- 12.1
- Exceptions
-
◆ getTableKeys()
Get the details list of keys for a table.
- Paramètres
-
string | $table | The name of the table. |
- Renvoie
- array An array of the column specification for the table.
- Depuis
- 12.1
- Exceptions
-
◆ getTableList()
Method to get an array of all tables in the database.
- Renvoie
- array An array of all the tables in the database.
- Depuis
- 12.1
- Exceptions
-
◆ getVersion()
Get the version of the database connector.
- Renvoie
- string The database connector version.
- Depuis
- 12.1
Références $version.
◆ insertid()
Method to get the auto-incremented value from the last INSERT statement.
- Renvoie
- integer The value of the auto-increment field from the last inserted row.
- Depuis
- 12.1
◆ insertObject()
insertObject |
( |
|
$table, |
|
|
& |
$object, |
|
|
|
$key = null |
|
) |
| |
Inserts a row into a table based on an object's properties.
- Paramètres
-
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. |
- Renvoie
- boolean True on success.
- Depuis
- 12.1
- Exceptions
-
Références $fields, $id, $key, et null.
◆ isSupported()
Test to see if the SQLSRV connector is available.
- Renvoie
- boolean True on success, false otherwise.
- Depuis
- 12.1
Implémente JDatabaseInterface.
◆ limit()
limit |
( |
|
$query, |
|
|
|
$limit, |
|
|
|
$offset |
|
) |
| |
|
protected |
Method to wrap an SQL statement to provide a LIMIT and OFFSET behavior for scrolling through a result set.
- Paramètres
-
string | $query | The SQL statement to process. |
integer | $limit | The maximum affected rows to set. |
integer | $offset | The affected row offset to set. |
- Renvoie
- string The processed SQL statement.
- Depuis
- 12.1
Références $limit, $offset, $query, et $start.
◆ loadResult()
Method to get the first field of the first row of the result set from the database query.
- Renvoie
- mixed The return value or null if the query failed.
- Depuis
- 12.1
- Exceptions
-
Références $row, et null.
◆ lockTable()
Locks a table in the database.
- Paramètres
-
string | $tableName | The name of the table to lock. |
- Renvoie
- FOFDatabaseDriverSqlsrv Returns this object to support chaining.
- Depuis
- 12.1
- Exceptions
-
◆ renameConstraints()
renameConstraints |
( |
|
$constraints = array() , |
|
|
|
$prefix = null , |
|
|
|
$backup = null |
|
) |
| |
|
protected |
Rename constraints.
- Paramètres
-
array | $constraints | Array(strings) of table constraints |
string | $prefix | A string |
string | $backup | A string |
- Renvoie
- void
- Depuis
- 12.1
Références $prefix.
◆ renameTable()
renameTable |
( |
|
$oldTable, |
|
|
|
$newTable, |
|
|
|
$backup = null , |
|
|
|
$prefix = null |
|
) |
| |
Renames a table in the database.
- Paramètres
-
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 |
- Renvoie
- FOFDatabaseDriverSqlsrv Returns this object to support chaining.
- Depuis
- 12.1
- Exceptions
-
Références $prefix.
◆ replacePrefix()
replacePrefix |
( |
|
$query, |
|
|
|
$prefix = '#__' |
|
) |
| |
This function replaces a string identifier $prefix with the string held is the tablePrefix class variable.
- Paramètres
-
string | $query | The SQL statement to prepare. |
string | $prefix | The common table prefix. |
- Renvoie
- string The processed SQL statement.
- Depuis
- 12.1
Références $n, $prefix, et $query.
◆ select()
Select a database for use.
- Paramètres
-
string | $database | The name of the database to select for use. |
- Renvoie
- boolean True if the database was successfully selected.
- Depuis
- 12.1
- Exceptions
-
Références null.
◆ setUtf()
Set the connection to use UTF-8 character encoding.
- Renvoie
- boolean True on success.
- Depuis
- 12.1
◆ transactionCommit()
transactionCommit |
( |
|
$toSavepoint = false | ) |
|
Method to commit a transaction.
- Paramètres
-
boolean | $toSavepoint | If true, commit to the last savepoint. |
- Renvoie
- void
- Depuis
- 12.1
- Exceptions
-
◆ transactionRollback()
transactionRollback |
( |
|
$toSavepoint = false | ) |
|
Method to roll back a transaction.
- Paramètres
-
boolean | $toSavepoint | If true, rollback to the last savepoint. |
- Renvoie
- void
- Depuis
- 12.1
- Exceptions
-
◆ transactionStart()
transactionStart |
( |
|
$asSavepoint = false | ) |
|
Method to initialize a transaction.
- Paramètres
-
boolean | $asSavepoint | If true and a transaction is already active, a savepoint will be created. |
- Renvoie
- void
- Depuis
- 12.1
- Exceptions
-
◆ unlockTables()
Unlocks tables in the database.
- Renvoie
- FOFDatabaseDriverSqlsrv Returns this object to support chaining.
- Depuis
- 12.1
- Exceptions
-
◆ $dbMinimum
$dbMinimum = '10.50.1600.1' |
|
staticprotected |
◆ $name
◆ $nameQuote
◆ $nullDate
$nullDate = '1900-01-01 00:00:00' |
|
protected |
◆ $serverType
La documentation de cette classe a été générée à partir du fichier suivant :