Class: ActiveRecord::ConnectionAdapters::IBM_DB2_ZOS_8
- Inherits:
-
IBM_DB2_ZOS
- Object
- IBM_DataServer
- IBM_DB2
- IBM_DB2_ZOS
- ActiveRecord::ConnectionAdapters::IBM_DB2_ZOS_8
- Includes:
- HostedDataServer
- Defined in:
- lib/active_record/connection_adapters/ibm_db_adapter.rb
Overview
class IBM_DB2_ZOS
Constant Summary
Constants included from HostedDataServer
HostedDataServer::RESERVED_WORDS
Instance Method Summary collapse
- #change_column_default(table_name, column_name, default) ⇒ Object
- #get_limit_offset_clauses(limit, offset) ⇒ Object
- #query_offset_limit(sql, offset, limit) ⇒ Object
- #query_offset_limit!(sql, offset, limit, options) ⇒ Object
- #rename_column(table_name, column_name, new_column_name) ⇒ Object
-
#setup_for_lob_table ⇒ Object
This call is needed on DB2 z/OS v8 for the creation of tables with LOBs.
Methods included from HostedDataServer
Methods inherited from IBM_DB2_ZOS
#change_column_null, #create_index_after_table, #remove_column, #set_binary_default
Methods inherited from IBM_DB2
#change_column, #change_column_null, #get_datetime_mapping, #get_double_mapping, #get_time_mapping, #initialize, #last_generated_id, #primary_key_definition, #set_binary_default, #set_binary_value, #set_case, #set_text_default
Methods inherited from IBM_DataServer
#change_column_null, #check_reserved_words, #create_index_after_table, #execute, #get_datetime_mapping, #get_double_mapping, #get_time_mapping, #initialize, #last_generated_id, #limit_not_supported_types, #prepare, #remove_column, #reorg_table, #select, #select_rows, #set_binary_default, #set_binary_value, #set_case, #set_schema, #set_text_default
Constructor Details
This class inherits a constructor from ActiveRecord::ConnectionAdapters::IBM_DB2
Instance Method Details
#change_column_default(table_name, column_name, default) ⇒ Object
3177 3178 3179 3180 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 3177 def change_column_default(table_name, column_name, default) raise NotImplementedError, "DB2 for zOS data server version 8 does not support changing the column default" end |
#get_limit_offset_clauses(limit, offset) ⇒ Object
3143 3144 3145 3146 3147 3148 3149 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 3143 def get_limit_offset_clauses(limit, offset) retHash = {"startSegment" => "", "endSegment" => ""} if (!limit.nil?) retHash["endSegment"] = " FETCH FIRST #{limit} ROWS ONLY" end return retHash end |
#query_offset_limit(sql, offset, limit) ⇒ Object
3151 3152 3153 3154 3155 3156 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 3151 def query_offset_limit(sql, offset, limit) if (!limit.nil?) sql << " FETCH FIRST #{limit} ROWS ONLY" end return sql end |
#query_offset_limit!(sql, offset, limit, options) ⇒ Object
3158 3159 3160 3161 3162 3163 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 3158 def query_offset_limit!(sql, offset, limit, ) if (!limit.nil?) sql << " FETCH FIRST #{limit} ROWS ONLY" end [:paramArray] = [] end |
#rename_column(table_name, column_name, new_column_name) ⇒ Object
3173 3174 3175 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 3173 def rename_column(table_name, column_name, new_column_name) raise NotImplementedError, "rename_column is not implemented for DB2 on zOS 8" end |
#setup_for_lob_table ⇒ Object
This call is needed on DB2 z/OS v8 for the creation of tables with LOBs. When issued, this call does the following:
DB2 creates LOB table spaces, auxiliary tables, and indexes on auxiliary
tables for LOB columns.
3169 3170 3171 |
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 3169 def setup_for_lob_table() execute "SET CURRENT RULES = 'STD'" end |