Class: ActiveRecord::ConnectionAdapters::Table
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::Table
- Defined in:
- lib/active_record/connection_adapters/ibm_db_adapter.rb
Overview
class IBM_DB_I5Column
Instance Method Summary collapse
- #bigint(*args) ⇒ Object
-
#char(*args) ⇒ Object
(also: #character)
Method to support the new syntax of rails 2.0 migrations (short-hand definitions) for columns of type char [character].
-
#decfloat(*args) ⇒ Object
Method to support the new syntax of rails 2.0 migrations (short-hand definitions) for columns of type decfloat.
-
#double(*args) ⇒ Object
Method to support the new syntax of rails 2.0 migrations (short-hand definitions) for columns of type double.
- #graphic(*args) ⇒ Object
- #vargraphic(*args) ⇒ Object
-
#xml(*args) ⇒ Object
Method to support the new syntax of rails 2.0 migrations (short-hand definitions) for columns of type xml This method is different as compared to def char (sql is being issued explicitly as compared to def char where method column(which will generate the sql is being called) in order to handle the DEFAULT and NULL option for the native XML datatype.
Instance Method Details
#bigint(*args) ⇒ Object
705 706 707 708 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 705 def bigint(*args) ibm_parse_column_attributes_args('bigint',*args) return self end |
#char(*args) ⇒ Object Also known as: character
Method to support the new syntax of rails 2.0 migrations (short-hand definitions) for columns of type char [character]
711 712 713 714 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 711 def char(*args) ibm_parse_column_attributes_args('char',*args) return self end |
#decfloat(*args) ⇒ Object
Method to support the new syntax of rails 2.0 migrations (short-hand definitions) for columns of type decfloat
690 691 692 693 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 690 def decfloat(*args) ibm_parse_column_attributes_args('decfloat',*args) return self end |
#double(*args) ⇒ Object
Method to support the new syntax of rails 2.0 migrations (short-hand definitions) for columns of type double
684 685 686 687 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 684 def double(*args) ibm_parse_column_attributes_args('double',*args) return self end |
#graphic(*args) ⇒ Object
695 696 697 698 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 695 def graphic(*args) ibm_parse_column_attributes_args('graphic',*args) return self end |
#vargraphic(*args) ⇒ Object
700 701 702 703 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 700 def vargraphic(*args) ibm_parse_column_attributes_args('vargraphic',*args) return self end |
#xml(*args) ⇒ Object
Method to support the new syntax of rails 2.0 migrations (short-hand definitions) for columns of type xml This method is different as compared to def char (sql is being issued explicitly as compared to def char where method column(which will generate the sql is being called) in order to handle the DEFAULT and NULL option for the native XML datatype
670 671 672 673 674 675 676 677 678 679 680 681 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 670 def xml(*args ) = {} if args.last.is_a?(Hash) = args.delete_at(args.length-1) end sql_segment = "ALTER TABLE #{@base.quote_table_name(@table_name)} ADD COLUMN " args.each do | name | sql = sql_segment + " #{@base.quote_column_name(name)} xml" @base.execute(sql,"add_xml_column") end return self end |