dialect

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package dialect defines the interface for database-specific introspection, DDL rendering, and transactional locking behaviors.

Dependency rule: dialect is the only layer that knows SQL syntax and engine catalog details. It depends on internal/schema, internal/scope, internal/diff, and internal/plan.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX 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
}

DBTX specifies the common SQL executor interface satisfied by *sql.DB, *sql.Tx, and *sql.Conn.

type Dialect

type Dialect interface {
	Name() string
	Introspect(ctx context.Context, dbtx DBTX, targetSchema string) (*schema.Schema, error)
	Render(step plan.Step) ([]Stmt, error)
}

Dialect specifies the database-specific behavior for introspection, DDL rendering, and locking.

type Stmt

type Stmt struct {
	SQL   string
	NonTx bool
}

Stmt represents a single SQL statement to be executed with its transactional requirement.

Directories

Path Synopsis
Package postgres implements PostgreSQL-specific introspection, DDL rendering, advisory locking, and shadow schema compilation.
Package postgres implements PostgreSQL-specific introspection, DDL rendering, advisory locking, and shadow schema compilation.
Package sqlite implements SQLite-specific schema introspection, in-memory shadow validation, and the 12-step table rebuild engine.
Package sqlite implements SQLite-specific schema introspection, in-memory shadow validation, and the 12-step table rebuild engine.

Jump to

Keyboard shortcuts

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