Module: JdbcSpec::CacheDB
- Includes:
- TSqlMethods
- Defined in:
- lib/jdbc_adapter/jdbc_cachedb.rb
Defined Under Namespace
Modules: Column
Class Method Summary collapse
Instance Method Summary collapse
Methods included from TSqlMethods
#add_limit_offset!, #modify_types, #type_to_sql
Class Method Details
.adapter_matcher(name) ⇒ Object
16 17 18 |
# File 'lib/jdbc_adapter/jdbc_cachedb.rb', line 16 def self.adapter_matcher(name, *) name =~ /cache/i ? self : false end |
Instance Method Details
#create_table(name, options = { }) ⇒ Object
27 28 29 30 31 |
# File 'lib/jdbc_adapter/jdbc_cachedb.rb', line 27 def create_table(name, = { }) super(name, ) primary_key = [:primary_key] || "id" execute "ALTER TABLE #{name} ADD CONSTRAINT #{name}_PK PRIMARY KEY(#{primary_key})" unless [:id] == false end |