Skip to content

Support YAML anchors in sqlc.yaml#2653

@kevinvalk

Description

@kevinvalk

What do you want to change?

Currently I am working on a microservices project using SQLC. All is fine, but I find myself repeating the same configuration options for each codegen section. Using YAML anchors this would be trivial and very nice, but this is currently not supported.

Then I could do something like the following.

sql: - schema: databasequeries: services/aengine: postgresqlcodegen: - out: gateway/src/gateway/services/organizationplugin: pyoptions: &base-optionsquery_parameter_limit: 1package: gatewayoutput_models_file_name: nullemit_module: trueemit_generators: falseemit_async: true - schema: databasequeries: services/bengine: postgresqlcodegen: - out: gateway/src/gateway/services/projectplugin: pyoptions: *base-options

https://play.sqlc.dev/p/32c6b52785ce13ddfeb2311a2a835800d2578b56bf1addd95887e3fe45d2ace0

What database engines need to be changed?

No response

What programming language backends need to be changed?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⚙️ processProcess-based pluginsbugSomething isn't workingpanic

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions