TODO: move Collection#loaded_entries to LazyArray TODO: move Collection#partially_loaded to LazyArray
VERSION | = | '1.2.0.rc1' |
logger | [RW] |
Perform necessary steps to finalize DataMapper for the current repository
This method should be called after loading all models and plugins.
It ensures foreign key properties and anonymous join models are created. These are otherwise lazily declared, which can lead to unexpected errors. It also performs basic validity checking of the DataMapper models.
@return [DataMapper] The DataMapper module
@api public
Block Syntax
Pushes the named repository onto the context-stack, yields a new session, and pops the context-stack.
Non-Block Syntax
Returns the current session, or if there is none, a new Session.
@param [Symbol] args the name of a repository to act within or return, :default is default
@yield [Proc] (optional) block to execute within the context of the named repository
@api public
Setups up a connection to a data-store
@param [Symbol] name
a name for the context, defaults to :default
@param [Hash(Symbol => String), Addressable::URI, String] uri_or_options
connection information
@return [DataMapper::Adapters::AbstractAdapter]
the resulting setup adapter
@raise [ArgumentError] "name must be a Symbol, but was…"
indicates that an invalid argument was passed for name[Symbol]
@raise [ArgumentError] "uri_or_options must be a Hash, URI or String, but was…"
indicates that connection information could not be gleaned from the given uri_or_options[Hash, Addressable::URI, String]
@api public