ModelSEED Database - ModelSEED/Model-SEED-core GitHub Wiki
An abstract role / interface for database drivers.
$bool = $db->has_data(ref, auth);
$obj = $db->get_data(ref, auth);
$collection = $db->get_data_collection(ref, auth);
$iterator = $db->get_data_collection_itorator(ref, auth);
$ref = $db->save_data(ref, data, config, auth);
Where config is a hash that currently accepts one parameter:
- is_merge
-
This is a boolean value that, if true, results in the save operation not overwriting the ancestor_uuids field in the object. If it is false or not present, the ancestor_uuids field will be overwritten with the current object's uuid if that object already exists in the data store.
$bool = save_data_collection(ref, collection, auth);
$count = $db->delete_object(ref, auth);
$count = $db->delete_object(ref, auth);
([ids]) = $db->find_objects(ref, query, auth);
Allows you to query for objects based on the metadata will use query syntax similar to MongoDB.
Uses MongoDB syntax like here: http://search.cpan.org/~kristina/MongoDB/lib/MongoDB/Tutorial.pod#Queries http://www.mongodb.org/display/DOCS/Advanced+Queries
These functions manage aliases, which are special pointers to objects. These pointers have viewing permissions and can only be moved to a different object by their owner. Alias strings have the form of "username/arbitraryString" and are used in place of uuids in some specific objects (biochemistry, mapping and model for now). So a reference to a biochemistry would look like biochemistry/chenry/main
.
In these functions:
-
ref
is a ModelSEED::Reference -
auth
is a ModelSEED::Auth -
arbitraryString
is the free-form portion of the alias -
viewerUsername
is a username
$arrayRef = $db->get_aliases(query, auth)
Query for aliases. The query object is a HashRef that may contain the following keys: type, owner, alias, uuid. The return value is an array ref of alias objects that have the following structure:
{
type => $string,
owner => $string,
alias => $string,
uuid => $uuid,
}
$bool = $db->update_alias(ref, uuid, auth)
$bool = $db->add_viewer(ref, viewerUsername, auth)
$bool = $db->remove_viewer(ref, viewerUsername, auth)
$bool = $db->set_public(ref, boolean, auth)
Hey! The above document had some coding errors, which are explained below:
- Around line 76:
-
Unknown directive: =over4
- Around line 78:
-
'=item' outside of any '=over'