-
Notifications
You must be signed in to change notification settings - Fork 1
First ydb-go-sdk generation version (See #4) #6
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
Conversation
…ort .Query(...) syntax
…er instead of database/sql
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…sultSet(...). + Refactored some test examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds native YDB Go SDK support to sqlc for YDB database engine, moving from the standard database/sql interface to the YDB-specific SDK. The implementation includes code generation templates, configuration updates, and example adaptations.
- Adds YDB Go SDK as a new SQL package option (
ydb-go-sdk) - Implements YDB-specific code generation templates for queries, interfaces, and database connections
- Updates configuration schema to support YDB as an engine option
Reviewed Changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/sqltest/local/ydb.go | Refactored YDB test setup to use native YDB SDK instead of database/sql |
| internal/config/v_two.json | Added "ydb" as a valid database engine option |
| internal/codegen/golang/templates/ydb-go-sdk/* | New YDB-specific code generation templates for queries, interfaces, and database code |
| internal/codegen/golang/templates/template.tmpl | Integrated YDB template conditions into main template |
| internal/codegen/golang/query.go | Added YDB parameter mapping functionality |
| internal/codegen/golang/opts/enum.go | Added YDB Go SDK package and driver constants |
| internal/codegen/golang/imports.go | Added YDB-specific import handling |
| internal/codegen/golang/gen.go | Added validation for unsupported YDB commands |
| internal/codegen/golang/driver.go | Added YDB driver parsing support |
| go.mod | Updated YDB Go SDK version |
| examples/authors/ydb/* | Updated example to use new YDB Go SDK interface |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This PR adds native YDB Go SDK support to sqlc for YDB database engine, moving from the standard database/sql interface to the YDB-specific SDK. The implementation includes code generation templates, configuration updates, and example adaptations. Adds YDB Go SDK as a new SQL package option (ydb-go-sdk) Implements YDB-specific code generation templates for queries, interfaces, and database connections Updates configuration schema to support YDB as an engine option
See (#4)
Added native ydb-go-sdk generation support for YDB engine. Supported :queryrows comment to add support for
.Query(...)method.