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

Would it be possible to include substring filters? #36

Open
ericvida opened this issue Dec 7, 2023 · 2 comments
Open

Would it be possible to include substring filters? #36

ericvida opened this issue Dec 7, 2023 · 2 comments

Comments

@ericvida
Copy link

ericvida commented Dec 7, 2023

The reason i'm trying blinikDB is to have fast queryable data in memory.
I was sad to see no substring search filters.

I'd love to see something like the following

where: {
	prefix: "hell"
}
# returns hello

or

where: {
	substring: "no"
}

# returns: note, gnome, monosodium, etc.

Dexie.js has a function for prefix filtering, but no substring filter.

@maradotwebp
Copy link
Contributor

Like I briefly mentioned in #34, implementing this in BlinkDB would provide no performance benefit over

const users = (await many(userTable))
  .filter(u => u.startsWith("hell"));

I'm considering adding support for custom function filters in BlinkDB, which would also cover this case.

@ericvida
Copy link
Author

Ok. Thank you.

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

2 participants