# Functions
AlterIndex returns a query builder for the `ALTER INDEX` statement.
AlterTable returns a query builder for the `ALTER TABLE` statement.
And combines all given predicates with AND between them.
And groups predicates with the AND operator between them.
As suffixed the given column with an alias (`a` AS `b`).
Asc adds the ASC suffix for the given column.
Avg wraps the ident with the AVG aggregation function.
Column returns a new ColumnBuilder with the given name.
ColumnsEQ appends a "=" predicate between 2 columns.
ColumnsGT appends a ">" predicate between 2 columns.
ColumnsGTE appends a ">=" predicate between 2 columns.
ColumnsLT appends a "<" predicate between 2 columns.
ColumnsLTE appends a "<=" predicate between 2 columns.
ColumnsNEQ appends a "<>" predicate between 2 columns.
ColumnsOp returns a new predicate between 2 columns.
CompositeGT returns a composite ">" predicate.
CompositeLT returns a composite "<" predicate.
ConflictColumns sets the unique constraints that trigger the conflict resolution on insert to perform an upsert operation.
ConflictConstraint allows setting the constraint name (i.e.
ConflictWhere allows inference of partial unique indexes.
Contains is a helper predicate that checks substring using the LIKE predicate.
ContainsFold is a helper predicate that checks substring using the LIKE predicate with case-folding.
Count wraps the ident with the COUNT aggregation function.
CreateIndex creates a builder for the `CREATE INDEX` statement.
CreateTable returns a query builder for the `CREATE TABLE` statement.
No description provided by the author
Delete creates a builder for the `DELETE` statement.
Desc adds the DESC suffix for the given column.
DescExpr returns a new expression where the DESC suffix is added.
Describe returns a query builder for the `DESCRIBE` statement.
Dialect creates a new DialectBuilder with the given dialect name.
Distinct prefixed the given columns with the `DISTINCT` keyword (DISTINCT `id`).
DoNothing configures the conflict_action to `DO NOTHING`.
DropIndex creates a builder for the `DROP INDEX` statement.
EQ returns a "=" predicate.
EqualFold is a helper predicate that applies the "=" predicate with case-folding.
Exists returns the `Exists` predicate.
Expr returns an SQL expression that implements the Querier interface.
ExprFunc returns an expression function that implements the Querier interface.
ExprP creates a new predicate from the given expression.
False appends the FALSE keyword to the predicate.
ForeignKey returns a builder for the foreign-key constraint clause in create/alter table statements.
No description provided by the author
GT returns a ">" predicate.
GTE returns a ">=" predicate.
HasPrefix is a helper predicate that checks prefix using the LIKE predicate.
HasSuffix is a helper predicate that checks suffix using the LIKE predicate.
In returns the `IN` predicate.
InInts returns the `IN` predicate for ints.
Insert creates a builder for the `INSERT INTO` statement.
Int64 scans and returns an int64 from the rows columns.
Int64s scans and returns an int64 slice form the rows columns.
InValues adds the `IN` predicate for slice of driver.Value.
IsFalse appends a predicate that checks if the column value is falsey.
IsNull returns the `IS NULL` predicate.
IsTrue appends a predicate that checks if the column value is truthy.
Like returns the `LIKE` predicate.
Lower wraps the given column with the LOWER function.
LT returns a "<" predicate.
LTE returns a "<=" predicate.
Max wraps the ident with the MAX aggregation function.
Min wraps the ident with the MIN aggregation function.
NEQ returns a "<>" predicate.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Not wraps the given predicate with the not predicate.
NotExists returns the `NotExists` predicate.
NotIn returns the `Not IN` predicate.
NotNull returns the `IS NOT NULL` predicate.
Not applies the not operator on the given predicate.
Or combines all given predicates with OR between them.
Or groups predicates with the OR operator between them.
P creates a new predicate.
Raw returns a raw SQL query that is placed as-is in the query.
Reference creates a reference builder for the reference_option clause.
ResolveWith allows setting a custom function to set the `UPDATE` clause.
ResolveWithIgnore sets each column to itself to force an update and return the ID, otherwise does not change any data.
ResolveWithNewValues updates columns using the new values proposed for insertion using the special EXCLUDED/VALUES table.
RowNumber returns a new window clause with the ROW_NUMBER() as a function.
ScanInt scans and returns an int from the rows columns.
ScanInt64 scans and returns an int64 from the rows columns.
ScanOne scans one row to the given value.
ScanSlice scans the given ColumnScanner (basically, sql.Row or sql.Rows) into the given slice.
ScanString scans and returns a string from the rows columns.
ScanValue scans and returns a driver.Value from the rows columns.
Select returns a new selector for the `SELECT` statement.
SelectExpr is like Select, but supports passing arbitrary expressions for SELECT clause.
No description provided by the author
String scans and returns an string from the rows columns.
Strings scans and returns an string slice form the rows columns.
Sum wraps the ident with the SUM aggregation function.
Table returns a new table selector.
Update creates a builder for the `UPDATE` statement.
UpdateWhere allows setting the update condition.
No description provided by the author
Window returns a new window clause with a custom selector allowing for custom window functions.
With returns a new builder for the `WITH` statement.
WithLockAction sets the Action of the lock.
WithLockClause allows providing a custom clause for locking the statement.
WithLockTables sets the Tables of the lock.
WithRecursive returns a new builder for the `WITH RECURSIVE` statement.
# Constants
A list of all locking clauses.
A list of all locking clauses.
A list of all locking clauses.
A list of all locking clauses.
NoWait means never wait and returns an error.
+.
/ (Quotient).
=.
>.
>=.
IN.
IS NULL.
LIKE.
<.
<=.
% (Reminder).
*.
<>.
NOT IN.
IS NOT NULL.
-.
SkipLocked means never wait and skip.
# Variables
No description provided by the author
# Structs
Builder is the base query builder for the sql dsl.
ColumnBuilder is a builder for column definition in table creation.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeleteBuilder is a builder for `DELETE` statement.
No description provided by the author
DescribeBuilder is a query builder for `DESCRIBE` statement.
DialectBuilder prefixes all root builders with the `Dialect` constructor.
DropIndexBuilder is a builder for `DROP INDEX` statement.
ForeignKeyBuilder is the builder for the foreign-key constraint clause.
Func represents an SQL function.
IndexAlter is a query builder for `ALTER INDEX` statement.
IndexBuilder is a builder for `CREATE INDEX` statement.
InsertBuilder is a builder for `INSERT INTO` statement.
No description provided by the author
No description provided by the author
Predicate is a where predicate.
ReferenceBuilder is a builder for the reference clause in constraints.
No description provided by the author
Selector is a builder for the `SELECT` statement.
SelectTable is a table selector.
No description provided by the author
TableAlter is a query builder for `ALTER TABLE` statement.
TableBuilder is a query builder for `CREATE TABLE` statement.
UpdateBuilder is a builder for `UPDATE` statement.
No description provided by the author
UpdateSet describes a set of changes of the `DO UPDATE` clause.
WindowBuilder represents a builder for a window clause.
WithBuilder is the builder for the `WITH` statement.
Wrapper wraps a given Querier with different format.
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Querier wraps the basic Query method that is implemented by the different builders in this file.
TableView is a view that returns a table view.
# Type aliases
No description provided by the author
No description provided by the author
LockAction tells the transaction what to do in case of requesting a row that is locked by other transaction.
No description provided by the author
LockStrength defines the strength of the lock (see the list below).
An Op represents an operator.
Queries are list of queries join with space between them.
No description provided by the author
No description provided by the author