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

Allow same rdbms.Client to be reused for whole request #20

Open
benhalstead opened this issue Apr 15, 2019 · 0 comments
Open

Allow same rdbms.Client to be reused for whole request #20

benhalstead opened this issue Apr 15, 2019 · 0 comments

Comments

@benhalstead
Copy link
Member

Currently validators that check a database will use a different instance of rdbms.Client as application code. This means that validation cannot occur within the same transaction as queries to insert/update data, potentially meaning that data could have changed between validation and insert.

Ensuring that the same instance of rdbms.Client is re-used throughout a request is a specific instance of a more common pattern of 'request scoped resources'.

This issue is:

  1. Identify and implement a common pattern for request scoped resources
  2. Add specific support for request scoped rdbms.Client objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant