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

Overview

Represents a schema field definition.

Field definitions are specified using either of the following formats:

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.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_argument(argument : String) : FieldDefinition #

[View source]
def self.new(name : String, type : String, modifiers : Array(Modifier)) #

[View source]

Instance Method Detail


[View source]
def name : String #

[View source]
def render : String #

[View source]
def type : String #

[View source]