Queries

This is a collection of queries that were found useful. Most of them aim to get entities based on their latest modification date, especially UDF modification date, as the API does not provide this.

genologics_sql.queries.get_last_modified_project_artifact_udfs(session, interval='2 hours')[source]

gets the project objects that have artifact udfs last modified in the last <interval>

Parameters:
  • session – the current SQLAlchemy session to the database
  • interval – str Postgres-compliant time string
Returns:

List of Project records

genologics_sql.queries.get_last_modified_project_artifacts(session, interval='2 hours')[source]

gets the project objects that have artifacts last modified in the last <interval>

Parameters:
  • session – the current SQLAlchemy session to the database
  • interval – str Postgres-compliant time string
Returns:

List of Project records

genologics_sql.queries.get_last_modified_project_containers(session, interval='2 hours')[source]

gets the project objects that have containers last modified in the last <interval>

Parameters:
  • session – the current SQLAlchemy session to the database
  • interval – str Postgres-compliant time string
Returns:

List of Project records

genologics_sql.queries.get_last_modified_project_process_udfs(session, interval='2 hours')[source]

gets the project objects that have containers last modified in the last <interval>

Parameters:
  • session – the current SQLAlchemy session to the database
  • interval – str Postgres-compliant time string
Returns:

List of Project records

genologics_sql.queries.get_last_modified_project_processes(session, interval='2 hours')[source]

gets the project objects that have containers last modified in the last <interval>

Parameters:
  • session – the current SQLAlchemy session to the database
  • interval – str Postgres-compliant time string
Returns:

List of Project records

genologics_sql.queries.get_last_modified_project_sample_udfs(session, interval='2 hours')[source]

gets the project objects that have sample udfs last modified in the last <interval>

Parameters:
  • session – the current SQLAlchemy session to the database
  • interval – str Postgres-compliant time string
Returns:

List of Project records

genologics_sql.queries.get_last_modified_project_udfs(session, interval='2 hours')[source]

gets the project objects that have a udf last modified in the last <interval>

Parameters:
  • session – the current SQLAlchemy session to the database
  • interval – str Postgres-compliant time string
Returns:

List of Project records

genologics_sql.queries.get_last_modified_projectids(session, interval='2 hours')[source]

gets all the projectids for which any part has been modified in the last interval

Parameters:
  • session – the current SQLAlchemy session to the database
  • interval – str Postgres-compliant time string
Returns:

List of Project records

genologics_sql.queries.get_last_modified_projects(session, interval='2 hours')[source]

gets the project objects last modified in the last <interval>

Query:

select * from project where age(lastmodifieddate)< ‘1 hour’::interval;

Parameters:
  • session – the current SQLAlchemy session to the database
  • interval – str Postgres-compliant time string
Returns:

List of Project records