Module phile::sqir [] [src]

Defines SQIR, the Schema and Query Intermediate Representation. SQIR is the intermediate language of PHiLe, on which optimizations are performed. SQIR is also the starting point of code generation for database abstraction layers.

Structs

AttrRef

A reference to 0 or more attributes of a certain entity. Used for simple, optimized operations (e.g. projections).

Branch

A multi-way branch expression. The way to do control flow.

BranchArm

A match-value pair, representing one possible direction of control flow.

BuiltinName

Centralized container for the name of each builtin type.

Call

A function call expression.

ClassType

Describes a class type.

EnumType

Describes an enumerated type.

Expr

Expression: the core data structure. This type is more or less a lambda calculus node on steroids.

Filter

A general filter or selection operation.

Function

A function. This is the value of global functions and closures.

FunctionType

Describes a function type.

Group

A general grouping operation.

Map

A general map or projection operation.

Reduce

A general reduce or aggregation operation.

Relation

An entity relationship is an unordered pair of relation sides.

RelationSide

Represents one side of a relationship between two entities. A particular RelationSide always describes the relation from the point of view of one particular entity type.

Sort

A general sorting operation.

Sqir

Top-level type for wrapping SQIR for a complete program. Field names are (hopefully) self-explanatory.

StructType

Describes a structure type.

Enums

Cardinality

The cardinality or multiplicity shows how many entities in the referred side may be related to each entity in the referring side.

ComplexTypeKind

A bit of terminology:

ExprId

ExprId is deliberately not Clone: it should not be copied.

PlaceholderKind

The kind of the type a placeholder type stands for.

SortDirection

A flag for indicating the direction of sorting. The default is Ascending.

Type

Type is deliberately not Clone, PartialEq and Eq: it is meant to be used only with RcCell/WkCell, and its instances should be compared by address.

Value

Represents the value of an expression node.

Statics

BUILTIN_NAME

The "singleton" BuiltinName instance.

Type Definitions

RcExpr

Convenience type alias for a reference-counted expression node.

RcType

Convenience type alias for a reference-counted type descriptor.

WkExpr

Weak counterpart of RcExpr.

WkType

Weak counterpart of RcType.