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: Automatically declare named expressions for query parameters #333

Open
Gaspero opened this issue Nov 15, 2023 · 0 comments
Open

feat: Automatically declare named expressions for query parameters #333

Gaspero opened this issue Nov 15, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Gaspero
Copy link

Gaspero commented Nov 15, 2023

Feature Request

Describe the Feature Request

Automatically declare named expressions for query parameters so that developer could avoid writing "DECLARE $ ... AS Type;" manually for each parameter.

Describe Preferred Solution

Pass WithAutoDeclare as an option when initializing DB driver.

Describe Alternatives

Provide a helper that could be used to wrap individual queries.

Related Code

Go SDK reference implementation.
https://github.com/ydb-platform/ydb-go-sdk/blob/17e76a4a2c01f5a7a0e10f5a60b31602d4575ef9/internal/bind/auto_declare.go

Additional Context

This feature would play nicely with Kysely Adapter and is partially implemented in it. I think that this functionality should belong to SDK. #332

If the feature request is approved, would you be willing to submit a PR?

Yes

@Gaspero Gaspero added the enhancement New feature or request label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant