Skip to content

Conversation

asmyasnikov
Copy link

No description provided.

@asmyasnikov asmyasnikov changed the title YDB support YDB support (draft) Sep 3, 2025
1NepuNep1 and others added 10 commits September 3, 2025 12:41
… integration

- Added reserved keywords and parsing logic
- CREATE TABLE support and tests
- SELECT initial support and tests
- Initial YDB engine integration and examples
USE ...
PRAGMA
CREATE USER
CREATE GROUP
COMMIT
RESTORE

also added some new tests and debugged old code for mistakes
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
@kyleconroy
Copy link
Collaborator

@asmyasnikov appreciate the effort here! Right now supporting the three existing database engines is challenging enough. I have some longer term plans on making that easy, but in the meantime, I'm not going to merge support for YDB. I'd encourage you to maintain this as a fork until things are in a place where supporting custom engines is easier.

@asmyasnikov
Copy link
Author

@kyleconroy What do you think of using an external database engine as a plugin, similar to a database/sql or GORM (for example using "_" import for register engine)?

1NepuNep1 and others added 2 commits September 8, 2025 13:23
…rted DISTINCT, HAVING, GROUP BY, ORDER BY, LIMIT, OFFSET, UNION), added ALTER TABLE, DO stmt) (#10)

* Added ALTER TABLE support

* Added DO stmt support

* Fixed DO stmt generation

* Refactored SELECT logic. Supported DISTINCT, HAVING, GROUP BY, ORDER BY, LIMIT, OFFSET, UNION

* Fixed style and types

* Refactored DO stmt style & added some additional converts

---------

Co-authored-by: Viktor Pentyukhov <nepunep@172.28.98.114-red.dhcp.yndx.net>
* Made new params building logic & got rid off .Query handle (replaced it with QueryResultSet)

* Cosmetics

* Bug fixes

---------

Co-authored-by: Viktor Pentyukhov <nepunep@172.28.98.114-red.dhcp.yndx.net>
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

Successfully merging this pull request may close these issues.

3 participants