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] Allow sequence creation #1504

Open
GustavoOS opened this issue Jun 25, 2024 · 0 comments
Open

[Feature] Allow sequence creation #1504

GustavoOS opened this issue Jun 25, 2024 · 0 comments

Comments

@GustavoOS
Copy link

GustavoOS commented Jun 25, 2024

Description

Suggestion is to allow sequence creation as specified by SQL

Example of Definition

CREATE SEQUENCE sequence_1
start with 1
increment by 1
minvalue 0
maxvalue 100
cycle;

Example of Usage

select sequence_1.next_val

Motivation

  • Sqlite offers autoincrement, but exposing an autoincrement id to an API may expose the API to attacks
  • Some id techniques needs the usage of a sequence in order to enforce sequence and associating this sequence to other factors
  • The generate_sequence function is not capable of returning a new number from a sequence (as next_val)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant