class DBMSSQL extends DBAdapter
This is used to connect to a MSSQL database.
Constants
ID_METHOD_NONE |
|
ID_METHOD_AUTOINCREMENT |
|
ID_METHOD_SEQUENCE |
|
Methods
static DBAdapter |
factory(string $driver)
Creates a new instance of the database adapter associated with the specified Propel driver. |
from DBAdapter |
initConnection(PDO $con, array $settings)
This method is called after a connection was created to run necessary post-initialization queries or code. |
from DBAdapter | |
setCharset(PDO $con, $charset)
MS SQL Server does not support SET NAMES |
||
The |
toUpperCase(in $in)
This method is used to ignore case. |
|
string |
getStringDelimiter()
Returns the character used to indicate the beginning and end of a piece of text used in a SQL statement (generally a single quote). |
from DBAdapter |
The |
ignoreCase(in $in)
This method is used to ignore case. |
|
string |
ignoreCaseInOrderBy(string $in)
This method is used to ignore case in an ORDER BY clause. |
from DBAdapter |
string |
concatString(string $s1, string $s2)
Returns SQL which concatenates the second string to the first. |
|
string |
subString(string $s, int $pos, int $len)
Returns SQL which extracts a substring. |
|
string |
strLength(string $s)
Returns SQL which calculates the length (in chars) of a string. |
|
quoteIdentifier($text) | ||
quoteIdentifierTable($table) | ||
boolean |
isGetIdBeforeInsert()
Whether this adapter uses an ID generation system that requires getting ID _before_ performing INSERT. |
from DBAdapter |
boolean |
isGetIdAfterInsert()
Whether this adapter uses an ID generation system that requires getting ID _before_ performing INSERT. |
from DBAdapter |
mixed |
getId(PDO $con, $name = null)
Gets the generated ID (either last ID for autoincrement or next sequence ID). |
from DBAdapter |
string |
getTimestampFormatter()
Returns timestamp formatter string for use in date() function. |
from DBAdapter |
string |
getDateFormatter()
Returns date formatter string for use in date() function. |
from DBAdapter |
string |
getTimeFormatter()
Returns time formatter string for use in date() function. |
from DBAdapter |
boolean |
useQuoteIdentifier()
Should Column-Names get identifiers for inserts or updates. |
from DBAdapter |
cleanupSQL($sql, array $params, Criteria $values, DatabaseMap $dbMap) | ||
applyLimit($sql, $offset, $limit)
Simulated Limit/Offset This rewrites the $sql query to apply the offset and limit. |
||
random($seed = null) | ||
string |
getDeleteFromClause($criteria, $tableName)
Returns the "DELETE FROM <table> [AS <alias>]" part of DELETE query. |
from DBAdapter |
createSelectSqlPart(Criteria $criteria, $fromClause, $aliasAll = false)
Builds the SELECT part of a SQL statement based on a Criteria taking into account select columns and 'as' columns (i.e. |
from DBAdapter | |
Criteria |
turnSelectColumnsToAliases(Criteria $criteria)
Ensures uniqueness of select column names by turning them all into aliases This is necessary for queries on more than one table when the tables share a column name |
from DBAdapter |
bindValues(PDOStatement $stmt, array $params, DatabaseMap $dbMap)
Binds values in a prepared statement. |
from DBAdapter | |
Boolean |
bindValue(PDOStatement $stmt, string $parameter, mixed $value, ColumnMap $cMap)
Binds a value to a positioned parameted in a statement, given a ColumnMap object to infer the binding type. |
from DBAdapter |
Details
in DBAdapter at line 65
static public DBAdapter
factory(string $driver)
Creates a new instance of the database adapter associated with the specified Propel driver.
in DBAdapter at line 88
public
initConnection(PDO $con, array $settings)
This method is called after a connection was created to run necessary post-initialization queries or code.
If a charset was specified, this will be set before any other queries
are executed.
This base method runs queries specified using the "query" setting.
at line 24
public
setCharset(PDO $con, $charset)
MS SQL Server does not support SET NAMES
at line 34
public The
toUpperCase(in $in)
This method is used to ignore case.
in DBAdapter at line 132
public string
getStringDelimiter()
Returns the character used to indicate the beginning and end of a piece of text used in a SQL statement (generally a single quote).
at line 45
public The
ignoreCase(in $in)
This method is used to ignore case.
in DBAdapter at line 154
public string
ignoreCaseInOrderBy(string $in)
This method is used to ignore case in an ORDER BY clause.
Usually it is the same as ignoreCase, but some databases
(Interbase for example) does not use the same SQL in ORDER BY
and other clauses.
at line 57
public string
concatString(string $s1, string $s2)
Returns SQL which concatenates the second string to the first.
at line 70
public string
subString(string $s, int $pos, int $len)
Returns SQL which extracts a substring.
at line 81
public string
strLength(string $s)
Returns SQL which calculates the length (in chars) of a string.
at line 89
public
quoteIdentifier($text)
at line 97
public
quoteIdentifierTable($table)
in DBAdapter at line 222
public boolean
isGetIdBeforeInsert()
Whether this adapter uses an ID generation system that requires getting ID _before_ performing INSERT.
in DBAdapter at line 231
public boolean
isGetIdAfterInsert()
Whether this adapter uses an ID generation system that requires getting ID _before_ performing INSERT.
in DBAdapter at line 240
public mixed
getId(PDO $con, $name = null)
Gets the generated ID (either last ID for autoincrement or next sequence ID).
in DBAdapter at line 276
public string
getTimestampFormatter()
Returns timestamp formatter string for use in date() function.
in DBAdapter at line 285
public string
getDateFormatter()
Returns date formatter string for use in date() function.
in DBAdapter at line 294
public string
getTimeFormatter()
Returns time formatter string for use in date() function.
in DBAdapter at line 309
public boolean
useQuoteIdentifier()
Should Column-Names get identifiers for inserts or updates.
By default false is returned -> backwards compability.
it`s a workaround...!!!
at line 240
public
cleanupSQL($sql, array $params, Criteria $values, DatabaseMap $dbMap)
at line 118
public
applyLimit($sql, $offset, $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
at line 106
public
random($seed = null)
in DBAdapter at line 343
public string
getDeleteFromClause($criteria, $tableName)
Returns the "DELETE FROM <table> [AS <alias>]" part of DELETE query.
in DBAdapter at line 368
public
createSelectSqlPart(Criteria $criteria, $fromClause, $aliasAll = false)
Builds the SELECT part of a SQL statement based on a Criteria taking into account select columns and 'as' columns (i.e.
columns aliases)
Move from BasePeer to DBAdapter and turn from static to non static
in DBAdapter at line 440
public Criteria
turnSelectColumnsToAliases(Criteria $criteria)
Ensures uniqueness of select column names by turning them all into aliases This is necessary for queries on more than one table when the tables share a column name
in DBAdapter at line 490
public
bindValues(PDOStatement $stmt, array $params, DatabaseMap $dbMap)
Binds values in a prepared statement.
This method is designed to work with the BasePeer::createSelectSql() method, which creates
both the SELECT SQL statement and populates a passed-in array of parameter
values that should be substituted.
<code>
$db = Propel::getDB($criteria->getDbName());
$sql = BasePeer::createSelectSql($criteria, $params);
$stmt = $con->prepare($sql);
$params = array();
$db->populateStmtValues($stmt, $params, Propel::getDatabaseMap($critera->getDbName()));
$stmt->execute();
</code>
in DBAdapter at line 521
public Boolean
bindValue(PDOStatement $stmt, string $parameter, mixed $value, ColumnMap $cMap)
Binds a value to a positioned parameted in a statement, given a ColumnMap object to infer the binding type.