Propel API
Class

DBSQLSRV

class DBSQLSRV extends DBMSSQL

This is used to connect to a MSSQL database using pdo_sqlsrv driver.

Constants

ID_METHOD_NONE

ID_METHOD_AUTOINCREMENT

ID_METHOD_SEQUENCE

Methods

setCharset(PDO $con, string $charset)

string toUpperCase(string $in)

This method is used to ignore case.

from DBMSSQL
string ignoreCase(string $in)

This method is used to ignore case.

from DBMSSQL
string concatString(string $s1, string $s2)

Returns SQL which concatenates the second string to the first.

from DBMSSQL
string subString(string $s, integer $pos, integer $len)

Returns SQL which extracts a substring.

from DBMSSQL
string strLength(string $s)

Returns SQL which calculates the length (in chars) of a string.

from DBMSSQL
string quoteIdentifier(string $text)

from DBMSSQL
string quoteIdentifierTable(string $table)

from DBMSSQL
string random(string $seed = null)

from DBMSSQL
void applyLimit(string $sql, integer $offset, integer $limit)

Simulated Limit/Offset

from DBMSSQL
cleanupSQL(string $sql, array $params, Criteria $values, DatabaseMap $dbMap)

initConnection(PDO $con, array $settings)

boolean bindValue(PDOStatement $stmt, string $parameter, mixed $value, ColumnMap $cMap, null|integer $position = null)

Details

at line 42
public setCharset(PDO $con, string $charset)

Parameters

PDO $con
string $charset

Exceptions

PropelException

See also

parent::setCharset()

in DBMSSQL at line 38
public string toUpperCase(string $in)

This method is used to ignore case.

Parameters

string $in The string to transform to upper case.

Return Value

string The upper case string.

in DBMSSQL at line 49
public string ignoreCase(string $in)

This method is used to ignore case.

Parameters

string $in The string whose case to ignore.

Return Value

string The string in a case that can be ignored.

in DBMSSQL at line 62
public string concatString(string $s1, string $s2)

Returns SQL which concatenates the second string to the first.

Parameters

string $s1 String to concatenate.
string $s2 String to append.

Return Value

string

in DBMSSQL at line 76
public string subString(string $s, integer $pos, integer $len)

Returns SQL which extracts a substring.

Parameters

string $s String to extract from.
integer $pos Offset to start from.
integer $len Number of characters to extract.

Return Value

string

in DBMSSQL at line 87
public string strLength(string $s)

Returns SQL which calculates the length (in chars) of a string.

Parameters

string $s String to calculate length of.

Return Value

string

in DBMSSQL at line 98
public string quoteIdentifier(string $text)

Parameters

string $text

Return Value

string

See also

DBAdapter::quoteIdentifier()

in DBMSSQL at line 109
public string quoteIdentifierTable(string $table)

Parameters

string $table

Return Value

string

See also

DBAdapter::quoteIdentifierTable()

in DBMSSQL at line 121
public string random(string $seed = null)

Parameters

string $seed

Return Value

string

See also

DBAdapter::random()

in DBMSSQL at line 141
public void applyLimit(string $sql, integer $offset, integer $limit)

Simulated Limit/Offset

This rewrites the $sql query to apply the offset and limit.
some of the ORDER BY logic borrowed from Doctrine MsSqlPlatform

Parameters

string $sql
integer $offset
integer $limit

Return Value

void

See also

DBAdapter::applyLimit()

at line 64
public cleanupSQL(string $sql, array $params, Criteria $values, DatabaseMap $dbMap)

Parameters

string $sql
array $params
Criteria $values
DatabaseMap $dbMap

See also

parent::cleanupSQL()

at line 26
public initConnection(PDO $con, array $settings)

Parameters

PDO $con
array $settings

See also

parent::initConnection()

at line 95
public boolean bindValue(PDOStatement $stmt, string $parameter, mixed $value, ColumnMap $cMap, null|integer $position = null)

Parameters

PDOStatement $stmt
string $parameter
mixed $value
ColumnMap $cMap
null|integer $position

Return Value

boolean

See also

DBAdapter::bindValue()