Class: DbAgile::Adapter

Inherits:
Object
  • Object
show all
Includes:
Contract::Robust::Helpers, Contract::Utils::Full
Defined in:
lib/dbagile/adapter.rb

Direct Known Subclasses

SequelAdapter

Class Method Summary collapse

Methods included from Contract::Schema::TransactionDriven

#add_columns, #create_table, #drop_table, #key!

Methods included from Contract::Schema::TableDriven

#column_names, #has_column?, #has_table?, #heading, #is_key?, #keys

Methods included from Contract::Data::TransactionDriven

#delete, #direct_sql, #insert, #update

Methods included from Contract::Data::TableDriven

#dataset, #exists?

Methods included from Contract::Connection

#disconnect, #physical_schema, #ping, #ping?, #script2sql, #transaction

Methods included from Contract::Robust::Helpers

#has_table!, #not_has_table!

Class Method Details

.[](*args) ⇒ Object



11
# File 'lib/dbagile/adapter.rb', line 11

def self.[](*args) factor(*args) end

.factor(uri, options = {}) ⇒ Object

Builds an adapter instance from an URI



7
8
9
10
# File 'lib/dbagile/adapter.rb', line 7

def self.factor(uri, options = {})
  return uri if uri.kind_of?(Adapter)
  DbAgile::SequelAdapter.new(uri, options)
end