mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 15:05:49 +00:00
added comments to backend get_asset function, removed duplicate
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
parent
42c7d53782
commit
55aa56bf4b
@ -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(
|
||||||
|
|||||||
@ -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.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user