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

Merging multiple SQL queries (useMultiSQL) #18

Open
joshmedeski opened this issue Jul 26, 2023 · 0 comments
Open

Merging multiple SQL queries (useMultiSQL) #18

joshmedeski opened this issue Jul 26, 2023 · 0 comments

Comments

@joshmedeski
Copy link

I'd like to support calling multiple SQL databases and return the results together with one hook (see raycast/extensions#7665).

Can we create a useMultiSQL hook that accepts an array of paths to local SQL files and return the data, loading state and

  const { data, isLoading, permissionView } = useMultiSQL<HistoryEntry>([defaultHistory, profile1History, profile2History], getHistoryQuery(searchText));

Is this a good idea? I know there is a consideration on performance here and error handling if one of the DBs fails or returns data in an inconsistent format.

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