Module: ActiveRecord::ConnectionAdapters::MSSQL::ColumnMethods
- Included in:
- Table, TableDefinition
- Defined in:
- lib/arjdbc/mssql/schema_definitions.rb
Instance Method Summary collapse
- #binary_basic(*args, **options) ⇒ Object
- #char(*args, **options) ⇒ Object
-
#datetime_basic(*args, **options) ⇒ Object
this is the old sql server datetime type, the precision is as follow xx1, xx3, and xx7.
- #money(*args, **options) ⇒ Object
- #nchar(*args, **options) ⇒ Object
- #ntext(*args, **options) ⇒ Object
- #primary_key(name, type = :primary_key, **options) ⇒ Object
- #real(*args, **options) ⇒ Object
-
#smalldatetime(*args, **options) ⇒ Object
datetime with seconds always zero (:00) and without fractional seconds.
- #smallmoney(*args, **options) ⇒ Object
- #text_basic(*args, **options) ⇒ Object
- #uuid(*args, **options) ⇒ Object
- #varbinary(*args, **options) ⇒ Object
- #varchar(*args, **options) ⇒ Object
- #varchar_max(*args, **options) ⇒ Object
Instance Method Details
#binary_basic(*args, **options) ⇒ Object
62 63 64 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 62 def binary_basic(*args, **) args.each { |name| column(name, :binary_basic, **) } end |
#char(*args, **options) ⇒ Object
38 39 40 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 38 def char(*args, **) args.each { |name| column(name, :char, **) } end |
#datetime_basic(*args, **options) ⇒ Object
this is the old sql server datetime type, the precision is as follow xx1, xx3, and xx7
22 23 24 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 22 def datetime_basic(*args, **) args.each { |name| column(name, :datetime_basic, **) } end |
#money(*args, **options) ⇒ Object
30 31 32 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 30 def money(*args, **) args.each { |name| column(name, :money, **) } end |
#nchar(*args, **options) ⇒ Object
54 55 56 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 54 def nchar(*args, **) args.each { |name| column(name, :nchar, **) } end |
#ntext(*args, **options) ⇒ Object
58 59 60 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 58 def ntext(*args, **) args.each { |name| column(name, :ntext, **) } end |
#primary_key(name, type = :primary_key, **options) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 7 def primary_key(name, type = :primary_key, **) if [:integer, :bigint].include?(type) [:is_identity] = true unless .key?(:default) end super end |
#real(*args, **options) ⇒ Object
26 27 28 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 26 def real(*args, **) args.each { |name| column(name, :real, **) } end |
#smalldatetime(*args, **options) ⇒ Object
datetime with seconds always zero (:00) and without fractional seconds
16 17 18 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 16 def smalldatetime(*args, **) args.each { |name| column(name, :smalldatetime, **) } end |
#smallmoney(*args, **options) ⇒ Object
34 35 36 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 34 def smallmoney(*args, **) args.each { |name| column(name, :smallmoney, **) } end |
#text_basic(*args, **options) ⇒ Object
50 51 52 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 50 def text_basic(*args, **) args.each { |name| column(name, :text_basic, **) } end |
#uuid(*args, **options) ⇒ Object
70 71 72 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 70 def uuid(*args, **) args.each { |name| column(name, :uniqueidentifier, **) } end |
#varbinary(*args, **options) ⇒ Object
66 67 68 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 66 def varbinary(*args, **) args.each { |name| column(name, :varbinary, **) } end |
#varchar(*args, **options) ⇒ Object
42 43 44 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 42 def varchar(*args, **) args.each { |name| column(name, :varchar, **) } end |
#varchar_max(*args, **options) ⇒ Object
46 47 48 |
# File 'lib/arjdbc/mssql/schema_definitions.rb', line 46 def varchar_max(*args, **) args.each { |name| column(name, :varchar_max, **) } end |