protected static _detect_limit_clause_style ( string $connection_name ) : string | ||
$connection_name | string | Which connection to use |
return | string | Limit clause style keyword/constant |
protected static function _detect_limit_clause_style($connection_name)
{
switch (self::get_db($connection_name)->getAttribute(PDO::ATTR_DRIVER_NAME)) {
case 'sqlsrv':
case 'dblib':
case 'mssql':
return ORM::LIMIT_STYLE_TOP_N;
default:
return ORM::LIMIT_STYLE_LIMIT;
}
}