# Functions
CAST function converts a expr (of any type) into latter specified datatype.
CBRT calculates cube root of numeric expression.
CTE creates new named commonTableExpression.
CURRENT_TIME returns current time with time zone.
CURRENT_TIMESTAMP returns current timestamp with time zone.
Date creates new date literal.
DateT creates new date literal from time.Time.
DateTime creates new datetime literal.
DateTimeT creates new datetime literal from time.Time.
EXTRACT function retrieves subfields such as year or hour from date/time values
EXTRACT(DAY, User.CreatedAt).
FOLLOWING window frame clause.
INTERVAL creates new temporal interval.
INTERVALd temoral interval from time.Duration.
INTERVALe creates new temporal interval from expresion and unit type.
LATERAL derived tables constructor from select statement.
LENGTH returns number of characters in string with a given encoding.
LOCK creates LockStatement from list of tables.
LPAD fills up the string to length length by prepending the characters fill (a space by default).
MAX_EXECUTION_TIME limits statement execution time.
NewTable creates new table with schema Name, table Name and list of columns.
NOW returns current datetime.
PRECEDING window frame clause.
QB_NAME assigns name to query block.
RawStatement creates new sql statements from raw query and optional map of named arguments.
ROW function is used to create a tuple value that consists of a set of expressions or column values.
RPAD fills up the string to length length by appending the characters fill (a space by default).
SELECT creates new SelectStatement with list of projections.
Time creates new time literal.
Timestamp creates new timestamp literal.
TIMESTAMP return a datetime value based on the arguments:.
TimestampT creates new timestamp literal from time.Time.
TimeT creates new time literal from time.Time.
UNION effectively appends the result of sub-queries(select statements) into single query.
UNION_ALL effectively appends the result of sub-queries(select statements) into single query.
UNIX_TIMESTAMP returns unix timestamp.
UNLOCK_TABLES explicitly releases any table locks held by the current session.
UUID_TO_BIN is a helper function that calls "uuid_to_bin" function on the passed value.
VALUES is a table value constructor that computes a set of one or more rows as a temporary constant table.
WITH function creates new WITH statement from list of common table expressions.
WITH_RECURSIVE function creates new WITH RECURSIVE statement from list of common table expressions.
# Constants
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
List of interval unit types for MySQL.
# Variables
ABSf calculates absolute value from float expression.
ABSi calculates absolute value from int expression.
AND function adds AND operator between expressions.
AVG is aggregate function used to calculate avg value from numeric expression.
BinaryOperator can be used to use custom or unsupported operators that take two operands.
BIT_AND is aggregate function used to calculates the bitwise AND of all non-null input values, or null if none.
BIT_LENGTH returns number of bits in string expression.
BIT_NOT inverts every bit in integer expression result.
BIT_OR is aggregate function used to calculates the bitwise OR of all non-null input values, or null if none.
Bool creates new bool literal expression.
BoolColumn creates named bool column.
BoolExp is bool expression wrapper around arbitrary expression.
CASE create CASE operator with optional list of expressions.
CEIL calculates ceil of float expression.
CHAR_LENGTH returns number of characters in string expression.
COALESCE function returns the first of its arguments that is not null.
CONCAT adds two or more expressions together.
CONCAT_WS adds two or more expressions together with a separator.
COUNT is aggregate function.
CUME_DIST calculates cumulative distribution: (number of partition rows preceding or peer with current row) / total partition rows.
CURRENT_DATE returns current date.
Window function clauses.
CustomExpression is used to define custom expressions.
DateColumn creates named date column.
DateExp is date expression wrapper around arbitrary expression.
DateTimeColumn creates named timestamp column.
DateTimeExp is timestamp expression wrapper around arbitrary expression.
Decimal creates new float literal expression from string value.
Keywords.
DENSE_RANK returns rank of the current row without gaps; this function counts peer groups.
Dialect is implementation of MySQL dialect for SQL Builder serialisation.
DISTINCT operator can be used to return distinct values of expr.
EXISTS checks for existence of the rows in subQuery.
FIRST_VALUE returns value evaluated at the row that is the first row of the window frame.
Float creates new float literal expression from float64 value.
FloatColumn creates named float column.
FloatExp is date expression wrapper around arbitrary expression.
FLOOR calculates floor of float expression.
FORMAT formats a number to a format like "#,###,###.##", rounded to a specified number of decimal places, then it returns the result as a string.
Func can be used to call custom or unsupported database functions.
GREATEST selects the largest value from a list of expressions, or null if any of the expressions is null.
GROUPING function is used to identify which columns are included in a grouping set or a subtotal row.
Int is constructor for 64 bit signed integer expressions literals.
Int16 is constructor for 16 bit signed integer expressions literals.
Int32 is constructor for 32 bit signed integer expressions literals.
Int64 is constructor for 64 bit signed integer expressions literals.
Int8 is constructor for 8 bit signed integer expressions literals.
IntegerColumn creates named integer column.
IntExp is int expression wrapper around arbitrary expression.
LAG returns value evaluated at the row that is offset rows before the current row within the partition; if there is no such row, instead return default (which must be of the same type as value).
LAST_VALUE returns value evaluated at the row that is the last row of the window frame.
LEAD returns value evaluated at the row that is offset rows after the current row within the partition; if there is no such row, instead return default (which must be of the same type as value).
LEAST selects the smallest value from a list of expressions, or null if any of the expressions is null.
LEFT returns first n characters in the string.
LN calculates natural algorithm of float expression.
LOG calculates logarithm of float expression.
LOWER returns string expression in lower case.
LTRIM removes the longest string containing only characters from characters (a space by default) from the start of string.
MAX is aggregate function.
MAXf is aggregate function.
MAXi is aggregate function.
MD5 calculates the MD5 hash of string, returning the result in hexadecimal.
MIN is aggregate function.
MINf is aggregate function.
MINi is aggregate function.
NewEnumValue creates new named enum value.
NOT returns negation of bool expression result.
NTH_VALUE returns value evaluated at the row that is the nth row of the window frame (counting from 1); null if no such row.
NTILE returns integer ranging from 1 to the argument value, dividing the partition as equally as possible.
Keywords.
NULLIF function returns a null value if value1 equals value2; otherwise it returns value1.
OCTET_LENGTH returns number of bytes in string expression.
OR function adds OR operator between expressions.
Window function clauses.
Window function clauses.
PERCENT_RANK calculates relative rank of the current row: (rank - 1) / (total partition rows - 1).
POW calculates power of base with exponent.
POWER calculates power of base with exponent.
RANK of the current row with gaps; same as row_number of its first peer.
Raw can be used for any unsupported functions, operators or expressions.
Raw can be used for any unsupported functions, operators or expressions.
Raw can be used for any unsupported functions, operators or expressions.
Raw can be used for any unsupported functions, operators or expressions.
Raw can be used for any unsupported functions, operators or expressions.
Raw can be used for any unsupported functions, operators or expressions.
Raw can be used for any unsupported functions, operators or expressions.
Raw can be used for any unsupported functions, operators or expressions.
REGEXP_LIKE Returns 1 if the string expr matches the regular expression specified by the pattern pat, 0 otherwise.
REPEAT repeats string the specified number of times.
REPLACE replaces all occurrences in string of substring from with substring to.
REVERSE returns reversed string.
RIGHT returns last n characters in the string.
ROUND calculates round of a float expressions with optional precision.
ROW_NUMBER returns number of the current row within its partition, counting from 1.
RowExp serves as a wrapper for an arbitrary expression, treating it as a row expression.
RTRIM removes the longest string containing only characters from characters (a space by default) from the end of string.
SetLogger sets automatic statement logging Deprecated: use SetQueryLogger instead.
SetQueryLogger sets automatic query logging function.
Row lock types.
SIGN returns sign of float expression.
SQRT calculates square root of numeric expression.
Keywords.
String creates new string literal expression.
StringColumn creates named string column.
StringExp is string expression wrapper around arbitrary expression.
SUBSTR extracts substring.
SUM is aggregate function.
SUMf is aggregate function.
SUMi is aggregate function.
TimeColumn creates named time column.
TimeExp is time expression wrapper around arbitrary expression.
TimestampColumn creates named timestamp column.
TimestampExp is timestamp expression wrapper around arbitrary expression.
TRUNC calculates trunc of float expression with precision.
TRUNCATE calculates trunc of float expression with precision.
Uint16 is constructor for 16 bit unsigned integer expressions literals.
Uint32 is constructor for 32 bit unsigned integer expressions literals.
Uint64 is constructor for 64 bit unsigned integer expressions literals.
Uint8 is constructor for 8 bit unsigned integer expressions literals.
Window function clauses.
Row lock types.
UPPER returns string expression in upper case.
UUID is a helper function to create string literal expression from uuid object value can be any uuid type with a String method.
Window is used to specify window reference from WINDOW clause.
WITH_ROLLUP operator is used with the GROUP BY clause to generate all prefixes of a group of columns including the empty list.
# Interfaces
CommonTableExpression defines set of interface methods for postgres CTEs.
DeleteStatement is interface for MySQL DELETE statement.
InsertStatement is interface for SQL INSERT statements.
LockStatement is interface for MySQL LOCK tables.
ReadableTable interface.
SelectStatement is interface for MySQL SELECT statement.
SelectTable is interface for MySQL sub-queries.
Table is interface for MySQL tables.
UpdateStatement is interface of SQL UPDATE statement.
# Type aliases
BoolExpression interface.
Column is common column interface for all types of columns.
ColumnAssigment is interface wrapper around column assigment.
ColumnBool is interface for SQL boolean columns.
ColumnDate is interface of SQL date columns.
ColumnDateTime is interface of SQL timestamp columns.
ColumnFloat is interface for SQL real, numeric, decimal or double precision column.
ColumnInteger is interface for SQL smallint, integer, bigint columns.
ColumnList function returns list of columns that be used as projection or column list for UPDATE and INSERT statement.
ColumnString is interface for SQL text, character, character varying bytea, uuid columns and enums types.
ColumnTime is interface for SQL time column.
ColumnTimestamp is interface of SQL timestamp columns.
DateExpression interface.
DateTimeExpression interface.
Expression is common interface for all expressions.
FloatExpression interface.
GroupByClause interface to use as input for GROUP_BY.
IntegerExpression interface.
Interval is representation of MySQL interval.
OptimizerHint provides a way to optimize query execution per-statement basis.
OrderByClause is the combination of an expression and the wanted ordering to use as input for ORDER BY.
PrintableStatement is a statement which sql query can be logged.
Projection is interface for all projection types.
ProjectionList can be used to create conditional constructed projection list.
QueryInfo contains information about executed query.
RawArgs is type used to pass optional arguments to Raw method.
RowExpression interface.
RowLock is interface for SELECT statement row lock types.
Rows wraps sql.Rows type with a support for query result mapping.
Statement is common interface for all statements(SELECT, INSERT, UPDATE, DELETE, LOCK).
StringExpression interface.
TimeExpression interface.
TimestampExpression interface.
Token is used to define custom token in a custom expression.