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
527 528 529 530 531 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 527 def bigint(*args) puts_log "23" 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]
534 535 536 537 538 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 534 def char(*args) puts_log "24" 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
509 510 511 512 513 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 509 def decfloat(*args) puts_log "20" 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
502 503 504 505 506 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 502 def double(*args) puts_log "19" ibm_parse_column_attributes_args('double',*args) return self end |
#graphic(*args) ⇒ Object
515 516 517 518 519 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 515 def graphic(*args) puts_log "21" ibm_parse_column_attributes_args('graphic',*args) return self end |
#vargraphic(*args) ⇒ Object
521 522 523 524 525 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 521 def vargraphic(*args) puts_log "22" 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
487 488 489 490 491 492 493 494 495 496 497 498 499 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 487 def xml(*args ) puts_log "18" = {} 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 |