# Functions

No description provided by the author
AppendSQLRowResult.
AppendSQLValue will write the SQL representation of the interface{} value into the buffer and args slice.
Array returns a new ArrayField representing a literal string value.
Avg represents the AVG() aggregate function.
AvgOver represents the AVG() OVER window function.
Bool returns a new Boolean Field representing a literal bool value.
Bytes returns a new BinaryField representing a literal []byte value.
Case creates a new SimpleCases i.e.
CaseWhen creates a new PredicateCases i.e.
Count represents the COUNT(*) aggregate function.
CountOver represents the COUNT(*) OVER window function.
CustomJoin constructs a new JoinTable.
No description provided by the author
DollarInterpolate interpolates the dollar $1 ($2, $3 etc) placeholders in a query string with the args in the args slice.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ExpandValues will expand each value one by one into successive question mark ? placeholders in the format string, writing the results into the buffer and args slice.
Fieldf is a CustomField constructor.
Float64 returns a new NumberField representing a literal float64 value.
From creates a new SelectQuery.
No description provided by the author
No description provided by the author
No description provided by the author
Int returns a new NumberField representing a literal int value.
Int64 returns a new NumberField representing a literal int64 value.
TODO: write a version that takes in a buffer and writes into it instead.
No description provided by the author
No description provided by the author
No description provided by the author
JSON returns a new JSONField representing a literal JSONable value.
JSONValue returns a new JSONField representing a driver.Valuer value.
No description provided by the author
Max represents the MAX() aggregate function.
MaxOver represents the MAX() OVER window function.
Min represents the MIN() aggregate function.
MinOver represents the MIN() OVER window function.
MustJSON is like JSON but it panics on error.
NewArrayField returns a new ArrayField representing an array column.
NewBinaryField returns a new BinaryField representing a BYTEA column.
NewBooleanField returns a new BooleanField representing a boolean column.
NewCTE creates a new CTE.
NewEnumField returns an EnumField representing an enum column.
NewJSONField returns a new JSONField representing a JSON column.
NewNumberField returns a new NumberField representing a number TableInfo column.
NewRecursiveCTE creates a new recursive CTE.
NewStringField returns a new StringField representing a boolean column.
NewTimeField returns a new TimeField representing a time column.
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
QuestionInterpolate interpolates the question mark ? placeholders in a query string with the args in the args slice.
QuestionToDollarPlaceholders will replace all MySQL style ? with Postgres style incrementing placeholders i.e.
RandomString is the RandStringBytesMaskImprSrcSB function taken from https://stackoverflow.com/a/31832326.
No description provided by the author
Select creates a new SelectQuery.
SelectDistinct creates a new SelectQuery.
SelectDistinctOn creates a new SelectQuery.
SelectOne creates a new SelectQuery.
SelectRowx creates a new SelectQuery.
Selectx creates a new SelectQuery.
String returns a new StringField representing a literal string value.
Sum represents the SUM() aggregate function.
SumOver represents the SUM() OVER window function.
Time returns a new TimeField representing a literal time.Time value.
No description provided by the author
No description provided by the author
No description provided by the author
With creates a new BaseQuery with the CTEs.
WithDB creates a new BaseQuery with the DB.
WithDefaultLog creates a new BaseQuery with the default logger and the LogFlag.
WithLog creates a new BaseQuery with a custom logger and the LogFlag.

# Constants

ExecFlags.
ExecFlags.
ExitCodes.
JoinTypes.
JoinTypes.
JoinTypes.
JoinTypes.
LogFlags.
LogFlags.
LogFlags.
LogFlags.
LogFlags.
Possible VariadicOperators.
Possible VariadicOperators.
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
SelectTypes.
SelectTypes.
SelectTypes.

# Structs

AliasedCTE is an aliased version of a CTE derived from a parent CTE.
ArrayField either represents an ARRAY column, or a literal slice value.
BaseQuery is a common query builder that can transform into a SelectQuery, InsertQuery, UpdateQuery or DeleteQuery depending on the method that you call on it.
BinaryField either represents a BYTEA column or a literal []byte value.
BooleanField either represents a boolean column or a literal bool value.
CTE represents an SQL Common Table Expression.
No description provided by the author
CustomField is a Field that can render itself in an arbitrary way by calling ExpandValues on its Format and Values.
CustomPredicate is a Query that can render itself in an arbitrary way as defined by its Format string.
CustomQuery is a Query that can render itself in an arbitrary way as defined by its Format string.
No description provided by the author
FieldAssignment represents a Field and Value set.
No description provided by the author
No description provided by the author
JoinTable represents an SQL join.
JSONField either represents a JSON column or a literal value that can be marshalled into a JSON string.
NumberField either represents a number column, a number expression or a literal number value.
PredicateCase represents a Predicate and the Result if the Predicate is true.
PredicateCases is the general form of the CASE expression.
Row represents the state of a row after a call to rows.Next().
SelectQuery represents a SELECT query.
SimpleCase represents a Value to be compared against and the Result if it matches.
SimpleCases is the simple form of the CASE expression.
StringField either represents a string column or a literal string value.
TableInfo is struct that implements the Table interface, containing all the information needed to call itself a Table.
TimeField either represents a time column or a literal time.Time value.
No description provided by the author
VariadicPredicate represents the "x AND y AND z..." or "x OR y OR z..." SQL construct.
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
BaseTable is an interface that specialises the Table interface.
No description provided by the author
No description provided by the author
Field is an interface that represents either a Table column or an SQL value.
Logger is an interface that provides logging.
Predicate is an interface that evaluates to true or false in SQL.
Query is an interface that specialises the Table interface.
Table is an interface representing anything that you can SELECT FROM or JOIN.

# Type aliases

Assignments is a list of Assignments, when translated to SQL it looks something like "SET field1 = value1, field2 = value2, etc...".
CTEs represents a list of CTEs.
EnumField is a type alias for StringField.
ExecFlag is a flag that affects the behavior of Exec.
ExitCode represents a reason for terminating the rows.Next() loop.
FieldLiteral is a Field where its underlying string is literally plugged into the SQL query.
Fields represents the "field1, field2, etc..." SQL construct.
JoinTables is a list of JoinTables.
JoinType represents the various types of SQL joins.
LogFlag is a flag that affects the verbosity of the Logger output.
No description provided by the author
RowValues represents a list of RowValues (a, b, c...), (d, e, f...), (g, h, i...).
SelectType represents the various SQL selects.
VariadicPredicateOperator is an operator that can join a variadic number of Predicates together.
No description provided by the author
No description provided by the author