TODO: move to dm-more/dm-transaction
VERSION | = | '0.10.1'.freeze |
logger | [RW] |
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