Module Sequel::MSSQL::DatabaseMethods
In: lib/sequel/adapters/shared/mssql.rb

Methods

Constants

AUTO_INCREMENT = 'IDENTITY(1,1)'.freeze
SQL_BEGIN = "BEGIN TRANSACTION".freeze
SQL_COMMIT = "COMMIT TRANSACTION".freeze
SQL_ROLLBACK = "ROLLBACK TRANSACTION".freeze
SQL_ROLLBACK_TO_SAVEPOINT = 'ROLLBACK TRANSACTION autopoint_%d'.freeze
SQL_SAVEPOINT = 'SAVE TRANSACTION autopoint_%d'.freeze
TEMPORARY = "#".freeze

Public Instance methods

Microsoft SQL Server uses the :mssql type.

[Source]

    # File lib/sequel/adapters/shared/mssql.rb, line 13
13:       def database_type
14:         :mssql
15:       end

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

[Source]

    # File lib/sequel/adapters/shared/mssql.rb, line 28
28:       def supports_savepoints?
29:         true
30:       end

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

[Source]

    # File lib/sequel/adapters/shared/mssql.rb, line 19
19:       def tables(opts={})
20:         m = output_identifier_meth
21:         metadata_dataset.from(:information_schema__tables___t).
22:           select(:table_name).
23:           filter(:table_type=>'BASE TABLE', :table_schema=>(opts[:schema]||default_schema||'dbo').to_s).
24:           map{|x| m.call(x[:table_name])}
25:       end

[Validate]