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

Feature: Optional length cap for lists #273

Open
mu-arch opened this issue Jul 27, 2022 · 2 comments
Open

Feature: Optional length cap for lists #273

mu-arch opened this issue Jul 27, 2022 · 2 comments
Labels
C-actions Related to actions C-enhancement New feature or request C-Model Related to the native multi-model capabilities of TDB C-storage Relating to storage C-tests This is related to the test suite F-nominated

Comments

@mu-arch
Copy link

mu-arch commented Jul 27, 2022

Description

Feature: Optional length cap for lists

It is useful to be able to enforce limits on lists from inside the database to avoid application code from having to make multiple queries to enforce the limit.

Limit type 1: prevent lists that have met the cap from adding new elements

Limit type 2: automatically pop the oldest list item when inserting new items into the list

@mu-arch mu-arch added the C-enhancement New feature or request label Jul 27, 2022
@ohsayan
Copy link
Member

ohsayan commented Jul 29, 2022

This is a great idea! Like I noted in chat, this is indeed a very generic use-case and we will implement something in place for this. To implement this, we need two changes:

  • Changes to the underlying structure and interface: This is to accommodate for the operations to be run
  • Changes to the querying API: We'd need a new set of errors, but this can also be an opportunity to use BQL expressions

@ohsayan ohsayan added C-storage Relating to storage C-tests This is related to the test suite C-actions Related to actions C-Model Related to the native multi-model capabilities of TDB labels Jul 29, 2022
@ohsayan
Copy link
Member

ohsayan commented Sep 3, 2022

+1. Nominated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-actions Related to actions C-enhancement New feature or request C-Model Related to the native multi-model capabilities of TDB C-storage Relating to storage C-tests This is related to the test suite F-nominated
Projects
None yet
Development

No branches or pull requests

2 participants