Expand description
An abstract syntax tree for SQL queries.
The ast module handles everything related building abstract SQL queries without going into database-level specifics. Everything related to the actual query building is in the visitor module.
For prelude, all important imports are in quaint::ast::*.
Structs
- An aggregate function that concatenates strings from a group into a single string with various options.
 - A representation of the
AVGfunction in the database. - Returns the first non-null expression
 - A column definition.
 - A builder for a common table expression (CTE) statement, to be used in the
WITHblock of aSELECTstatement. - A representation of the
Concatfunction in the database. - Returns the number of rows that matches a specified criteria.
 - A builder for a
DELETEstatement. - An expression that can be positioned in a query. Can be a single value or a statement that is evaluated into a value.
 - A database function definition
 - A list of definitions for the
GROUP BYstatement - A builder for an
INSERTstatement. - The
JOINtable and conditions. - A represention of the
LOWERfunction in the database. - A represention of the
MAXfunction in the database. - A represention of the
MINfunction in the database. - A builder for an
INSERTstatement for multiple rows. - A list of definitions for the
ORDER BYstatement. - Determines the partitioning and ordering of a rowset before the associated window function is applied.
 - A value written to the query as-is without parameterization.
 - A collection of values surrounded by parentheses.
 - A window function that assigns a sequential integer number to each row in the query’s result set.
 - RowToJson
postgresqlA representation of theROW_TO_JSONfunction in the database. Only forPostgresql - A builder for a
SELECTstatement. - A builder for an
INSERTstatement for a single row. - A represention of the
SUMfunction in the database. - A table definition
 - Holds the expressions on which to perform a full-text search
 - Holds the expressions & query on which to perform a text-search ranking compute
 - A builder for a
UNIONs over multipleSELECTstatements. - A builder for an
UPDATEstatement. - A represention of the
UPPERfunction in the database. - An in-memory temporary table. Can be used in some of the databases in a place of an actual table. Doesn’t work in MySQL 5.7.
 
Enums
- For modeling comparison expressions.
 - Tree structures and leaves for condition building.
 - Defines a default value for a
Column. - An expression we can compare and use in database queries.
 - A definition of a database index.
 - A representation of a
JOINstatement. INSERTconflict resolution strategies.- The ordering direction
 - A database query
 - A database query that only returns data without modifying anything.
 - Calculation operations in SQL queries.
 - Either an identifier or a nested query.
 - A value we must parameterize for the prepared statement. Null values should be defined by their corresponding type variants with a
Nonevalue for best compatibility. 
Traits
- An object that can be aliased.
 - An item that can be compared against other values in the database.
 AND,ORandNOTconjunctive implementations.- An item that can be used in the
GROUP BYstatement - Conversion into a common table expression.
 - Convert the value into a group by definition.
 - Convert the value into an order definition with order item and direction
 - Converts the value into a state to skip parameterization.
 - An item that can be joined.
 - An item that can be used in the
ORDER BYstatement 
Functions
- Aggregates the given field into a string.
 - A quick alias to create an asterisk to a table.
 - Calculates the average value of a numeric column.
 - Returns the first non-null argument
 - Concat several expressions.
 - Count of the underlying table where the given expression is not null.
 - A quick alias to create a default value expression.
 - Extracts a subset of a JSON blob given a path. Two types of paths can be used:
 - Converts a JSON expression into string and unquotes it.
 - Converts the result of the expression into lowercase string.
 - Calculates the maximum value of a numeric column.
 - Calculates the minimum value of a numeric column.
 - Generates the function uuid_to_bin(uuid()) returning a binary uuid in MySQL
 - A number from 1 to n in specified order
 - row_to_json
postgresqlReturn the given table inJSONformat. - Calculates the sum value of a numeric column.
 - Performs a full-text search. Use it in combination with the
.matches()comparable. - Computes the relevance score of a full-text search query against some expressions.
 - Converts the result of the expression into uppercase string.
 - Generates the function uuid_to_bin(uuid()) returning a binary uuid in MySQL
 - Generates an optimized swapped UUID in MySQL 8 see
<https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_uuid-to-bin> 
Type Definitions
- Defines a grouping for the
GROUP BYstatement. - Defines ordering for an
ORDER BYstatement.