Miserlou / NoDB

NoDB isn't a database.. but it sort of looks like one.
https://blog.zappa.io/posts/introducing-nodb-pythonic-data-store-s3
380 stars 45 forks source link

Ranged Queries #2

Open Miserlou opened 7 years ago

Miserlou commented 7 years ago

ex,

nodb.range(start=10, end=20) # [<User id:10>, ... , <User id:20> ]
bendog commented 5 years ago

what about being able to add a range_index, similar to DynamoDB range keys?

nodb.index = 'name'
nodb.range_index = 'login_date'

save could create a key structure like bucket_name/str(self._format_index_value())/int(range_index)

then you could have a query like

nodb.filter(index='jeff', range__gte=datetime.datetime(year=2018, month=1, day=1).timestamp())
# [<User: jeff, login_date: 2019...>, ...]