Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnValue ¶
ColumnValue pairs a column name with its new value for mutation queries. If Value is a RawExpr, the dialect should embed it as literal SQL instead of a parameter.
type Dialect ¶
type Dialect interface {
BuildSelect(node ast.SelectNode) Result
BuildInsert(table string, columns []string, values []any, returningCols []string) Result
BuildUpdate(table string, changes []ColumnValue, pkColumn string, pkValue any) Result
BuildDelete(table string, pkColumn string, pkValue any) Result
BuildSoftDelete(table string, pkColumn string, pkValue any) Result
BuildUpdateVersioned(table string, changes []ColumnValue, pkColumn string, pkValue any, versionCol string, currentVersion int) Result
BuildBulkInsert(table string, columns []string, rows [][]any) Result
BuildBulkUpdate(table string, sets []ColumnValue, where *ast.WhereClause) Result
BuildBulkDelete(table string, where *ast.WhereClause) Result
BuildBulkSoftDelete(table string, where *ast.WhereClause) Result
BuildBulkUpsert(table string, columns []string, rows [][]any, conflictCols []string, updateCols []string) Result
}
Dialect generates SQL for a specific database backend.
Click to show internal directories.
Click to hide internal directories.