Class Og::Database
In: lib/og.rb
Parent: Object

Encapsulates an Og Database.

Methods

Included Modules

Og::Enchant

Classes and Modules

Class Og::Database::ManagedClassMeta

External Aliases

save -> <<
save -> put
load -> get
create_db! -> create!
drop_db! -> drop!

Attributes

config  [RW]  hash of configuration options.
connection_pool  [RW]  Pool of connections to the backend.
managed_classes  [RW]  Managed classes.

Public Class methods

Initialize the database interface.

Automatically wrap connection methods.

Public Instance methods

close()

Alias for shutdown

Utility method, automatically restores a connection to the pool.

connection()

Alias for get_connection

Add standard og functionality to the class

Get a connection from the pool to access the database. Stores the connection in a thread-local variable.

Register a standard Ruby class as managed.

Helper method to set multiple managed classes.

open(deserialize = nil, &block)

Alias for connect

Restore an unused connection to the pool.

Shutdown the database interface.

Stop managing a Ruby class

[Validate]