tarantool / tarantool/crud

Pagination for `count()`

Open
#264 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Lua
Stars
43
Forks
17
Avg merge
28m
Merged PRs (30d)
2

Description

The following crud.select() options look meaningful for crud.count() as well:

  • after: because it is quite meaningful question: how much tuples after given one remains?
  • first: because we can just make sure that, say, at least 1000 more tuples after current one are present. We are not interested, whether it is 1000 or 5000.
  • force_map_call: if a user suspect a problem around sharding and want to re-verify with the more durable way.

What is not applicable here:

  • batch_size: because the result is always tiny.
  • fields: because we don't return any fields.

I propose to file issues regarding possibly useful options and go ahead.

Originally posted by @Totktonada in https://github.com/tarantool/crud/pull/230#discussion_r809559878

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 locating the crud.count and crud.select entry points and reviewing the linked PR 230 discussion for context. Compare how the listed options are handled for select, then define tests showing that after, first, and force_map_call behave for count while batch_size and fields remain unsupported.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
backend-api-design, databases, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.