Skip to content

Merging multiple SQL queries (useMultiSQL) #18

Description

@joshmedeski

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Severity

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions