mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-04 19:38:12 +08:00
retrieve latest annotation from db (#1723)
* add function to retrieve latest annotation from db, db updates * dont create directory in s3
This commit is contained in:
@@ -33,6 +33,9 @@ class DbUtils:
|
||||
else self.session.query(*table_args).all()
|
||||
)
|
||||
|
||||
def query_for_most_recent(self, table: Base, filter_args: typing.List[bool] = None) -> Base:
|
||||
return self.session.query(table).filter(*filter_args).order_by(table.created_at.desc()).limit(1).all()[0]
|
||||
|
||||
|
||||
class DBSessionMaker:
|
||||
def __init__(self, database_uri):
|
||||
|
||||
Reference in New Issue
Block a user