class Marten::CLI::Generator::Schema::FieldDefinition
- Marten::CLI::Generator::Schema::FieldDefinition
- Reference
- Object
Overview
Represents a schema field definition.
Field definitions are specified using either of the following formats:
name:type
name:type:modifier:modifier
Where #name
is the name of the field and #type
is the type of the field.
modifier
is an optional field modifier. Field modifiers are used to specify additional (but non-mandatory)
field options. For example: name:string:optional
will produce a string field whose required
option is set
to false
.
Defined in:
marten/cli/generator/schema/field_definition.crConstructors
- .from_argument(argument : String) : FieldDefinition
- .new(name : String, type : String, modifiers : Array(Modifier))
Instance Method Summary
- #modifiers : Array(Marten::CLI::Generator::Schema::FieldDefinition::Modifier)
- #name : String
- #render : String
- #type : String