dorm.declarative.conversion

This module converts a package containing D Model definitions to dorm.declarative.SerializedModels

Members

Enums

DormField
eponymoustemplate DormField(TModel : Model, string sourceName)
Undocumented in source.
DormFieldIndex
eponymoustemplate DormFieldIndex(TModel : Model, string sourceName)
Undocumented in source.
DormFields
eponymoustemplate DormFields(TModel : Model)
Undocumented in source.
DormForeignKeys
eponymoustemplate DormForeignKeys(TModel : Model)
Undocumented in source.
DormListFieldsForError
eponymoustemplate DormListFieldsForError(TModel : Model)
Undocumented in source.
DormModelTableName
eponymoustemplate DormModelTableName(TModel : Model)

Equivalent to DormLayout!TModel.tableName

DormPrimaryKey
eponymoustemplate DormPrimaryKey(TModel : Model)
Undocumented in source.
DormPrimaryKeyIndex
eponymoustemplate DormPrimaryKeyIndex(TModel : Model)
Undocumented in source.
hasDormField
eponymoustemplate hasDormField(TModel : Model, string sourceName)
Undocumented in source.

Functions

processModelsToDeclarations
SerializedModels processModelsToDeclarations()

Entry point to the Model (class) to SerializedModels (declarative) conversion code. Manually calling this should not be neccessary as the dorm.declarative.entrypoint.RegisterModels mixin will call this instead.

Templates

DormColumnNameImpl
template DormColumnNameImpl(alias field)

Used internally, basically converts the field name to snake case or returns the @columnName value if the field has been annotated with it.

DormLayout
template DormLayout(TModel : Model)
Undocumented in source.
DormPrimaryKeyName
template DormPrimaryKeyName(TModel : Model)

Equivalent to DormPrimaryKey!TModel.sourceColumn, but does not analyze the model, thus avoiding cyclic lookups. Note: does not do any sanity checks, like checking if there are two primary keys.

LogicalFields
template LogicalFields(TModel, int cacheHack = 0)

Returns the name of all public member fields, through all base classes (i.e. returns identifiers of public .tupleof members)

Variables

DormModelConstructors
enum string[] DormModelConstructors(TModel : Model);

Returns all fields with @constructValue annotations. Used internally in Model to determine which fields to look at in the constructor.

Meta