Class Vapor::RepositoryManager
|
|
Manager for metadata of an VAPOR Repository. Can add new classes or
initialize a fresh Repository.
Exceptions
Create a Manager for the Repository at the Datastore specified in
db_spec
db_spec is a String with fields separated by colons:
"driver:database:host[:port]".
If check_repository is false, validity of Repository is not
checked. Use when connecting to an uninitialized Repository.
Initialize the Datastore as a Repository. Raises BackendInconsistentError
if the Datastore is not empty.
Register a new class’s metadata with the Repository. Takes a
ClassMetaData as arugment.
Raises a DuplicateClassError if the class is already known to the
Repository and a UnknownSuperclassError if the superclass is unknown. A
BackendInconsistentError is raised if the Datastore has an error due to
unknown reasons. Raises a InvalidMetadtaError if the class is trying to
redefine a superclass’ attribute in a incompatible manner or an array
attribute is part of an uniqueness constraint (PostgreSQL restriction)
Returns true if a class with the given name is known to the
Repository.
retrieve metadata about a class, Array of reference-attributes
Begin an transaction to manipulate the Repository.
Commit running transaction, actually making changes to the Repository.
Remove metadata of a class and all it’s instances. Will fail with a
ClassNotKnownError if the class is not known. If the class has
child classes it will fail with a ClassNotDeletableError unless
recursive is set to true.
Update metadata of a Persistable class that
is already registered with the Repository. Raises a
ClassNotKnownError if the class is not known to the Repository and
a InvalidMetadataError with a explaining message on other errors.