package
2.3.0+incompatible
Repository: https://github.com/unwired/jet.git
Documentation: pkg.go.dev

# 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.
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.
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).
NewTable creates new table with schema Name, table Name and list of columns.
NOW returns current datetime.
PRECEDING window frame clause.
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.
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.
UNLOCK_TABLES explicitly releases any table locks held by the current session.
WITH function creates new WITH 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.
AVG is aggregate function used to calculate avg value from numeric expression.
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.
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.
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.
Date creates new date literal.
DateColumn creates named date column.
DateExp is date expression wrapper around arbitrary expression.
DateT creates new date literal from time.Time.
DateTime creates new datetime literal.
DateTimeColumn creates named timestamp column.
DateTimeExp is timestamp expression wrapper around arbitrary expression.
DateTimeT creates new datetime literal from time.Time.
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.
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.
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.
Int is constructor for 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).
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.
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.
OCTET_LENGTH returns number of bytes in string expression.
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.
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 is construct one table row from list of expressions.
ROW_NUMBER returns number of the current row within its partition, counting from 1.
RTRIM removes the longest string containing only characters from characters (a space by default) from the end of string.
SetLogger sets automatic statement logging.
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.
Time creates new time literal.
TimeColumn creates named time column.
TimeExp is time expression wrapper around arbitrary expression.
Timestamp creates new timestamp literal.
TimestampColumn creates named timestamp column.
TimestampExp is timestamp expression wrapper around arbitrary expression.
TimestampT creates new timestamp literal from time.Time.
TimeT creates new time literal from time.Time.
TRUNC calculates trunc of float expression with precision.
TRUNCATE calculates trunc of float expression with precision.
Window function clauses.
Row lock types.
UPPER returns string expression in upper case.
Window is used to specify window reference from WINDOW clause.

# Structs

CommonTableExpression contains information about a CTE.

# Interfaces

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.
IntegerExpression interface.
Interval is representation of MySQL interval.
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.
RowLock is interface for SELECT statement row lock types.
Statement is common interface for all statements(SELECT, INSERT, UPDATE, DELETE, LOCK).
StringExpression interface.
TimeExpression interface.
TimestampExpression interface.