Class/Module Index [+]

Quicksearch

Sequel::MSSQL::DatabaseMethods

Constants

AUTO_INCREMENT
DECIMAL_TYPE_RE

The types to check for 0 scale to transform :decimal types to :integer.

SERVER_VERSION_RE
SERVER_VERSION_SQL
SQL_BEGIN
SQL_COMMIT
SQL_ROLLBACK
SQL_ROLLBACK_TO_SAVEPOINT
SQL_SAVEPOINT

Attributes

mssql_unicode_strings[RW]

Whether to use N" to quote strings, which allows unicode characters inside the strings. True by default for compatibility, can be set to false for a possible performance increase. This sets the default for all datasets created from this Database object.

Public Instance Methods

database_type() click to toggle source

Microsoft SQL Server uses the :mssql type.

# File lib/sequel/adapters/shared/mssql.rb, line 27
def database_type
  :mssql
end
server_version(server=nil) click to toggle source

The version of the MSSQL server, as an integer (e.g. 10001600 for SQL Server 2008 Express).

# File lib/sequel/adapters/shared/mssql.rb, line 33
def server_version(server=nil)
  return @server_version if @server_version
  @server_version = synchronize(server) do |conn|
    (conn.server_version rescue nil) if conn.respond_to?(:server_version)
  end
  unless @server_version
    m = SERVER_VERSION_RE.match(fetch(SERVER_VERSION_SQL).single_value.to_s)
    @server_version = (m[1].to_i * 1000000) + (m[2].to_i * 10000) + m[3].to_i
  end
  @server_version
end
supports_savepoints?() click to toggle source

MSSQL supports savepoints, though it doesn't support committing/releasing them savepoint

# File lib/sequel/adapters/shared/mssql.rb, line 46
def supports_savepoints?
  true
end
supports_transaction_isolation_levels?() click to toggle source

MSSQL supports transaction isolation levels

# File lib/sequel/adapters/shared/mssql.rb, line 51
def supports_transaction_isolation_levels?
  true
end
tables(opts={}) click to toggle source

Microsoft SQL Server supports using the INFORMATION_SCHEMA to get information on tables.

# File lib/sequel/adapters/shared/mssql.rb, line 57
def tables(opts={})
  information_schema_tables('BASE TABLE', opts)
end
views(opts={}) click to toggle source

Microsoft SQL Server supports using the INFORMATION_SCHEMA to get information on views.

# File lib/sequel/adapters/shared/mssql.rb, line 63
def views(opts={})
  information_schema_tables('VIEW', opts)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.