module Granite::Converters::Json(M, T)

Overview

Converts an Object of type M to/from a database column of type T.

Valid types for T include: String, JSON::Any, and Bytes.

NOTE M must implement #to_json and .from_json methods.

Extended Modules

Defined in:

granite/converters.cr

Instance Method Summary

Instance Method Detail

def from_rs(result : DB::ResultSet) : M | Nil #

[View source]
def to_db(value : M | Nil) : Granite::Columns::Type #

[View source]