Joomla CMS  3.8.5 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.8.5 et du framework Joomla Platform intégré
Référence de la classe FOFDatabaseDriverSqlsrv
+ Graphe d'héritage de FOFDatabaseDriverSqlsrv:

Fonctions membres publiques

 __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 ()
 
- Fonctions membres publiques hérités de FOFDatabaseDriver
 __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 ()
 
- Fonctions membres publiques hérités de FOFDatabase
 query ()
 
 getErrorMsg ($escaped=false)
 
 getErrorNum ()
 
 stderr ($showSQL=false)
 

Fonctions membres publiques statiques

static isSupported ()
 
- Fonctions membres publiques statiques hérités de FOFDatabaseDriver
static getConnectors ()
 
static getInstance ($options=array())
 
static splitSql ($sql)
 
- Fonctions membres publiques statiques hérités de FOFDatabase
static getConnectors ()
 
static getInstance ($options=array())
 
static splitSql ($query)
 
static test ()
 

Champs de données

 $name = 'sqlsrv'
 
 $serverType = 'mssql'
 
- Champs de données hérités de FOFDatabaseDriver
 $name
 
 $serverType
 

Fonctions membres protégées

 getTableConstraints ($tableName)
 
 renameConstraints ($constraints=array(), $prefix=null, $backup=null)
 
 fetchArray ($cursor=null)
 
 fetchAssoc ($cursor=null)
 
 fetchObject ($cursor=null, $class='stdClass')
 
 freeResult ($cursor=null)
 
 checkFieldExists ($table, $field)
 
 limit ($query, $limit, $offset)
 
 getErrorNumber ()
 
 getErrorMessage ($query)
 
- Fonctions membres protégées hérités de FOFDatabaseDriver
 fetchArray ($cursor=null)
 
 fetchAssoc ($cursor=null)
 
 fetchObject ($cursor=null, $class='stdClass')
 
 freeResult ($cursor=null)
 
 getCreateDatabaseQuery ($options, $utf)
 
 getDatabase ()
 
 quoteNameStr ($strArr)
 

Attributs protégés

 $nameQuote = '[]'
 
 $nullDate = '1900-01-01 00:00:00'
 
- Attributs protégés hérités de FOFDatabaseDriver
 $connection
 
 $count = 0
 
 $cursor
 
 $debug = false
 
 $limit = 0
 
 $log = array()
 
 $timings = array()
 
 $callStacks = array()
 
 $nameQuote
 
 $nullDate
 
 $offset = 0
 
 $options
 
 $sql
 
 $tablePrefix
 
 $utf = true
 
 $utf8mb4 = false
 
 $errorNum = 0
 
 $errorMsg
 
 $transactionDepth = 0
 
 $disconnectHandlers = array()
 

Attributs protégés statiques

static $dbMinimum = '10.50.1600.1'
 
- Attributs protégés statiques hérités de FOFDatabaseDriver
static $instances = array()
 
static $dbMinimum
 

Description détaillée

SQL Server database driver

Voir également
http://msdn.microsoft.com/en-us/library/cc296152(SQL.90).aspx
Depuis
12.1

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $options)

Constructor.

Paramètres
array$optionsList of options used to configure the connection
Depuis
12.1

Références $options.

◆ __destruct()

__destruct ( )

Destructor.

Depuis
12.1

Documentation des fonctions membres

◆ checkFieldExists()

checkFieldExists (   $table,
  $field 
)
protected

Method to check and see if a field exists in a table.

Paramètres
string$tableThe table in which to verify the field.
string$fieldThe field to verify.
Renvoie
boolean True if the field exists in the table.
Depuis
12.1

Références $query.

◆ connect()

connect ( )

Connects to the database if needed.

Renvoie
void Returns void if the database connected successfully.
Depuis
12.1
Exceptions
RuntimeException

Références $config.

◆ connected()

connected ( )

Determines if the connection to the server is active.

Renvoie
boolean True if connected to the database engine.
Depuis
12.1

◆ disconnect()

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$tableNameThe name of the database table to drop.
boolean$ifExistsOptionally 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$textThe string to be escaped.
boolean$extraOptional parameter to provide extra escaping.
Renvoie
string The escaped string.
Depuis
12.1

Références $text.

◆ execute()

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$cursorThe 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$cursorThe 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$cursorThe optional result set cursor from which to fetch the row.
string$classThe 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$cursorThe optional result set cursor from which to fetch the row.
Renvoie
void
Depuis
12.1

◆ getAffectedRows()

getAffectedRows ( )

Get the number of affected rows for the previous executed SQL statement.

Renvoie
integer The number of affected rows.
Depuis
12.1

◆ getCollation()

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$queryThe SQL Query that fails
Renvoie
string The SQL Error message
Depuis
3.4.6

Références $query.

◆ getErrorNumber()

getErrorNumber ( )
protected

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$cursorAn 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$tableA table name
boolean$typeOnlyTrue to only return field types.
Renvoie
array An array of fields.
Depuis
12.1
Exceptions
RuntimeException

Références $field, et $fields.

◆ getTableConstraints()

getTableConstraints (   $tableName)
protected

Get table constraints

Paramètres
string$tableNameThe 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$tablesA table name or a list of table names.
Renvoie
array A list of the create SQL for the tables.
Depuis
12.1
Exceptions
RuntimeException

◆ getTableKeys()

getTableKeys (   $table)

Get the details list of keys for a table.

Paramètres
string$tableThe name of the table.
Renvoie
array An array of the column specification for the table.
Depuis
12.1
Exceptions
RuntimeException

◆ getTableList()

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
RuntimeException

◆ getVersion()

getVersion ( )

Get the version of the database connector.

Renvoie
string The database connector version.
Depuis
12.1

Références $version.

◆ insertid()

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$tableThe name of the database table to insert into.
object&$objectA reference to an object whose public properties match the table fields.
string$keyThe name of the primary key. If provided the object property is updated.
Renvoie
boolean True on success.
Depuis
12.1
Exceptions
RuntimeException

Références $fields, $id, $key, et null.

◆ isSupported()

static isSupported ( )
static

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$queryThe SQL statement to process.
integer$limitThe maximum affected rows to set.
integer$offsetThe affected row offset to set.
Renvoie
string The processed SQL statement.
Depuis
12.1

Références $limit, $offset, $query, et $start.

◆ loadResult()

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
RuntimeException

Références $row, et null.

◆ lockTable()

lockTable (   $tableName)

Locks a table in the database.

Paramètres
string$tableNameThe name of the table to lock.
Renvoie
FOFDatabaseDriverSqlsrv Returns this object to support chaining.
Depuis
12.1
Exceptions
RuntimeException

◆ renameConstraints()

renameConstraints (   $constraints = array(),
  $prefix = null,
  $backup = null 
)
protected

Rename constraints.

Paramètres
array$constraintsArray(strings) of table constraints
string$prefixA string
string$backupA 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$oldTableThe name of the table to be renamed
string$newTableThe new name for the table.
string$backupTable prefix
string$prefixFor the table - used to rename constraints in non-mysql databases
Renvoie
FOFDatabaseDriverSqlsrv Returns this object to support chaining.
Depuis
12.1
Exceptions
RuntimeException

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$queryThe SQL statement to prepare.
string$prefixThe common table prefix.
Renvoie
string The processed SQL statement.
Depuis
12.1

Références $n, $prefix, et $query.

◆ select()

select (   $database)

Select a database for use.

Paramètres
string$databaseThe name of the database to select for use.
Renvoie
boolean True if the database was successfully selected.
Depuis
12.1
Exceptions
RuntimeException

Références null.

◆ setUtf()

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$toSavepointIf true, commit to the last savepoint.
Renvoie
void
Depuis
12.1
Exceptions
RuntimeException

◆ transactionRollback()

transactionRollback (   $toSavepoint = false)

Method to roll back a transaction.

Paramètres
boolean$toSavepointIf true, rollback to the last savepoint.
Renvoie
void
Depuis
12.1
Exceptions
RuntimeException

◆ transactionStart()

transactionStart (   $asSavepoint = false)

Method to initialize a transaction.

Paramètres
boolean$asSavepointIf true and a transaction is already active, a savepoint will be created.
Renvoie
void
Depuis
12.1
Exceptions
RuntimeException

◆ unlockTables()

unlockTables ( )

Unlocks tables in the database.

Renvoie
FOFDatabaseDriverSqlsrv Returns this object to support chaining.
Depuis
12.1
Exceptions
RuntimeException

Documentation des champs

◆ $dbMinimum

$dbMinimum = '10.50.1600.1'
staticprotected

◆ $name

$name = 'sqlsrv'

◆ $nameQuote

$nameQuote = '[]'
protected

◆ $nullDate

$nullDate = '1900-01-01 00:00:00'
protected

◆ $serverType

$serverType = 'mssql'

La documentation de cette classe a été générée à partir du fichier suivant :