Closed tzarebczan closed 2 years ago
Query is handled in reader.py:
ops = {'<=': '__lte', '>=': '__gte', '<': '__lt', '>': '__gt'}
for constraint in INTEGER_PARAMS:
if constraint in constraints:
value = constraints.pop(constraint)
postfix = ''
if isinstance(value, str):
if len(value) >= 2 and value[:2] in ops:
postfix, value = ops[value[:2]], value[2:]
elif len(value) >= 1 and value[0] in ops:
postfix, value = ops[value[0]], value[1:]
if constraint == 'fee_amount':
value = Decimal(value)*1000
constraints[f'claim.{constraint}{postfix}'] = int(value)
What is a good notation for between?
Something like duration="<=>val1,val2" for between, inclusive?
Or is a list better? durations=[">=5000", "<10000"] ?
Having duration ranges would be great, can this be bumped up?
Also, having release time ranges would help with an upcoming odysee feature...
This can be closed as implemented... Need to confirm hubs work nicely with it https://github.com/lbryio/lbry-sdk/blob/3e3974f81392ae2f95f20487ca08dd4ad2b62922/lbry/extras/daemon/daemon.py#L70
i.e. we should be able to pass a release time between two timestamps