mafintosh / mafintosh/hyperdb

Partial select

Open
#156 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
748
Forks
56
PR merge metrics
No merged PRs in 30d

Description

I have an use case where I plan to store the users in the db with key `users/{id}`. So the keys will be `users/1`
`users/2`
and so on.
Each key will have details for the users like name, address, phone number etc.
Now I can retrieve all the users by using the _list api_ as follows
`db.list('/users/', function (err, nodes) { })`.

Now Is there a way where I can select/get/list only 10 users from a list of 100 ? This may be based on timestamp (last updated users). I require this as I want to reduce the loading time as fetching 10 users is faster than fetching 100 users and then showing only 10 of them on UI.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the `db.list('/users/', callback)` entry point and the existing issue discussion about partial selection. Determine how limiting results and ordering by last-updated timestamp should work; done means the list API can return only the requested subset without fetching the full user list.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.