TYPO3 CMS  TYPO3_7-6
ADODB_mssqlnative Class Reference
Inheritance diagram for ADODB_mssqlnative:

Public Member Functions

 __construct ()
 
 ServerVersion ()
 
 ServerInfo ()
 
 IfNull ( $field, $ifNull)
 
 _insertid ()
 
 _affectedrows ()
 
 GenID ($seq='adodbseq', $start=1)
 
 CreateSequence ($seq='adodbseq', $start=1)
 
 CreateSequence2008 ($seq='adodbseq', $start=1)
 
 CreateSequence2012 ($seq='adodb', $start=1)
 
 GenID2008 ($seq='adodbseq', $start=1)
 
 GenID2012 ($seq='adodbseq', $start=1)
 
 SQLDate ($fmt, $col=false)
 
 BeginTrans ()
 
 CommitTrans ($ok=true)
 
 RollbackTrans ()
 
 SetTransactionMode ( $transaction_mode)
 
 RowLock ($tables, $where, $col='1 as adodbignore')
 
 SelectDB ($dbName)
 
 ErrorMsg ()
 
 ErrorNo ()
 
 _connect ($argHostname, $argUsername, $argPassword, $argDatabasename)
 
 _pconnect ($argHostname, $argUsername, $argPassword, $argDatabasename)
 
 Prepare ($sql)
 
 Concat ()
 
 UpdateBlob ($table, $column, $val, $where, $blobtype='BLOB')
 
 _query ($sql, $inputarr=false)
 
 _close ()
 
 MetaIndexes ($table, $primary=false, $owner=false)
 
 MetaForeignKeys ($table, $owner=false, $upper=false)
 
 MetaDatabases ()
 
 MetaPrimaryKeys ($table, $owner=false)
 
 MetaTables ($ttype=false, $showSchema=false, $mask=false)
 
 MetaColumns ($table, $upper=true, $schema=false)
 

Static Public Member Functions

static UnixDate ($v)
 
static UnixTimeStamp ($v)
 

Public Attributes

 $databaseType = "mssqlnative"
 
 $dataProvider = "mssqlnative"
 
 $replaceQuote = "''"
 
 $fmtDate = "'Y-m-d'"
 
 $fmtTimeStamp = "'Y-m-d\TH:i:s'"
 
 $hasInsertID = true
 
 $substr = "substring"
 
 $length = 'len'
 
 $hasAffectedRows = true
 
 $poorAffectedRows = false
 
 $metaDatabasesSQL = "select name from sys.sysdatabases where name <> 'master'"
 
 $metaTablesSQL ="select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE','dtproperties'))"
 
 $metaColumnsSQL
 
 $hasTop = 'top'
 
 $hasGenID = true
 
 $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)'
 
 $sysTimeStamp = 'GetDate()'
 
 $maxParameterLen = 4000
 
 $arrayClass = 'ADORecordSet_array_mssqlnative'
 
 $uniqueSort = true
 
 $leftOuter = '*='
 
 $rightOuter = '=*'
 
 $ansiOuter = true
 
 $identitySQL = 'select SCOPE_IDENTITY()'
 
 $uniqueOrderBy = true
 
 $_bindInputArray = true
 
 $_dropSeqSQL = "drop table %s"
 
 $connectionInfo = array()
 
 $sequences = false
 
 $mssql_version = ''
 

Detailed Description

Definition at line 83 of file adodb-mssqlnative.inc.php.

Constructor & Destructor Documentation

◆ __construct()

ADODB_mssqlnative::__construct ( )

Definition at line 131 of file adodb-mssqlnative.inc.php.

References debug().

Member Function Documentation

◆ _affectedrows()

ADODB_mssqlnative::_affectedrows ( )

Definition at line 202 of file adodb-mssqlnative.inc.php.

◆ _close()

ADODB_mssqlnative::_close ( )

Definition at line 612 of file adodb-mssqlnative.inc.php.

References RollbackTrans().

◆ _connect()

ADODB_mssqlnative::_connect (   $argHostname,
  $argUsername,
  $argPassword,
  $argDatabasename 
)

Definition at line 478 of file adodb-mssqlnative.inc.php.

References $connectionInfo, and debug().

Referenced by _pconnect().

◆ _insertid()

ADODB_mssqlnative::_insertid ( )

Definition at line 192 of file adodb-mssqlnative.inc.php.

◆ _pconnect()

ADODB_mssqlnative::_pconnect (   $argHostname,
  $argUsername,
  $argPassword,
  $argDatabasename 
)

Definition at line 516 of file adodb-mssqlnative.inc.php.

References _connect().

◆ _query()

ADODB_mssqlnative::_query (   $sql,
  $inputarr = false 
)

Definition at line 579 of file adodb-mssqlnative.inc.php.

References $sql, and debug().

◆ BeginTrans()

ADODB_mssqlnative::BeginTrans ( )

Definition at line 384 of file adodb-mssqlnative.inc.php.

References debug().

Referenced by RowLock().

◆ CommitTrans()

ADODB_mssqlnative::CommitTrans (   $ok = true)

Definition at line 393 of file adodb-mssqlnative.inc.php.

References debug(), and RollbackTrans().

◆ Concat()

ADODB_mssqlnative::Concat ( )

Definition at line 535 of file adodb-mssqlnative.inc.php.

◆ CreateSequence()

ADODB_mssqlnative::CreateSequence (   $seq = 'adodbseq',
  $start = 1 
)

◆ CreateSequence2008()

ADODB_mssqlnative::CreateSequence2008 (   $seq = 'adodbseq',
  $start = 1 
)

For Server 2005,2008, duplicate a sequence with an identity table

Definition at line 242 of file adodb-mssqlnative.inc.php.

References debug().

Referenced by CreateSequence().

◆ CreateSequence2012()

ADODB_mssqlnative::CreateSequence2012 (   $seq = 'adodb',
  $start = 1 
)

Proper Sequences Only available to Server 2012 and up

Definition at line 261 of file adodb-mssqlnative.inc.php.

References $sql.

Referenced by CreateSequence(), and GenID2012().

◆ ErrorMsg()

ADODB_mssqlnative::ErrorMsg ( )

Definition at line 454 of file adodb-mssqlnative.inc.php.

◆ ErrorNo()

ADODB_mssqlnative::ErrorNo ( )

Definition at line 469 of file adodb-mssqlnative.inc.php.

◆ GenID()

ADODB_mssqlnative::GenID (   $seq = 'adodbseq',
  $start = 1 
)

Definition at line 208 of file adodb-mssqlnative.inc.php.

References GenID2008(), GenID2012(), and ServerVersion().

◆ GenID2008()

ADODB_mssqlnative::GenID2008 (   $seq = 'adodbseq',
  $start = 1 
)

For Server 2005,2008, duplicate a sequence with an identity table

Definition at line 275 of file adodb-mssqlnative.inc.php.

References debug().

Referenced by GenID().

◆ GenID2012()

ADODB_mssqlnative::GenID2012 (   $seq = 'adodbseq',
  $start = 1 
)

Only available to Server 2012 and up Cannot do this the normal adodb way by trapping an error if the sequence does not exist because sql server will auto create a sequence with the starting number of -9223372036854775808

Definition at line 300 of file adodb-mssqlnative.inc.php.

References $sql, and CreateSequence2012().

Referenced by GenID().

◆ IfNull()

ADODB_mssqlnative::IfNull (   $field,
  $ifNull 
)

Definition at line 187 of file adodb-mssqlnative.inc.php.

◆ MetaColumns()

ADODB_mssqlnative::MetaColumns (   $table,
  $upper = true,
  $schema = false 
)

Definition at line 768 of file adodb-mssqlnative.inc.php.

References $database, $rs, SelectDB(), and ServerVersion().

◆ MetaDatabases()

ADODB_mssqlnative::MetaDatabases ( )

Definition at line 711 of file adodb-mssqlnative.inc.php.

References $rs, and SelectDB().

◆ MetaForeignKeys()

ADODB_mssqlnative::MetaForeignKeys (   $table,
  $owner = false,
  $upper = false 
)

Definition at line 671 of file adodb-mssqlnative.inc.php.

References $a, and $sql.

◆ MetaIndexes()

ADODB_mssqlnative::MetaIndexes (   $table,
  $primary = false,
  $owner = false 
)

Definition at line 631 of file adodb-mssqlnative.inc.php.

References $rs, and $sql.

◆ MetaPrimaryKeys()

ADODB_mssqlnative::MetaPrimaryKeys (   $table,
  $owner = false 
)

Definition at line 729 of file adodb-mssqlnative.inc.php.

References $a, $database, and $sql.

◆ MetaTables()

ADODB_mssqlnative::MetaTables (   $ttype = false,
  $showSchema = false,
  $mask = false 
)

Definition at line 754 of file adodb-mssqlnative.inc.php.

References $metaTablesSQL.

◆ Prepare()

ADODB_mssqlnative::Prepare (   $sql)

Definition at line 522 of file adodb-mssqlnative.inc.php.

References $sql.

◆ RollbackTrans()

ADODB_mssqlnative::RollbackTrans ( )

Definition at line 402 of file adodb-mssqlnative.inc.php.

References debug().

Referenced by _close(), and CommitTrans().

◆ RowLock()

ADODB_mssqlnative::RowLock (   $tables,
  $where,
  $col = '1 as adodbignore' 
)

Definition at line 434 of file adodb-mssqlnative.inc.php.

References BeginTrans().

◆ SelectDB()

ADODB_mssqlnative::SelectDB (   $dbName)

Definition at line 441 of file adodb-mssqlnative.inc.php.

References $rs.

Referenced by MetaColumns(), and MetaDatabases().

◆ ServerInfo()

ADODB_mssqlnative::ServerInfo ( )

Definition at line 167 of file adodb-mssqlnative.inc.php.

Referenced by ServerVersion().

◆ ServerVersion()

ADODB_mssqlnative::ServerVersion ( )

Definition at line 146 of file adodb-mssqlnative.inc.php.

References ServerInfo().

Referenced by CreateSequence(), GenID(), and MetaColumns().

◆ SetTransactionMode()

ADODB_mssqlnative::SetTransactionMode (   $transaction_mode)

Definition at line 411 of file adodb-mssqlnative.inc.php.

◆ SQLDate()

ADODB_mssqlnative::SQLDate (   $fmt,
  $col = false 
)

Definition at line 324 of file adodb-mssqlnative.inc.php.

References $sysTimeStamp.

◆ UnixDate()

static ADODB_mssqlnative::UnixDate (   $v)
static

◆ UnixTimeStamp()

static ADODB_mssqlnative::UnixTimeStamp (   $v)
static

◆ UpdateBlob()

ADODB_mssqlnative::UpdateBlob (   $table,
  $column,
  $val,
  $where,
  $blobtype = 'BLOB' 
)

Definition at line 567 of file adodb-mssqlnative.inc.php.

References $sql.

Member Data Documentation

◆ $_bindInputArray

ADODB_mssqlnative::$_bindInputArray = true

Definition at line 125 of file adodb-mssqlnative.inc.php.

◆ $_dropSeqSQL

ADODB_mssqlnative::$_dropSeqSQL = "drop table %s"

Definition at line 126 of file adodb-mssqlnative.inc.php.

◆ $ansiOuter

ADODB_mssqlnative::$ansiOuter = true

Definition at line 122 of file adodb-mssqlnative.inc.php.

◆ $arrayClass

ADODB_mssqlnative::$arrayClass = 'ADORecordSet_array_mssqlnative'

Definition at line 118 of file adodb-mssqlnative.inc.php.

◆ $connectionInfo

ADODB_mssqlnative::$connectionInfo = array()

Definition at line 127 of file adodb-mssqlnative.inc.php.

Referenced by _connect().

◆ $databaseType

ADODB_mssqlnative::$databaseType = "mssqlnative"

Definition at line 84 of file adodb-mssqlnative.inc.php.

◆ $dataProvider

ADODB_mssqlnative::$dataProvider = "mssqlnative"

Definition at line 85 of file adodb-mssqlnative.inc.php.

◆ $fmtDate

ADODB_mssqlnative::$fmtDate = "'Y-m-d'"

Definition at line 87 of file adodb-mssqlnative.inc.php.

◆ $fmtTimeStamp

ADODB_mssqlnative::$fmtTimeStamp = "'Y-m-d\TH:i:s'"

Definition at line 88 of file adodb-mssqlnative.inc.php.

◆ $hasAffectedRows

ADODB_mssqlnative::$hasAffectedRows = true

Definition at line 92 of file adodb-mssqlnative.inc.php.

◆ $hasGenID

ADODB_mssqlnative::$hasGenID = true

Definition at line 114 of file adodb-mssqlnative.inc.php.

◆ $hasInsertID

ADODB_mssqlnative::$hasInsertID = true

Definition at line 89 of file adodb-mssqlnative.inc.php.

◆ $hasTop

ADODB_mssqlnative::$hasTop = 'top'

Definition at line 113 of file adodb-mssqlnative.inc.php.

◆ $identitySQL

ADODB_mssqlnative::$identitySQL = 'select SCOPE_IDENTITY()'

Definition at line 123 of file adodb-mssqlnative.inc.php.

◆ $leftOuter

ADODB_mssqlnative::$leftOuter = '*='

Definition at line 120 of file adodb-mssqlnative.inc.php.

◆ $length

ADODB_mssqlnative::$length = 'len'

Definition at line 91 of file adodb-mssqlnative.inc.php.

◆ $maxParameterLen

ADODB_mssqlnative::$maxParameterLen = 4000

Definition at line 117 of file adodb-mssqlnative.inc.php.

◆ $metaColumnsSQL

ADODB_mssqlnative::$metaColumnsSQL
Initial value:
=
"select c.name,
t.name as type,
c.length,
c.xprec as precision,
c.xscale as scale,
c.isnullable as nullable,
c.cdefault as default_value,
c.xtype,
t.length as type_length,
sc.is_identity
from syscolumns c
join systypes t on t.xusertype=c.xusertype
join sysobjects o on o.id=c.id
join sys.tables st on st.name=o.name
join sys.columns sc on sc.object_id = st.object_id and sc.name=c.name
where o.name='%s'"

Definition at line 96 of file adodb-mssqlnative.inc.php.

◆ $metaDatabasesSQL

ADODB_mssqlnative::$metaDatabasesSQL = "select name from sys.sysdatabases where name <> 'master'"

Definition at line 94 of file adodb-mssqlnative.inc.php.

◆ $metaTablesSQL

ADODB_mssqlnative::$metaTablesSQL ="select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE','dtproperties'))"

Definition at line 95 of file adodb-mssqlnative.inc.php.

Referenced by MetaTables().

◆ $mssql_version

ADODB_mssqlnative::$mssql_version = ''

Definition at line 129 of file adodb-mssqlnative.inc.php.

◆ $poorAffectedRows

ADODB_mssqlnative::$poorAffectedRows = false

Definition at line 93 of file adodb-mssqlnative.inc.php.

◆ $replaceQuote

ADODB_mssqlnative::$replaceQuote = "''"

Definition at line 86 of file adodb-mssqlnative.inc.php.

◆ $rightOuter

ADODB_mssqlnative::$rightOuter = '=*'

Definition at line 121 of file adodb-mssqlnative.inc.php.

◆ $sequences

ADODB_mssqlnative::$sequences = false

Definition at line 128 of file adodb-mssqlnative.inc.php.

◆ $substr

ADODB_mssqlnative::$substr = "substring"

Definition at line 90 of file adodb-mssqlnative.inc.php.

◆ $sysDate

ADODB_mssqlnative::$sysDate = 'convert(datetime,convert(char,GetDate(),102),102)'

Definition at line 115 of file adodb-mssqlnative.inc.php.

◆ $sysTimeStamp

ADODB_mssqlnative::$sysTimeStamp = 'GetDate()'

Definition at line 116 of file adodb-mssqlnative.inc.php.

Referenced by SQLDate().

◆ $uniqueOrderBy

ADODB_mssqlnative::$uniqueOrderBy = true

Definition at line 124 of file adodb-mssqlnative.inc.php.

◆ $uniqueSort

ADODB_mssqlnative::$uniqueSort = true

Definition at line 119 of file adodb-mssqlnative.inc.php.