Skip to content

QueryStore on database level #690

Open
@martijnschermers

Description

I'm thinking of a way to save and load queries to and from a table in the database. From how I understand it at the moment it is only possible to read queries from a folder on the file system. Is it an idea to read queries from a table in the database?

To implement this I'm thinking about using the following approach:

  • Convert store.go to file_store.go
  • Add database_store.go
  • Make a store.go interface with generic methods
  • Find a way to make a choice between file or database (probably through a command line option)
  • Inject the correct type (file or database) in the application

The first four options are pretty basic to implement, but I'm struggling at the fifth option. Does anyone have some suggestion on how to inject the correct type?

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions