[][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
Column

A column definition.

Count
Delete

A builder for a DELETE statement.

Function

A database function definition

Grouping

A list of definitions for the GROUP BY statement

Insert

A builder for an INSERT statement.

JoinData

The JOIN table and conditions.

MultiRowInsert
Ordering

A list of definitions for the ORDER BY statement

Over
Row

A collection of values surrounded by parentheses.

RowNumber
Select

A builder for a SELECT statement.

SingleRowInsert
Table

A table definition

Union

A builder for a UNIONs over multiple SELECT statements.

Update

A builder for an UPDATE statement.

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.

Id
Join

A representation of a JOIN statement.

OnConflict

INSERT conflict resolution strategies.

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

Traits

Aliasable

An object that can be aliased.

Comparable

An item that can be compared against other values in the database.

Conjuctive

AND, OR and NOT conjuctive implementations.

Groupable

An item that can be used in the GROUP BY statement

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 ORDER BY statement

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