Module phile::dalgen [] [src]

DALGen, the backend of the PHiLe compiler. This is the part that generates actual code in your programming language of choice for a Database Abstraction Layer from optimized SQIR.

Structs

CodegenParams

A bunch of centralized settings governing the behavior of DALGen.

Enums

DatabaseAccessMode

The strategy with which the generated DAL will query the DB.

DatabaseEngine

The database engine flavor for which a Database Abstraction Layer will be generated.

Language

The programming language in which the DAL will be implemented.

NameTransform

The rewriting strategy applied to various kinds of named program elements, such as function, variable, and type names. In the CodegenParams struct, optional instances of this transform are specified, where None means "default for the programming language".

Functions

generate_dal

Given the SQIR representation of a program, and some configuration parameters, generates a Database Abstraction Layer and writes the code into io::Writes.

Type Definitions

WriterProvider

Functions of this type are expected to yield a (possibly cached) io::Write object that DALGen can write to. The cache key, specified as the string parameter of the function, is sometimes a file name derived from the impl of a user-defined type.