dialect

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package dialect defines the minimal surface of differences between databases. The MVP implements only PostgreSQL (dialect/pg); MySQL and SQLite are added by implementing this interface without changing the runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialect

type Dialect interface {
	// Name is the dialect name: "postgres", "mysql", "sqlite".
	Name() string
	// Placeholder returns the placeholder for the n-th argument (1-based): $1 or ?.
	Placeholder(n int) string
	// QuoteIdent quotes an identifier (table, column).
	QuoteIdent(s string) string
	// ReturningSupported reports whether INSERT ... RETURNING is available
	// (PG: yes; MySQL: no; SQLite: intentionally uses the LastInsertId path
	// shared with MySQL).
	ReturningSupported() bool
}

Dialect covers textual SQL differences; the batching strategy lives in the driver adapters.

Directories

Path Synopsis
Package lite implements the SQLite dialect.
Package lite implements the SQLite dialect.
Package my implements the MySQL/MariaDB dialect.
Package my implements the MySQL/MariaDB dialect.
Package pg implements the PostgreSQL dialect.
Package pg implements the PostgreSQL dialect.

Jump to

Keyboard shortcuts

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