Documentation
¶
Overview ¶
Package dialect abstracts SQL dialect differences: identifier quoting, parameter placeholders, EXPLAIN wrapping, and capability negotiation.
Concrete dialect implementations live in x/providers alongside each database adapter. The heavier EXPLAIN-result parsing (cost.Explainer) and schema introspection (introspect.Introspector) also stay in x/providers because they require live database access. Capabilities drive both codegen rendering and which Gate layers are assembled per database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct {
Returning bool // INSERT ... RETURNING (PG has; MySQL lacks -> exec + last insert id)
ExplainCost bool // EXPLAIN yields a numeric cost (SQLite does not)
ExplainAccurate bool // estimate trustworthiness (PG high; MySQL/OB medium; SQLite low)
}
Capabilities declares what a database supports. It drives codegen rendering (RETURNING or a second statement for the inserted key) and whether the cost gate assembles the Estimate layer. See the cost gate design.