Class: Alf::Adapter::Connection::SchemaCached
Instance Attribute Summary
#conn_spec
Class Method Summary
collapse
Instance Method Summary
collapse
#close, #closed?, #cog, #delete, #heading, #in_transaction, #insert, #keys, #knows?, #lock, #migrate!, #update
Constructor Details
#initialize(connection, cache = nil) ⇒ SchemaCached
10
11
12
13
|
# File 'lib/alf/adapter/connection/schema_cached.rb', line 10
def initialize(connection, cache = nil)
@connection = connection
@cache = cache || SchemaCached.empty_cache
end
|
Class Method Details
.empty_cache ⇒ Object
6
7
8
|
# File 'lib/alf/adapter/connection/schema_cached.rb', line 6
def self.empty_cache
Hash.new{|h,k| h[k] = {}}
end
|
Instance Method Details
#to_s ⇒ Object
27
28
29
|
# File 'lib/alf/adapter/connection/schema_cached.rb', line 27
def to_s
"#{@connection.to_s} (with cache)"
end
|