codegen

package
v1.2.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package codegen exposes the metaquery code generator as a library — the same function sqlc invokes when it spawns the `plugin` binary, but importable from any Go program.

The intended use case: a downstream project's dev tool wires the generator into its own binary so `sqlc generate` can be driven without installing a separate plugin executable on the host. `plugin/main.go` itself is now a thin wrapper around this package — keeping the installable plugin binary as the supported path while letting embedders skip the install dance entirely.

Example:

import (
    "github.com/sqlc-dev/plugin-sdk-go/codegen"
    mqc "github.com/iodesystems/sqlc-go-codegen-metaquery/metaquery/codegen"
)

func main() { codegen.Run(mqc.Generate) }

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

Generate is the codegen entry point. Signature matches `codegen.Handler` from plugin-sdk-go so it can be passed directly to `codegen.Run`.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL