Sha256: e0111743e0d5c91b6c2502001937cdc29f1a5c67a65698b5cb4c26cec16ade04

Contents?: true

Size: 500 Bytes

Versions: 3

Compression:

Stored size: 500 Bytes

Contents

require 'arjdbc/mssql/tsql_helper'

module ::ArJdbc
  module CacheDB
    include TSqlMethods

    def self.column_selector
      [ /cache/i, lambda {  | cfg, col | col.extend( ::ArJdbc::CacheDB::Column ) } ]
    end

    module Column
    end

    def create_table(name, options = { })
      super(name, options)
      primary_key = options[:primary_key] || "id"
      execute "ALTER TABLE #{name} ADD CONSTRAINT #{name}_PK PRIMARY KEY(#{primary_key})" unless options[:id] == false
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
activerecord-jdbc-adapter-1.0.0.beta2-java lib/arjdbc/cachedb/adapter.rb
kb-activerecord-jdbc-adapter-1.0.0.beta1-java lib/arjdbc/cachedb/adapter.rb
activerecord-jdbc-adapter-1.0.0.beta1-java lib/arjdbc/cachedb/adapter.rb