Skip to content

Conversation

@1NepuNep1
Copy link
Collaborator

See (#4)

Added native ydb-go-sdk generation support for YDB engine. Supported :queryrows comment to add support for .Query(...) method.

@1NepuNep1 1NepuNep1 requested a review from Copilot August 29, 2025 15:30

This comment was marked as outdated.

1NepuNep1 and others added 3 commits August 29, 2025 19:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@1NepuNep1 1NepuNep1 requested a review from Copilot August 29, 2025 17:18

This comment was marked as outdated.

1NepuNep1 and others added 3 commits August 29, 2025 20:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@1NepuNep1 1NepuNep1 requested a review from Copilot August 29, 2025 18:04

This comment was marked as outdated.

@1NepuNep1 1NepuNep1 requested a review from Copilot September 1, 2025 13:28

This comment was marked as outdated.

@1NepuNep1 1NepuNep1 requested a review from Copilot September 1, 2025 13:30

This comment was marked as outdated.

…sultSet(...). + Refactored some test examples
@1NepuNep1 1NepuNep1 requested a review from Copilot September 2, 2025 11:24
Copy link

Copilot AI left a 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.

@1NepuNep1 1NepuNep1 merged commit bd240be into ydb-platform:ydb Sep 2, 2025
7 checks passed
1NepuNep1 added a commit that referenced this pull request Sep 3, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants