package
0.0.0-20241117011857-831c505d3641
Repository: https://github.com/goadesign/gorma.git
Documentation: pkg.go.dev
# Functions
Alias overrides the name of the SQL store's table or field.
BelongsTo signifies a relationship between this model and a Parent.
BuildsFrom informs Gorma that this model will be populated from a Goa UserType.
Cached caches the models for `duration` seconds.
DatabaseFieldName allows for customization of the column name by seting the struct tags.
Description sets the definition description.
DynamicTableName sets a boolean flag that causes the generator to generate function definitions in the database models that specify the name of the database table.
Field is a DSL definition for a field in a Relational Model.
HasMany signifies a relationship between this model and a set of Children.
HasOne signifies a relationship between this model and another model.
ManyToMany creates a join table to store the intersection relationship between this model and another model.
MapsFrom establishes a mapping relationship between a source Type field and this model.
MapsTo establishes a mapping relationship between a field in model and a MediaType in goa.
Model is the DSL that represents a Relational Model.
NoAutomaticIDFields applies to a `Store` or `Model` type.
NoAutomaticSoftDelete applies to a `Store` or `Model` type.
NoAutomaticTimestamps applies to a `Store` or `Model` type.
Nullable sets the fields nullability A Nullable field will be stored as a pointer.
Payload specifies the Resource and Action containing a User Type (Payload).
PrimaryKey establishes a field as a Primary Key by seting the struct tags necessary to create the PK in gorm.
RendersTo informs Gorma that this model will need to be rendered to a Goa type.
Roler sets a boolean flag that cause the generation of a Role() function that returns the model's Role value Creates a "Role" field in the table if it doesn't already exist as a string type.
SanitizeDBFieldName is exported for testing purposes.
SanitizeFieldName is exported for testing purposes.
SQLTag sets the model's struct tag `sql` value for indexing and other purposes.
StorageGroup implements the top level Gorma DSL There should be one StorageGroup per Goa application.
Store represents a database.