class Jennifer::Model::NumericToFloat64Converter

Overview

Type converter for Postgre numeric field.

Converts PG::Numeric to Float64 and back.

class Order < Jennifer::Model::Base
  mapping(
    id: Primary32,
    total: {type: Float64?, converter: Jennifer::Model::NumericToFloat64Converter}
  )
end

Defined in:

jennifer/adapter/postgres/model/numeric_to_float64_converter.cr

Class Method Summary

Class Method Detail

def self.from_db(pull, options) #

[View source]
def self.from_hash(hash : Hash, column, options) #

[View source]
def self.to_db(value : Float?, options) #

[View source]