ModelFormat

Describes a single Model class (Database Table) in a generic format that is only later used by the drivers to actually convert to SQL statements.

Members

Functions

lint
string lint(string errorPrefix)

Perform checks if the model description seems valid (does not validate fields, only general model things)

Structs

Field
struct Field

Describes a field inside the Model class, which corresponds to a column inside the actual database table later. It's using a generic format that is only later used by the drivers to actually convert to SQL statements.

Variables

definedAt
SourceLocation definedAt;

For debugging purposes this is the D source code location where this field is defined from. This can be used in error messages.

embeddedStructs
string[] embeddedStructs;

Lists the source field names for embedded structs, recursively.

fields
Field[] fields;

List of fields, such as defined in the D source code, recursively including all fields from all inherited classes. This maps to the actual SQL columns later when it is generated into an SQL create statement by the actual driver implementation.

tableName
string tableName;

The exact name of the table later used in the DB, not neccessarily corresponding to the D class name anymore.

Meta