# 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 expression.
DATE function creates new date from time-value and zero or more time modifiers.
DateTime creates new datetime(timestamp) literal expression.
DATETIME function creates new DateTime from time-value and zero or more time modifiers.
FOLLOWING window frame clause.
JULIANDAY returns the number of days since noon in Greenwich on November 24, 4714 B.C.
LENGTH returns number of characters in string with a given encoding.
NewTable creates new table with schema Name, table Name and list of columns.
PRECEDING window frame clause.
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.
SELECT creates new SelectStatement with list of projections.
SET creates conflict action for ON_CONFLICT clause.
STRFTIME routine returns the date formatted according to the format string specified as the first argument.
Time creates new time literal expression.
TIME function creates new time from time-value and zero or more time modifiers.
TIMESTAMP return a datetime value based on the arguments:.
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.
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.
# 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_NOT inverts every bit in integer expression result.
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.
COALESCE function returns the first of its arguments that is not null.
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.
time-value modifiers.
Decimal creates new float literal expression from string value.
DENSE_RANK returns rank of the current row without gaps; this function counts peer groups.
Dialect is implementation of SQL Builder for SQLite databases.
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.
Func can be used to call custom or unsupported database functions.
time-value modifiers.
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).
LN calculates natural algorithm of float expression.
time-value modifiers.
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.
MIN is aggregate function.
MINf is aggregate function.
MINi is aggregate function.
time-value modifiers.
time-value modifiers.
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.
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.
REPLACE replaces all occurrences in string of substring from with substring to.
REVERSE returns reversed 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.
time-value modifiers.
SetLogger sets automatic statement logging.
SetQueryLogger sets automatic query logging function.
Row lock types.
SIGN returns sign of float expression.
SQRT calculates square root of numeric expression.
Keywords.
time-value modifiers.
time-value modifiers.
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.
time-value modifiers.
Row lock types.
UPPER returns string expression in upper case.
time-value modifiers.
UUID is a helper function to create string literal expression from uuid object value can be any uuid type with a String method.
time-value modifiers.
Window is used to specify window reference from WINDOW clause.
time-value modifiers.
# Interfaces
CommonTableExpression defines set of interface methods for postgres CTEs.
DeleteStatement is interface for MySQL DELETE statement.
InsertStatement is interface for SQL INSERT statements.
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.
NumericExpression is shared interface for integer or real expression.
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.