class

Marten::CLI::Generator::Schema::FieldDefinition

Inherits Reference / Object

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.

Constructors

from_argument(argument : String) : FieldDefinition
Source
new(name : String, type : String, modifiers : Array(Modifier))
Source

Instance methods

modifiers
Source
name
Source
render
Source
type
Source

Nested types