RatchetWrench.Model (ratchet_wrench v4.0.0)

Define struct module of record in database.

Examples

  defmodule Data do
    use RatchetWrench.Model

    schema do
      uuid :data_id
      pk: [:data_id]
      attributes data_id: {"STRING", nil},
        string: {"STRING", ""},
        bool: {"BOOL", nil },
        int: {"INT64", nil},
        float: {"FLOAT64", nil},
        date: {"DATE", nil},
        time_stamp: {"TIMESTAMP", nil}
    end

  end

Link to this section Summary

Link to this section Functions

Link to this macro

attribute(decl)

(macro)
Link to this macro

attributes(decl)

(macro)
Link to this function

defined_column?(attributes, target)

Link to this macro

interleave(interleave)

(macro)
Link to this macro

pk(pk)

(macro)
Link to this macro

schema(list)

(macro)
Link to this macro

table_name(table_name)

(macro)
Link to this macro

uuid(uuid)

(macro)