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
Constructor Detail
def self.
new(field, hidden : Bool =
false, database : String =
"pg")
#
Instance Method Detail
def
cr_type=(cr_type : String)
#
def
database=(database : String)
#
def
db_type=(db_type : String)
#
def
hidden=(hidden : Bool)
#
def
name=(name : String)
#
def
to_json(json : JSON::Builder)
#
def
type=(type : String)
#
def
type_mapping(type =
"string")
#