added comments to backend get_asset function, removed duplicate

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
Lorenz Herzberger 2022-04-14 12:58:08 +02:00
parent 42c7d53782
commit 55aa56bf4b
No known key found for this signature in database
GPG Key ID: FA5EE906EB55316A
2 changed files with 2 additions and 13 deletions

View File

@ -72,6 +72,7 @@ def store_assets(conn, assets):
.insert_many(assets, ordered=False)) .insert_many(assets, ordered=False))
# TODO: pass filter/projection in function call this is not the expected behaviour for a function called get_asset
@register_query(LocalMongoDBConnection) @register_query(LocalMongoDBConnection)
def get_asset(conn, asset_id): def get_asset(conn, asset_id):
try: try:
@ -81,7 +82,7 @@ def get_asset(conn, asset_id):
except IndexError: except IndexError:
pass pass
# TODO: pass filter/projection in function call this is not the expected behaviour for a function called get_assets
@register_query(LocalMongoDBConnection) @register_query(LocalMongoDBConnection)
def get_assets(conn, asset_ids): def get_assets(conn, asset_ids):
return conn.run( return conn.run(

View File

@ -202,18 +202,6 @@ def get_metadata(connection, transaction_ids):
raise NotImplementedError raise NotImplementedError
@singledispatch
def get_assets(connection, asset_ids):
"""Get a list of assets from the assets table.
Args:
asset_ids (list): a list of ids for the assets to be retrieved from
the database.
Returns:
assets (list): the list of returned assets.
"""
raise NotImplementedError
@singledispatch @singledispatch
def get_txids_filtered(connection, asset_ids, operation=None): def get_txids_filtered(connection, asset_ids, operation=None):
"""Return all transactions for a particular asset id and optional operation. """Return all transactions for a particular asset id and optional operation.