[−][src]Module quaint::ast
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
AggregateToString | An aggregate function that concatenates strings from a group into a single string with various options. |
Column | A column definition. |
Count | Returns the number of rows that matches a specified criteria. |
Delete | A builder for a |
Function | A database function definition |
Grouping | A list of definitions for the |
Insert | A builder for an |
JoinData | The |
MultiRowInsert | A builder for an |
Ordering | A list of definitions for the |
Over | Determines the partitioning and ordering of a rowset before the associated window function is applied. |
Row | A collection of values surrounded by parentheses. |
RowNumber | A window function that assigns a sequential integer number to each row in the query’s result set. |
Select | A builder for a |
SingleRowInsert | A builder for an |
Table | A table definition |
Union | A builder for a |
Update | A builder for an |
Enums
Compare | For modeling comparison expression |
ConditionTree | Tree structures and leaves for condition building. |
DatabaseValue | A value we can compare and use in database queries. |
Expression | A database expression. |
Join | A representation of a |
OnConflict |
|
Order | The ordering direction |
ParameterizedValue | A value we must parameterize for the prepared statement. |
Query | A database query |
SqlOp | Calculation operations in SQL queries. |
TableType | Either an identifier or a nested query. |
Traits
Aliasable | An object that can be aliased. |
Comparable | An item that can be compared against other values in the database. |
Conjuctive |
|
Groupable | An item that can be used in the |
IntoGroupByDefinition | Convert the value into a group by definition. |
IntoOrderDefinition | Convert the value into an order definition with order item and direction |
Joinable | An item that can be joined. |
Orderable | An item that can be used in the |
Functions
aggregate_to_string | Aggregates the given field into a string. |
asterisk | A quick alias to create an asterisk to a table. |
count | Count of the underlying table where the given expression is not null. |
row_number | A number from 1 to n in specified order |
Type Definitions
GroupByDefinition | |
OrderDefinition |