Class: ActiveRecord::ConnectionAdapters::IBM_DB2_ZOS
- Inherits:
-
IBM_DB2
- Object
- IBM_DataServer
- IBM_DB2
- ActiveRecord::ConnectionAdapters::IBM_DB2_ZOS
- Defined in:
- lib/active_record/connection_adapters/ibm_db_adapter.rb
Overview
module HostedDataServer
Direct Known Subclasses
Instance Method Summary collapse
- #change_column_default(table_name, column_name, default) ⇒ Object
-
#create_index_after_table(table_name) ⇒ Object
since v9 doesn’t need, suggest putting it in HostedDataServer?.
- #remove_column(table_name, column_name) ⇒ Object
-
#set_binary_default(value) ⇒ Object
DB2 z/OS only allows NULL or “” (empty) string as DEFAULT value for a BLOB column.
Methods inherited from IBM_DB2
#change_column, #execute, #get_datetime_mapping, #get_time_mapping, #last_generated_id, #primary_key, #query_offset_limit, #rename_column, #select_all, #set_binary_value, #set_case, #set_text_default
Methods inherited from IBM_DataServer
#check_reserved_words, #execute, #get_datetime_mapping, #get_time_mapping, #initialize, #last_generated_id, #query_offset_limit, #reorg_table, #select_all, #set_binary_value, #set_case, #set_schema, #set_text_default, #setup_for_lob_table
Constructor Details
This class inherits a constructor from ActiveRecord::ConnectionAdapters::IBM_DataServer
Instance Method Details
#change_column_default(table_name, column_name, default) ⇒ Object
1321 1322 1323 1324 1325 1326 1327 1328 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 1321 def change_column_default(table_name, column_name, default) unless default raise NotImplementedError, "DB2 for zOS data server version 9 does not support changing the column default to NULL" else super end end |
#create_index_after_table(table_name) ⇒ Object
since v9 doesn’t need, suggest putting it in HostedDataServer?
1306 1307 1308 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 1306 def create_index_after_table(table_name) @adapter.add_index(table_name, "id", :unique => true) end |
#remove_column(table_name, column_name) ⇒ Object
1310 1311 1312 1313 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 1310 def remove_column(table_name, column_name) raise NotImplementedError, "remove_column is not supported by the DB2 for zOS data server" end |
#set_binary_default(value) ⇒ Object
DB2 z/OS only allows NULL or “” (empty) string as DEFAULT value for a BLOB column. For non-empty string and non-NULL values, the server returns error
1317 1318 1319 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 1317 def set_binary_default(value) "#{value}" end |