Module: DataMapper

Module | DataMapper
In: | lib/dm-core.rb lib/dm-core/adapters.rb lib/dm-core/adapters/abstract_adapter.rb lib/dm-core/adapters/data_objects_adapter.rb lib/dm-core/adapters/in_memory_adapter.rb lib/dm-core/adapters/mysql_adapter.rb lib/dm-core/adapters/oracle_adapter.rb lib/dm-core/adapters/postgres_adapter.rb lib/dm-core/adapters/sqlite3_adapter.rb lib/dm-core/adapters/yaml_adapter.rb lib/dm-core/associations/many_to_many.rb lib/dm-core/associations/many_to_one.rb lib/dm-core/associations/one_to_many.rb lib/dm-core/associations/one_to_one.rb lib/dm-core/associations/relationship.rb lib/dm-core/collection.rb lib/dm-core/identity_map.rb lib/dm-core/migrations.rb lib/dm-core/model.rb lib/dm-core/model/descendant_set.rb lib/dm-core/model/hook.rb lib/dm-core/model/is.rb lib/dm-core/model/property.rb lib/dm-core/model/relationship.rb lib/dm-core/model/scope.rb lib/dm-core/property.rb lib/dm-core/property_set.rb lib/dm-core/query.rb lib/dm-core/query/conditions/comparison.rb lib/dm-core/query/conditions/operation.rb lib/dm-core/query/direction.rb lib/dm-core/query/operator.rb lib/dm-core/query/path.rb lib/dm-core/query/sort.rb lib/dm-core/repository.rb lib/dm-core/resource.rb lib/dm-core/support/chainable.rb lib/dm-core/support/deprecate.rb lib/dm-core/support/equalizer.rb lib/dm-core/support/logger.rb lib/dm-core/support/naming_conventions.rb lib/dm-core/transaction.rb lib/dm-core/type.rb lib/dm-core/types/boolean.rb lib/dm-core/types/discriminator.rb lib/dm-core/types/object.rb lib/dm-core/types/paranoid_boolean.rb lib/dm-core/types/paranoid_datetime.rb lib/dm-core/types/serial.rb lib/dm-core/types/text.rb lib/dm-core/version.rb

TODO: move to dm-more/dm-transaction

### Methods

Type repository root setup

### Classes and Modules

Module DataMapper::Adapters
Module DataMapper::Associations
Module DataMapper::Chainable
Module DataMapper::Deprecate
Module DataMapper::Equalizer
Module DataMapper::Migrations
Module DataMapper::Model
Module DataMapper::NamingConventions
Module DataMapper::Resource
Module DataMapper::Types
Class DataMapper::Collection
Class DataMapper::IdentityMap
Class DataMapper::IncompleteModelError
Class DataMapper::Logger
Class DataMapper::ObjectNotFoundError
Class DataMapper::PluginNotFoundError
Class DataMapper::Property
Class DataMapper::PropertySet
Class DataMapper::Query
Class DataMapper::Repository
Class DataMapper::RepositoryNotSetupError
Class DataMapper::Transaction
Class DataMapper::Type
Class DataMapper::UnknownRelationshipError
Class DataMapper::UnsavedParentError
Class DataMapper::UpdateConflictError
Class DataMapper::ValidationError

### Constants

VERSION | = | '0.10.1'.freeze

### Attributes

logger | [RW] |

### Public Class methods

Type(primitive_type, options = {})

@deprecated

repository(name = nil) {|*block_args| ...}

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

root()

TODO: document @api private

setup(*args)

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

[Validate]