class Launch::CLI::Field

Defined in:

launch/cli/generators/field.cr

Constant Summary

TYPE_MAPPING = {common: {string: ["string", "String", "string"], text: ["text", "String", "text"], int: ["integer", "Int32", "integer"], int32: ["integer", "Int32", "integer"], integer: ["integer", "Int32", "integer"], int64: ["bigint", "Int64", "bigint"], bigint: ["bigint", "Int64", "bigint"], float: ["float", "Float64", "float"], float64: ["real", "Float64", "double"], real: ["real", "Float64", "REAL"], bool: ["boolean", "Bool", "bool"], boolean: ["boolean", "Bool", "bool"], date: ["date", "Time", "date"], time: ["time", "Time", "timestamp"], timestamp: ["time", "Time", "timestamp"], ref: ["reference", "Int64", "reference"], belongs_to: ["reference", "Int64", "reference"], reference: ["reference", "Int64", "reference"], references: ["reference", "Int64", "reference"]}}

Constructors

Instance Method Summary

Instance methods inherited from class Object

blank? blank?, present? present?

Constructor Detail

def self.new(field, hidden : Bool = false, database : String = "pg") #

[View source]

Instance Method Detail

def class_name #

[View source]
def cr_type : String #

[View source]
def cr_type=(cr_type : String) #

[View source]
def database : String #

[View source]
def database=(database : String) #

[View source]
def db_type : String #

[View source]
def db_type=(db_type : String) #

[View source]
def hidden : Bool #

[View source]
def hidden=(hidden : Bool) #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def reference? #

[View source]
def to_json(json : JSON::Builder) #

[View source]
def type : String #

[View source]
def type=(type : String) #

[View source]
def type_mapping(type = "string") #

[View source]