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

Booleans index acceleration #348

Open
vimwitch opened this issue Jan 12, 2022 · 1 comment
Open

Booleans index acceleration #348

vimwitch opened this issue Jan 12, 2022 · 1 comment
Labels
package:database Data storage package, SQLite/IndexedDB/Postgres/Memory

Comments

@vimwitch
Copy link
Member

IndexedDB doesn't allow boolean values to be included in indexes. This means that any query involving a boolean will require some level of scanning.

There are two possible approaches to solving this problem:

  1. Silently convert boolean values to and from integers (0 and 1) inside the database connector
  2. Adopt integers instead of booleans throughout the codebase (possibly using typescript enumeration)
@vimwitch vimwitch added the package:database Data storage package, SQLite/IndexedDB/Postgres/Memory label Jan 12, 2022
@wanseob
Copy link
Member

wanseob commented Jan 12, 2022

Option 2 sounds good to me

This was referenced Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:database Data storage package, SQLite/IndexedDB/Postgres/Memory
Projects
None yet
Development

No branches or pull requests

2 participants