コード例 #1
0
ファイル: template_dao.py プロジェクト: ShriyaSalian/mars
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
コード例 #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
コード例 #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
コード例 #4
0
ファイル: project_dao.py プロジェクト: ShriyaSalian/harness
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
コード例 #5
0
ファイル: python_3.py プロジェクト: ShriyaSalian/harness
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
コード例 #6
0
ファイル: record_dao.py プロジェクト: ShriyaSalian/mars
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
コード例 #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
コード例 #8
0
ファイル: parameter_dao.py プロジェクト: ShriyaSalian/harness
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