Ejemplo n.º 1
0
def get_template_collection(database):
    """Connects to the database and returns a pointer
    to the templates collection.
    """
    connection = mongo_utils.mongo_get_connection(database)
    collection = mongo_utils.mongo_get_collection(connection, "mars_templates")
    return collection
Ejemplo n.º 2
0
def get_workflow_collection(project):
    """Connects to the specified project and returns a pointer
    to the workflows collection.
    """
    connection = mongo_utils.mongo_get_connection(project)
    collection = mongo_utils.mongo_get_collection(connection, 'workflows')
    return collection
Ejemplo n.º 3
0
def get_evaluation_collection(project):
    """Connects to the specified project and returns a pointer
    to the evaluations collection.
    """
    connection = mongo_utils.mongo_get_connection(project)
    collection = mongo_utils.mongo_get_collection(connection, 'evaluations')
    return collection
Ejemplo n.º 4
0
def get_project_collection(database="project"):
    """Connects to the project admin database (defaults to project) and returns a pointer
    to the project collection.
    """
    connection = mongo_utils.mongo_get_connection(database)
    collection = mongo_utils.mongo_get_collection(connection, "project")
    return collection
Ejemplo n.º 5
0
def get_language_collection(project):
    """Connects to the specified project and returns a pointer
    to the functions collection.
    """
    connection = mongo_utils.mongo_get_connection(project)
    collection = mongo_utils.mongo_get_collection(connection, 'language')
    return collection
Ejemplo n.º 6
0
def get_record_collection(database, collection):
    """Connects to the database and returns a pointer
    to the record collection.
    """
    connection = mongo_utils.mongo_get_connection(database)
    collection = mongo_utils.mongo_get_collection(connection, collection)
    return collection
Ejemplo n.º 7
0
def get_component_collection(database):
    """Connects to the specified database and returns a pointer
    to the components collection.
    """
    connection = mongo_utils.mongo_get_connection(database)
    collection = mongo_utils.mongo_get_collection(connection, 'components')
    return collection
Ejemplo n.º 8
0
def get_group_collection(database):
    """Connects to the project database and returns a pointer to the group collection.
    """
    connection = mongo_utils.mongo_get_connection(database)
    collection = mongo_utils.mongo_get_collection(connection, "mars_groups")
    return collection