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; } }