Documentation
¶
Overview ¶
Package sqlgen provides the runtime library that generated code imports. Keep this package small and stable; it's a public API.
Index ¶
- Variables
- func Bind(ctx context.Context, exec Executor, q *Query, dest any) error
- func BuildBatchInsert(dialect Dialect, table string, cols []string, rows [][]any, returning []string) (string, []any)
- func BuildDelete(dialect Dialect, table string, whereClauses []string, whereArgs []any) (string, []any)
- func BuildInsert(dialect Dialect, table string, cols []string, vals []any, returning []string) (string, []any)
- func BuildInsertSelect(dialect Dialect, table string, cols []string, selectQuery *Query, ...) (string, []any)
- func BuildUpdate(dialect Dialect, table string, setCols []string, setVals []any, ...) (string, []any)
- func BuildUpsert(dialect Dialect, table string, cols []string, vals []any, ...) (string, []any)
- func Count(ctx context.Context, exec Executor, dialect Dialect, table string, ...) (int64, error)
- func Each[T RowScanner](ctx context.Context, exec Executor, q *Query, newFn func() T, fn func(T) error) error
- func ExecQuery(ctx context.Context, exec Executor, query string, args ...any) (sql.Result, error)
- func Exists(ctx context.Context, exec Executor, dialect Dialect, table string, ...) (bool, error)
- func FieldPointers(v any, cols []string) ([]any, error)
- func FilterColumns(cols []string, vals []any, filter ...Columns) ([]string, []any)
- func IsCheckViolation(err error, c Constraint) bool
- func IsConstraintViolation(err error, c Constraint) bool
- func IsForeignKeyViolation(err error, c Constraint) bool
- func IsNotNullViolation(err error, c Constraint) bool
- func IsUniqueViolation(err error, c Constraint) bool
- func LoadCount(ctx context.Context, exec Executor, dialect Dialect, table string, ...) (map[string]int64, error)
- func LoadMany(ctx context.Context, exec Executor, dialect Dialect, table string, ...) (*sql.Rows, error)
- func LoadManyToMany(ctx context.Context, exec Executor, dialect Dialect, ...) (*sql.Rows, string, error)
- func LoadManyToManyCount(ctx context.Context, exec Executor, dialect Dialect, ...) (map[string]int64, error)
- func LoadOne(ctx context.Context, exec Executor, dialect Dialect, table string, ...) (*sql.Row, error)
- func LoadPolymorphicCount(ctx context.Context, exec Executor, dialect Dialect, ...) (map[string]int64, error)
- func LoadPolymorphicMany(ctx context.Context, exec Executor, dialect Dialect, ...) (*sql.Rows, error)
- func QueryRow(ctx context.Context, exec Executor, query string, args ...any) *sql.Row
- func QueryRows(ctx context.Context, exec Executor, query string, args ...any) (*sql.Rows, error)
- func ScanOne[T any](rows *sql.Rows, scanFn func(*sql.Rows) (T, error)) (T, error)
- func ScanRow(row *sql.Row, dests ...any) error
- func ScanRows[T any](rows *sql.Rows, scanFn func(*sql.Rows) (T, error)) ([]T, error)
- func ShouldSkipHooks(ctx context.Context) bool
- func SkipHooks(ctx context.Context) context.Context
- type CachedExecutor
- func (c *CachedExecutor) Close() error
- func (c *CachedExecutor) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (c *CachedExecutor) Len() int
- func (c *CachedExecutor) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
- func (c *CachedExecutor) QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
- type ColumnMap
- type Columns
- type Constraint
- type CountLoadFunc
- type Cursor
- type DebugExecutor
- func (d *DebugExecutor) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (d *DebugExecutor) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
- func (d *DebugExecutor) QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
- type Dialect
- type EagerLoadRequest
- type Executor
- type Hook
- type HookPoint
- type Hooks
- func (h *Hooks) Add(point HookPoint, fn Hook)
- func (h *Hooks) Has(point HookPoint) bool
- func (h *Hooks) Run(ctx context.Context, exec Executor, point HookPoint, model any) (context.Context, error)
- func (h *Hooks) RunIfEnabled(ctx context.Context, exec Executor, point HookPoint, model any) (context.Context, error)
- type LoadFunc
- type Null
- type PostgresDialect
- type PreloadDef
- type Preparer
- type Query
- type QueryMod
- func CrossJoin(table string) QueryMod
- func Distinct() QueryMod
- func DistinctOn(cols ...string) QueryMod
- func Except(sub *Query) QueryMod
- func ExceptAll(sub *Query) QueryMod
- func Expr(mods ...QueryMod) QueryMod
- func ForKeyShare() QueryMod
- func ForNoKeyUpdate() QueryMod
- func ForShare() QueryMod
- func ForUpdate() QueryMod
- func FromSubquery(alias string, sub *Query) QueryMod
- func FullJoin(table, on string, args ...any) QueryMod
- func GroupBy(cols ...string) QueryMod
- func Having(clause string, args ...any) QueryMod
- func Intersect(sub *Query) QueryMod
- func IntersectAll(sub *Query) QueryMod
- func Join(table, on string, args ...any) QueryMod
- func LeftJoin(table, on string, args ...any) QueryMod
- func Limit(n int) QueryMod
- func Nowait() QueryMod
- func Offset(n int) QueryMod
- func Or(clause string, args ...any) QueryMod
- func OrderBy(cols ...string) QueryMod
- func Preload(def PreloadDef) QueryMod
- func RightJoin(table, on string, args ...any) QueryMod
- func Select(cols ...string) QueryMod
- func SelectWithWindow(expr string, w *WindowDef, alias string) QueryMod
- func SkipLocked() QueryMod
- func Union(sub *Query) QueryMod
- func UnionAll(sub *Query) QueryMod
- func Where(clause string, args ...any) QueryMod
- func WhereExists(sub *Query) QueryMod
- func WhereIn(col string, vals ...any) QueryMod
- func WhereNotExists(sub *Query) QueryMod
- func WhereSubquery(col string, op string, sub *Query) QueryMod
- func WithCTE(name string, query string, args ...any) QueryMod
- func WithRecursiveCTE(name string, query string, args ...any) QueryMod
- type RawQueryResult
- func (r *RawQueryResult) Exec(ctx context.Context, exec Executor) (sql.Result, error)
- func (r *RawQueryResult) QueryRow(ctx context.Context, exec Executor) *sql.Row
- func (r *RawQueryResult) QueryRows(ctx context.Context, exec Executor) (*sql.Rows, error)
- func (r *RawQueryResult) SQL() (string, []any)
- type RowScanner
- type WindowDef
Constants ¶
This section is empty.
Variables ¶
var ErrNoRows = sql.ErrNoRows
ErrNoRows is re-exported for convenience so generated code doesn't need to import database/sql.
Functions ¶
func Bind ¶
Bind executes a query and scans the results into dest. dest must be a pointer to a struct (for a single row) or a pointer to a slice of structs.
Column-to-field matching uses `db` tags first, then `json` tags. Unmatched columns are silently discarded.
Examples:
var users []User err := sqlgen.Bind(ctx, db, q, &users) var user User err := sqlgen.Bind(ctx, db, q, &user) // returns sql.ErrNoRows if none
func BuildBatchInsert ¶
func BuildBatchInsert(dialect Dialect, table string, cols []string, rows [][]any, returning []string) (string, []any)
BuildBatchInsert builds a multi-row INSERT query. Each element of rows must have the same length as cols.
func BuildDelete ¶
func BuildDelete(dialect Dialect, table string, whereClauses []string, whereArgs []any) (string, []any)
BuildDelete builds a DELETE query.
func BuildInsert ¶
func BuildInsert(dialect Dialect, table string, cols []string, vals []any, returning []string) (string, []any)
BuildInsert builds an INSERT query with a RETURNING clause (if supported).
func BuildInsertSelect ¶
func BuildInsertSelect(dialect Dialect, table string, cols []string, selectQuery *Query, returning []string) (string, []any)
BuildInsertSelect builds an INSERT INTO ... SELECT ... query. The selectQuery is a *Query whose BuildSelect output becomes the data source.
func BuildUpdate ¶
func BuildUpdate(dialect Dialect, table string, setCols []string, setVals []any, whereClauses []string, whereArgs []any) (string, []any)
BuildUpdate builds an UPDATE query.
func BuildUpsert ¶
func BuildUpsert(dialect Dialect, table string, cols []string, vals []any, conflictCols []string, updateCols []string, returning []string) (string, []any)
BuildUpsert builds an INSERT ... ON CONFLICT DO UPDATE query (Postgres).
func Count ¶
func Count(ctx context.Context, exec Executor, dialect Dialect, table string, mods ...QueryMod) (int64, error)
Count builds and executes a COUNT(*) query.
func Each ¶
func Each[T RowScanner](ctx context.Context, exec Executor, q *Query, newFn func() T, fn func(T) error) error
Each executes a query and calls fn for each row. Rows are scanned into new instances created by the newFn factory. Iteration stops early if fn returns an error.
func Exists ¶
func Exists(ctx context.Context, exec Executor, dialect Dialect, table string, mods ...QueryMod) (bool, error)
Exists builds and executes an EXISTS query.
func FieldPointers ¶
FieldPointers returns a slice of pointers to struct fields in column order. This is used by generated code to create scan destinations. The struct must have exported fields matching the column map.
func FilterColumns ¶
FilterColumns applies column filtering to parallel col/val slices. If no Columns is provided (or zero value), all columns pass through.
func IsCheckViolation ¶
func IsCheckViolation(err error, c Constraint) bool
IsCheckViolation checks if err is a CHECK constraint violation for the given constraint.
func IsConstraintViolation ¶
func IsConstraintViolation(err error, c Constraint) bool
IsConstraintViolation checks if err is any constraint violation for the given constraint, regardless of violation type.
func IsForeignKeyViolation ¶
func IsForeignKeyViolation(err error, c Constraint) bool
IsForeignKeyViolation checks if err is a FK constraint violation for the given constraint.
func IsNotNullViolation ¶
func IsNotNullViolation(err error, c Constraint) bool
IsNotNullViolation checks if err is a NOT NULL violation for the given constraint.
func IsUniqueViolation ¶
func IsUniqueViolation(err error, c Constraint) bool
IsUniqueViolation checks if err is a unique constraint violation for the given constraint.
func LoadCount ¶
func LoadCount(ctx context.Context, exec Executor, dialect Dialect, table string, fkCol string, parentIDs []any) (map[string]int64, error)
LoadCount executes a COUNT(*) GROUP BY query for a HasMany relationship. Returns a map from FK value (as string) to count.
func LoadMany ¶
func LoadMany(ctx context.Context, exec Executor, dialect Dialect, table string, fkCol string, parentIDs []any, mods ...QueryMod) (*sql.Rows, error)
LoadMany executes a query to load related records for a set of parent PKs. It returns the raw rows; generated code handles scanning and assignment. Optional mods are applied to the query (e.g., Where, OrderBy, Limit).
func LoadManyToMany ¶
func LoadManyToMany(ctx context.Context, exec Executor, dialect Dialect, targetTable, joinTable, joinLocalCol, joinForeignCol, targetPKCol string, localIDs []any, mods ...QueryMod) (*sql.Rows, string, error)
LoadManyToMany executes a query to load related records through a join table. Optional mods are applied to filter the target records.
func LoadManyToManyCount ¶
func LoadManyToManyCount(ctx context.Context, exec Executor, dialect Dialect, joinTable, joinLocalCol, joinForeignCol string, localIDs []any) (map[string]int64, error)
LoadManyToManyCount executes a COUNT(*) GROUP BY query for a ManyToMany relationship. Returns a map from local FK value (as string) to count.
func LoadOne ¶
func LoadOne(ctx context.Context, exec Executor, dialect Dialect, table string, fkCol string, fkVal any) (*sql.Row, error)
LoadOne executes a query to load a single related record by FK value.
func LoadPolymorphicCount ¶
func LoadPolymorphicCount(ctx context.Context, exec Executor, dialect Dialect, foreignTable, typeCol, typeVal, idCol string, parentIDs []any) (map[string]int64, error)
LoadPolymorphicCount loads counts for a polymorphic HasMany relationship.
func LoadPolymorphicMany ¶
func LoadPolymorphicMany(ctx context.Context, exec Executor, dialect Dialect, foreignTable, typeCol, typeVal, idCol string, parentIDs []any, mods ...QueryMod) (*sql.Rows, error)
LoadPolymorphicMany loads related records from a polymorphic table, filtering by type value. It queries: SELECT * FROM foreignTable WHERE typeCol = typeVal AND idCol IN (parentIDs)
func ScanOne ¶
ScanOne scans a single row from sql.Rows, returning an error if no rows or more than one.
func ScanRow ¶
ScanRow scans a single row into a slice of destination pointers, ordered to match the columns returned by the query.
func ScanRows ¶
ScanRows scans a sql.Rows result set, calling scanFn for each row. scanFn receives the rows and should scan into the target struct.
func ShouldSkipHooks ¶
ShouldSkipHooks returns true if SkipHooks was called on this context.
Types ¶
type CachedExecutor ¶
type CachedExecutor struct {
// contains filtered or unexported fields
}
CachedExecutor wraps a database connection with automatic prepared statement caching. The same query string is prepared once and reused on subsequent calls.
Safe for concurrent use. Create one per *sql.DB for long-lived caching, or one per *sql.Tx for transaction-scoped caching.
Usage:
cached := sqlgen.NewCachedExecutor(db) defer cached.Close() user, err := models.FindUserByPK(ctx, cached, 1)
func NewCachedExecutor ¶
func NewCachedExecutor(conn interface {
Executor
Preparer
}) *CachedExecutor
NewCachedExecutor creates a CachedExecutor. The conn must implement both Executor and Preparer (satisfied by *sql.DB and *sql.Tx).
func (*CachedExecutor) Close ¶
func (c *CachedExecutor) Close() error
Close closes all cached prepared statements. Always call when done.
func (*CachedExecutor) ExecContext ¶
func (c *CachedExecutor) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
ExecContext implements Executor.
func (*CachedExecutor) Len ¶
func (c *CachedExecutor) Len() int
Len returns the number of cached prepared statements.
func (*CachedExecutor) QueryContext ¶
func (c *CachedExecutor) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
QueryContext implements Executor.
func (*CachedExecutor) QueryRowContext ¶
QueryRowContext implements Executor.
type ColumnMap ¶
type ColumnMap struct {
Columns []string // Column names in field order
// contains filtered or unexported fields
}
ColumnMap maps column names to their index in a struct's fields. Generated code provides these statically per model.
func NewColumnMap ¶
NewColumnMap creates a column mapping from ordered column names.
type Columns ¶
type Columns struct {
// contains filtered or unexported fields
}
Columns controls which columns are included in Insert/Update/Upsert operations. Use Whitelist or Blacklist to create one.
type Constraint ¶
type Constraint string
Constraint is a named database constraint for error matching.
type CountLoadFunc ¶
type CountLoadFunc func(ctx context.Context, exec Executor, dialect Dialect, parentModels any) error
CountLoadFunc is the signature for generated count loader functions.
type Cursor ¶
type Cursor[T RowScanner] struct { // contains filtered or unexported fields }
Cursor wraps *sql.Rows and provides typed iteration over query results.
func NewCursor ¶
func NewCursor[T RowScanner](ctx context.Context, exec Executor, q *Query, newFn func() T) (*Cursor[T], error)
NewCursor creates a Cursor that iterates over the given query results.
type DebugExecutor ¶
DebugExecutor wraps an Executor and prints SQL before executing.
func Debug ¶
func Debug(exec Executor) *DebugExecutor
Debug creates a DebugExecutor that logs to os.Stderr.
func DebugTo ¶
func DebugTo(exec Executor, w io.Writer) *DebugExecutor
DebugTo creates a DebugExecutor that logs to the given writer.
func (*DebugExecutor) ExecContext ¶
func (d *DebugExecutor) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
ExecContext implements Executor.
func (*DebugExecutor) QueryContext ¶
func (d *DebugExecutor) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
QueryContext implements Executor.
func (*DebugExecutor) QueryRowContext ¶
QueryRowContext implements Executor.
type Dialect ¶
type Dialect interface {
// Placeholder returns the parameter placeholder for the nth argument (1-indexed).
// Postgres: $1, $2, ... MySQL: ?, SQLite: ?
Placeholder(n int) string
// QuoteIdent quotes an identifier (table name, column name).
QuoteIdent(name string) string
// SupportsReturning returns true if the dialect supports RETURNING clauses.
SupportsReturning() bool
}
Dialect provides database-specific SQL generation behavior.
type EagerLoadRequest ¶
type EagerLoadRequest struct {
Name string // Relationship name (e.g., "Posts", "User")
Mods []QueryMod // Optional mods to apply to the loading query
Nested []*EagerLoadRequest // Nested loads (e.g., "Posts.Tags")
}
EagerLoadRequest represents a request to eagerly load a relationship.
func Load ¶
func Load(name string, mods ...QueryMod) *EagerLoadRequest
Load creates an EagerLoadRequest. Supports dot-notation for nested loading. Optional QueryMods filter the loaded relationship.
type Executor ¶
type Executor interface {
ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
}
Executor is the interface for running queries. Satisfied by *sql.DB, *sql.Tx, etc.
type Hook ¶
Hook is a lifecycle function that runs before or after a database operation. Returning an error from a "before" hook cancels the operation.
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Hooks stores registered hooks per hook point.
func (*Hooks) Run ¶
func (h *Hooks) Run(ctx context.Context, exec Executor, point HookPoint, model any) (context.Context, error)
Run executes all hooks registered at the given point in order. The context is chained through each hook. If any hook returns an error, execution stops and the error is returned.
type LoadFunc ¶
type LoadFunc func(ctx context.Context, exec Executor, dialect Dialect, parentModels any, loads []*EagerLoadRequest) error
LoadFunc is the signature for generated loader functions. It takes the parent models, exec, dialect, and loads, then populates .R fields.
type Null ¶
Null represents an optional value that may be NULL in the database. The zero value is null (Valid = false).
func (Null[T]) MarshalJSON ¶
MarshalJSON implements json.Marshaler. Null values produce "null".
func (*Null[T]) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler. JSON "null" produces a null value.
type PostgresDialect ¶
type PostgresDialect struct{}
PostgresDialect implements Dialect for PostgreSQL.
func (PostgresDialect) Placeholder ¶
func (PostgresDialect) Placeholder(n int) string
func (PostgresDialect) QuoteIdent ¶
func (PostgresDialect) QuoteIdent(name string) string
func (PostgresDialect) SupportsReturning ¶
func (PostgresDialect) SupportsReturning() bool
type PreloadDef ¶
type PreloadDef struct {
Name string // Relationship name (e.g., "Organization")
Table string // Related table name
JoinCond string // ON clause (e.g., "organizations"."id" = "users"."org_id")
Columns []string // Aliased SELECT expressions (e.g., "organizations"."id" AS __p_Organization_id)
}
PreloadDef describes how to LEFT JOIN a related table for preloading. Generated code creates these per-relationship.
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query builds a SQL query incrementally using composable mods.
func (*Query) BuildDeleteAll ¶
BuildDeleteAll builds a DELETE FROM ... WHERE ... query using the query's where parts.
func (*Query) BuildSelect ¶
BuildSelect builds a SELECT query, returning the SQL string and args.
func (*Query) BuildUpdateAll ¶
BuildUpdateAll builds an UPDATE ... SET ... WHERE ... query using the query's where parts.
func (*Query) Preloads ¶
func (q *Query) Preloads() []PreloadDef
Preloads returns the preload definitions registered on this query.
type QueryMod ¶
type QueryMod func(q *Query)
QueryMod is a function that modifies a query builder.
func DistinctOn ¶
DistinctOn adds DISTINCT ON (cols...) to the SELECT clause (Postgres-specific).
func Expr ¶
Expr creates a parenthesized group of conditions from the given mods. Only WHERE-related mods (Where, Or) are meaningful inside an Expr.
func ForKeyShare ¶
func ForKeyShare() QueryMod
ForKeyShare adds FOR KEY SHARE row locking to the query.
func ForNoKeyUpdate ¶
func ForNoKeyUpdate() QueryMod
ForNoKeyUpdate adds FOR NO KEY UPDATE row locking to the query.
func FromSubquery ¶
FromSubquery replaces the FROM table with a subquery: FROM (SELECT ...) AS alias.
func IntersectAll ¶
IntersectAll appends an INTERSECT ALL to the query.
func Nowait ¶
func Nowait() QueryMod
Nowait adds NOWAIT to the row locking clause. Must be used with ForUpdate/ForShare.
func Preload ¶
func Preload(def PreloadDef) QueryMod
Preload adds a LEFT JOIN eager load for a to-one relationship. The PreloadDef is generated per-relationship on each model.
func SelectWithWindow ¶
SelectWithWindow adds a column expression with a window function to the SELECT clause. Example: SelectWithWindow("ROW_NUMBER()", windowDef, "row_num")
func SkipLocked ¶
func SkipLocked() QueryMod
SkipLocked adds SKIP LOCKED to the row locking clause. Must be used with ForUpdate/ForShare.
func Where ¶
Where adds a WHERE clause. Multiple calls are ANDed together. Use dialect-appropriate placeholders in the clause.
func WhereExists ¶
WhereExists adds a WHERE EXISTS (SELECT ...) clause.
func WhereNotExists ¶
WhereNotExists adds a WHERE NOT EXISTS (SELECT ...) clause.
func WhereSubquery ¶
WhereSubquery adds a WHERE col op (SELECT ...) clause. The op is typically "IN", "NOT IN", "=", "<", etc.
type RawQueryResult ¶
type RawQueryResult struct {
// contains filtered or unexported fields
}
RawQueryResult holds a raw SQL query and its arguments.
func RawSQL ¶
func RawSQL(query string, args ...any) *RawQueryResult
RawSQL creates a RawQueryResult from a raw SQL string and arguments.
func (*RawQueryResult) SQL ¶
func (r *RawQueryResult) SQL() (string, []any)
SQL returns the raw SQL query and its arguments.
type RowScanner ¶
RowScanner is the interface for types that can scan from a database row.
type WindowDef ¶
type WindowDef struct {
// contains filtered or unexported fields
}
WindowDef defines a window for use with window functions.
func (*WindowDef) Frame ¶
Frame sets the frame specification (e.g., "ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW").
func (*WindowDef) PartitionBy ¶
PartitionBy sets the PARTITION BY columns.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
sqlgen
command
|
|
|
Package config handles sqlgen configuration parsing and validation.
|
Package config handles sqlgen configuration parsing and validation. |
|
examples
|
|
|
basic
command
This example demonstrates the sqlgen generated API.
|
This example demonstrates the sqlgen generated API. |
|
introspect
command
This example demonstrates generating code from a live Postgres database using DSN-based introspection.
|
This example demonstrates generating code from a live Postgres database using DSN-based introspection. |
|
Package fake provides random value generators for use in generated factory functions.
|
Package fake provides random value generators for use in generated factory functions. |
|
Package gen implements the code generation engine for sqlgen.
|
Package gen implements the code generation engine for sqlgen. |
|
internal
|
|
|
naming
Package naming provides utilities for converting between naming conventions used in database schemas and Go code.
|
Package naming provides utilities for converting between naming conventions used in database schemas and Go code. |
|
Package schema defines the intermediate representation (IR) for database schemas.
|
Package schema defines the intermediate representation (IR) for database schemas. |
|
mysql
Package mysql implements a hand-written DDL parser for MySQL.
|
Package mysql implements a hand-written DDL parser for MySQL. |
|
postgres
Package postgres implements a DDL parser for PostgreSQL using pg_query_go.
|
Package postgres implements a DDL parser for PostgreSQL using pg_query_go. |
|
sqlite
Package sqlite implements a hand-written DDL parser for SQLite.
|
Package sqlite implements a hand-written DDL parser for SQLite. |