def gremlin_read_last_update_time(context, package, version, ecosystem): """Read the last update timestamp.""" query = Query().has("pecosystem", ecosystem).has("pname", package).has("version", version).\ first().value("last_updated") post_query(context, query)
def gremlin_find_package(context, package, ecosystem): """Try to find the package in the selected ecosystem.""" query = Query().has("ecosystem", ecosystem).has("name", package) post_query(context, query)
def gremlin_find_package_version(context, package, version, ecosystem): """Try to find the package with version in the selected ecosystem.""" query = Query().has("pecosystem", ecosystem).has("pname", package).has("version", version) post_query(context, query)
def gremlin_find_package(context, package, ecosystem): """Try to find all versions of the given package in the selected ecosystem.""" query = Query().has("ecosystem", ecosystem).has("name", package).out("has_version") post_query(context, query)
def gremlin_search_vertexes_for_the_ecosystem(context, ecosystem): """Perform simple query to the Gremlin for all vertexes having the specified property.""" query = Query().has("pecosystem", ecosystem).count() post_query(context, query)
def gremlin_search_vertexes(context, name, value): """Perform simple query to the Gremlin for all vertexes having the specified property.""" query = Query().has(name, value) post_query(context, query)