# 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.
AndPredicates returns a new predicate for joining multiple generated predicates with AND 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.
ColumnsHasPrefix appends a new predicate that checks if the given column begins with the other column (prefix).
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.
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.
FieldContains returns a raw predicate to check if the field contains the given substring.
FieldContainsFold returns a raw predicate to check if the field contains the given substring with case-folding.
FieldEQ returns a raw predicate to check if the given field equals to the given value.
FieldEqualFold returns a raw predicate to check if the field has the given prefix with case-folding.
FieldGT returns a raw predicate to check if the given field is greater than the given value.
FieldGTE returns a raw predicate to check if the given field is greater than or equal the given value.
FieldHasPrefix returns a raw predicate to check if the field has the given prefix.
FieldHasPrefixFold returns a raw predicate to check if the field has the given prefix with case-folding.
FieldHasSuffix returns a raw predicate to check if the field has the given suffix.
FieldHasSuffixFold returns a raw predicate to check if the field has the given suffix with case-folding.
FieldIn returns a raw predicate to check if the value of the field is IN the given values.
FieldIsNull returns a raw predicate to check if the given field is NULL.
FieldLT returns a raw predicate to check if the value of the field is less than the given value.
FieldLTE returns a raw predicate to check if the value of the field is less than the given value.
FieldNEQ returns a raw predicate to check if the given field does not equal to the given value.
FieldNotIn returns a raw predicate to check if the value of the field is NOT IN the given values.
FieldNotNull returns a raw predicate to check if the given field is not NULL.
FieldsEQ returns a raw predicate to check if the given fields (columns) are equal.
FieldsGT returns a raw predicate to check if field1 is greater than field2.
FieldsGTE returns a raw predicate to check if field1 is greater than or equal field2.
FieldsHasPrefix returns a raw predicate to checks if field1 begins with the value of field2.
FieldsLT returns a raw predicate to check if field1 is lower than field2.
FieldsLTE returns a raw predicate to check if field1 is lower than or equal field2.
FieldsNEQ returns a raw predicate to check if the given fields (columns) are not equal.
ForeignKey returns a builder for the foreign-key constraint clause in create/alter table statements.
GT returns a ">" predicate.
GTE returns a ">=" predicate.
HasPrefix is a helper predicate that checks prefix using the LIKE predicate.
HasPrefixFold is a helper predicate that checks prefix using the ILIKE predicate.
HasSuffix is a helper predicate that checks suffix using the LIKE predicate.
HasSuffixFold is a helper predicate that checks suffix using the ILIKE predicate.
In returns the `IN` predicate.
InInts returns the `IN` predicate for ints.
Insert creates a builder for the `INSERT INTO` statement.
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.
NewColumnCheck returns a function that verifies whether the specified column exists within the given table.
NewDriver creates a new Driver with the given Conn and dialect.
NewOrderTermOptions returns a new OrderTermOptions from the given options.
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.
NotPredicates wraps the generated predicates with NOT.
Open wraps the database/sql.Open method and returns a dialect.Driver that implements the an fluent/dialect.Driver interface.
OpenDB wraps the given database/sql.DB method with a Driver.
Or combines all given predicates with OR between them.
OrderAs returns an option to set the alias for the ordering.
OrderAsc returns an option to sort in ascending order.
OrderByCount returns an ordering by the count of the given field.
OrderByField returns an ordering by the given field.
OrderByRand returns a term to natively order by a random value.
OrderBySum returns an ordering by the sum of the given field.
OrderDesc returns an option to sort in descending order.
OrderNullsFirst returns an option to sort nulls first.
OrderNullsLast returns an option to sort nulls last.
OrderSelectAs returns an option to set and select the alias for the ordering.
OrderSelected returns an option to select the ordering term.
OrPredicates returns a new predicate for joining multiple generated predicates with OR 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.
ScanBool scans and returns a boolean from the rows.
ScanInt scans and returns an int from the rows.
ScanInt64 scans and returns an int64 from the rows.
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.
ScanTypeOf returns the type used for scanning column i from the database.
ScanValue scans and returns a driver.Value from the rows.
Select returns a new selector for the `SELECT` statement.
SelectExpr is like Select, but supports passing arbitrary expressions for SELECT clause.
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.
Window returns a new window clause with a custom selector allowing for custom window functions.
With returns a new builder for the `WITH` statement.
WithIntVar calls WithVar with the string representation of the value.
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.
WithVar returns a new context that holds the session variable to be executed before every query.
# 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.
# Structs
Builder is the base query builder for the sql dsl.
ColumnBuilder is a builder for column definition in table creation.
Conn implements dialect.ExecQuerier given ExecQuerier.
DeleteBuilder is a builder for `DELETE` statement.
DescribeBuilder is a query builder for `DESCRIBE` statement.
DialectBuilder prefixes all root builders with the `Dialect` constructor.
Driver is a dialect.Driver implementation for SQL based databases.
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
NullScanner implements the sql.Scanner interface such that it can be used as a scan destination, similar to the types above.
No description provided by the author
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.
Tx implements dialect.Tx interface.
UpdateBuilder is a builder for `UPDATE` statement.
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
ColumnScanner is the interface that wraps the standard sql.Rows methods used for scanning database rows.
ExecQuerier wraps the standard Exec and Query methods.
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
ColumnCheck is a function that verifies whether the specified column exists within the given table.
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).
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
An Op represents an operator.
No description provided by the author
Queries are list of queries join with space between them.
No description provided by the author
SelectValues maps a selected column to its value.
No description provided by the author
UnknownType is a named type to any indicates the info needs to be extracted from the underlying rows.