Module: ColumnDefs
- Defined in:
- common/db/db_migrator.rb
Class Method Summary (collapse)
-
+ (Object) blobField(name, opts = {})
-
+ (Object) halfLongString(name, opts = {})
-
+ (Object) longString(name, opts = {})
-
+ (Object) mediumBlobField(name, opts = {})
-
+ (Object) textBlobField(name, opts = {})
-
+ (Object) textField(name, opts = {})
Class Method Details
+ (Object) blobField(name, opts = {})
45 46 47 48 49 50 51 52 53 |
# File 'common/db/db_migrator.rb', line 45 def self.blobField(name, opts = {}) if $db_type == :postgres [name, :bytea, opts] elsif $db_type == :h2 [name, String, opts.merge(:size => 128000)] else [name, :blob, opts] end end |
+ (Object) halfLongString(name, opts = {})
31 32 33 |
# File 'common/db/db_migrator.rb', line 31 def self.halfLongString(name, opts = {}) [name, String, opts.merge(:size => 8704)] end |
+ (Object) longString(name, opts = {})
27 28 29 |
# File 'common/db/db_migrator.rb', line 27 def self.longString(name, opts = {}) [name, String, opts.merge(:size => 17408)] end |
+ (Object) mediumBlobField(name, opts = {})
56 57 58 59 60 61 62 63 64 65 66 |
# File 'common/db/db_migrator.rb', line 56 def self.mediumBlobField(name, opts = {}) if $db_type == :postgres [name, :bytea, opts] elsif $db_type == :h2 [name, String, opts.merge(:size => 128000)] elsif $db_type == :mysql [name, :mediumblob, opts] else [name, :blob, opts] end end |
+ (Object) textBlobField(name, opts = {})
36 37 38 39 40 41 42 |
# File 'common/db/db_migrator.rb', line 36 def self.textBlobField(name, opts = {}) if $db_type == :derby [name, :clob, opts] else self.blobField(name, opts) end end |
+ (Object) textField(name, opts = {})
18 19 20 21 22 23 24 |
# File 'common/db/db_migrator.rb', line 18 def self.textField(name, opts = {}) if $db_type == :derby [name, :clob, opts] else [name, :text, opts] end end |