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

feat(experimental): keep Store internal and add Tablename method #624

Merged
merged 7 commits into from
Oct 28, 2023

Conversation

mfridman
Copy link
Collaborator

@mfridman mfridman commented Oct 27, 2023

This PR updates the Store interface,

  1. Keep it internal only (for now, as we settle on the final API). Still an interesting discussion here: feat(experimental): replace dialect with a state.Storage interface #608
  2. Add a Tablename() string method to ensure ALL store implementations at least have it set. I don't think the goose package actually needs it, but if we're decoupling the store from the provider, we should have a single check for this in the provider constructor.
  3. Break InsertOrDelete into Insert / Delete and have insert take a InsertRequest. This way we can future-proof the ability to pass additional information to Store implementations without breaking the contract.

This would potentially allow us to expand the goose table in a backwards-compatible way, #422 #288

In addition,

  • Add WithStore option to support custom implementations.

@mfridman mfridman merged commit d59dd9f into master Oct 28, 2023
9 checks passed
@mfridman mfridman deleted the gh-379-add-tablename branch October 28, 2023 13:05
@mfridman mfridman mentioned this pull request Oct 30, 2023
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

Successfully merging this pull request may close these issues.

None yet

1 participant