Class \Prado\Data\Common\Mssql\TMssqlCommandBuilder
TMssqlCommandBuilder provides specifics methods to create limit/offset query commands
for MSSQL servers.
Class hierarchy
- \Prado\Data\Common\Mssql\TMssqlCommandBuilder
- \Prado\Data\Common\TDbCommandBuilder
- \Prado\TComponent
Since: 3.1
public
|
applyLimitOffset(string $sql[, int $limit = -1 ][, int $offset = -1 ]) : string
Overrides parent implementation. Alters the sql to apply $limit and $offset.
The idea for limit with offset is done by modifying the sql on the fly with numerous assumptions on the structure of the sql string. The modification is done with reference to the notes from http://troels.arvin.dk/db/rdbms/#select-limit-offset
Regular expressions are used to alter the SQL query. The resulting SQL query may be malformed for complex queries. The following restrictions apply
|
public
|
|
protected
|
findOrdering(string $sql) : array<string|int, mixed>
Base on simplified syntax http://msdn2.microsoft.com/en-us/library/aa259187(SQL.80).aspx
|
protected
|
|
protected
|
|
protected
|
rewriteLimitOffsetSql(string $sql, int $limit, int $offset) : string
Rewrite sql to apply $limit > and $offset > 0 for MSSQL database.
See http://troels.arvin.dk/db/rdbms/#select-limit-offset |
\Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |