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

Feature request: Allow supplying different config per query #120

Open
kalda341 opened this issue Jun 13, 2022 · 0 comments
Open

Feature request: Allow supplying different config per query #120

kalda341 opened this issue Jun 13, 2022 · 0 comments

Comments

@kalda341
Copy link

Currently in order to set config you need to call setConfig, which will affect all queries.

I currently use queryListener, resultListener and transactionListener in order to log requests, but I would like to be able to log with context (request id, user id, etc). This isn't possible as I have to use the same logging setup across queries.

Ideally I'd be able to create multiple instances of Zapatos - one per query (which shouldn't be a performance problem as I can use the same pool across them?), but this isn't possible as there is one global "instance".

I'd also settle for just being able to supply the config to all request functions, this would be a little less clean but still workable.

I'd be interested to hear your thoughts. Thanks!

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