module Jennifer::Model::Coercer

Defined in:

jennifer/model/coercer.cr

Constant Summary

DATE_FORMAT = "%F"
DATE_TIME_FORMAT = "%F %T"

Class Method Summary

Class Method Detail

def self.coerce(value : String, type : Int8 | ::Nil.class) #

[View source]
def self.coerce(value : String, type : Int16 | ::Nil.class) #

[View source]
def self.coerce(value : String, type : Int32 | ::Nil.class) #

[View source]
def self.coerce(value : String, type : Int64 | ::Nil.class) #

[View source]
def self.coerce(value : String, type : String | ::Nil.class) #

[View source]
def self.coerce(value : String, type : Float32 | ::Nil.class) #

[View source]
def self.coerce(value : String, type : Float64 | ::Nil.class) #

[View source]
def self.coerce(value : String, type : Bool | ::Nil.class) #

[View source]
def self.coerce(value : String, type : BigDecimal | ::Nil.class) #

[View source]
def self.coerce(value : String, type : UUID | ::Nil.class) #

[View source]
def self.coerce(value : String, type) #

TODO add PG::Numeric support


[View source]