Class: ActiveRecord::ConnectionAdapters::ColumnMethods::Table
- Inherits:
-
Table
- Object
- Table
- ActiveRecord::ConnectionAdapters::ColumnMethods::Table
- Defined in:
- lib/active_record/connection_adapters/ibm_db_adapter.rb
Overview
#class Table
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.
Methods included from ActiveRecord::ConnectionAdapters::ColumnMethods
Instance Method Details
#bigint(*args) ⇒ Object
665 666 667 668 669 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 665 def bigint(*args) puts_log '23' ibm_parse_column_attributes_args('bigint', *args) 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]
672 673 674 675 676 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 672 def char(*args) puts_log '24' ibm_parse_column_attributes_args('char', *args) self end |
#decfloat(*args) ⇒ Object
Method to support the new syntax of rails 2.0 migrations (short-hand definitions) for columns of type decfloat
647 648 649 650 651 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 647 def decfloat(*args) puts_log '20' ibm_parse_column_attributes_args('decfloat', *args) self end |
#double(*args) ⇒ Object
Method to support the new syntax of rails 2.0 migrations (short-hand definitions) for columns of type double
640 641 642 643 644 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 640 def double(*args) puts_log '19' ibm_parse_column_attributes_args('double', *args) self end |
#graphic(*args) ⇒ Object
653 654 655 656 657 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 653 def graphic(*args) puts_log '21' ibm_parse_column_attributes_args('graphic', *args) self end |
#vargraphic(*args) ⇒ Object
659 660 661 662 663 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 659 def vargraphic(*args) puts_log '22' ibm_parse_column_attributes_args('vargraphic', *args) 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
628 629 630 631 632 633 634 635 636 637 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 628 def xml(*args) puts_log '18' args.delete_at(args.length - 1) if args.last.is_a?(Hash) 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 self end |