Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ranged Queries #2

Open
Miserlou opened this issue Apr 9, 2017 · 2 comments
Open

Ranged Queries #2

Miserlou opened this issue Apr 9, 2017 · 2 comments

Comments

@Miserlou
Copy link
Owner

Miserlou commented Apr 9, 2017

No description provided.

@Miserlou
Copy link
Owner Author

Miserlou commented Apr 10, 2017

ex,

nodb.range(start=10, end=20) # [<User id:10>, ... , <User id:20> ]

@bendog
Copy link
Collaborator

bendog commented Sep 17, 2019

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...>, ...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants