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

Parameterized Queries #99

Open
jamesgpearce opened this issue Sep 27, 2023 · 1 comment
Open

Parameterized Queries #99

jamesgpearce opened this issue Sep 27, 2023 · 1 comment
Assignees
Labels
distant aspiration Something that might be nice but probably hard and/or no immediate plans. roadmap You should be able to see this on https://github.com/orgs/tinyplex/projects/1

Comments

@jamesgpearce
Copy link
Contributor

No description provided.

@jamesgpearce jamesgpearce added the distant aspiration Something that might be nice but probably hard and/or no immediate plans. label Sep 27, 2023
@jamesgpearce jamesgpearce self-assigned this Sep 27, 2023
@jamesgpearce jamesgpearce added the roadmap You should be able to see this on https://github.com/orgs/tinyplex/projects/1 label Nov 9, 2023
@waynesbrain
Copy link

waynesbrain commented Sep 6, 2024

@jamesgpearce Hello again, unsolicited and possibly uninformed opinion (and questions) incoming...

I was looking at how queries are implemented today and seeing how they immediately start listening to tables and maintaining results when defined I thought that these queries behave more like how a View might be implemented in an SQL db. I might have misunderstood something here though.

If that is the case, perhaps you would consider renaming queries to views and making a new query system that just runs ad-hoc queries? Passing parameters seems to be the dividing line between adhoc SQL queries and SQL views (which are just a continually running queries that you can't pass parameters to).

Parameters would also certainly be easier to add to an adhoc query system and the API would make more sense too IMO. Currently to create my own parameterized queries I am just creating functions that use store, index, or relationship methods to get the data. While doing this I assume that, if I don't do anything async, that I'm basically working with a stable snapshot of the store. Is that correct? (Thinking more about this - perhaps that is only guaranteed inside of a store.transaction()?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distant aspiration Something that might be nice but probably hard and/or no immediate plans. roadmap You should be able to see this on https://github.com/orgs/tinyplex/projects/1
Projects
Status: Planned
Development

No branches or pull requests

2 participants