module Granite::Converters::Enum(E, T)

Overview

Converts an Enum of type E to/from a database column of type T.

Valid types for T include: Number, String, and Bytes.

Extended Modules

Defined in:

granite/converters.cr

Instance Method Summary

Instance Method Detail

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

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

[View source]