class

Ohm::Model

Inherits Reference < Object

Constants

LUA = { save: { src: with_file("ohm/save.lua", "cat"), sha: ((with_file("ohm/save.lua", "shasum")).split(' ')).first, }, delete: { src: with_file("ohm/delete.lua", "cat"), sha: ((with_file("ohm/delete.lua", "shasum")).split(' ')).first, }, }

Constructors

new(atts : Hash(String, String))
Source

Class methods

[](id : String)
Source
[](id : Int)
Source
[](id : Nil)
Source
as_index(name : String, value : String)
Source
as_index(name : String, values : Array(String))
Source
as_indices(filter : Hash(String, String | Array(String)))
Source
attributes
Source
create(atts)
Source
create
Source
fetch(ids : Array(Resp::Reply))
Source
find(filter : Hash(String, String | Array(String)))
Source
includes?(id : String)
Source
includes?(id : Int)
Source
indices
Source
redis
Source
tracked
Source
uniques
Source
with(name, value)
Source

Instance methods

==(other : self)

Returns true if this reference is the same as other. Invokes same?.

Source
==(other)

Returns false (other can only be a Value here).

Source
attributes
Source
counters
Source
delete
Source
merge(atts : Array(Resp::Reply))
Source
merge(atts : Hash(String, String))
Source
model
Source
redis
Source
retrieve!
Source
save
Source
update(atts : Hash(String, String))
Source

Macros

attribute(name)
Source
collection(name, model, reference)
Source
counter(name)
Source
index(name)
Source
list(name, model)
Source
mutable(name, model, type)
Source
reference(name, model)
Source
set(name, model)
Source
track(name)
Source
unique(name)
Source
with_file(filename, command)
Source

Nested types