abstract class Ohm::Model
- Ohm::Model
- Reference
- Object
Defined in:
ohm.crConstant Summary
-
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
Class Method Summary
- .[](id : String)
- .[](id : Int)
- .[](id : Nil)
- .all
- .as_index(name : String, value : String)
- .as_index(name : String, values : Array(String))
- .as_indices(filter : Hash(String, String | Array(String)))
- .attributes
- .create(atts)
- .create
- .fetch(ids : Array(Resp::Reply))
- .find(filter : Hash(String, String | Array(String)))
- .includes?(id : String)
- .includes?(id : Int)
- .indices
- .key
- .redis
- .tracked
- .uniques
- .with(name, value)
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. -
#==(other)
Returns
false
(other can only be aValue
here). - #attributes : Hash(String, String)
- #counters
- #delete
- #id : String | Nil
- #key
- #merge(atts : Array(Resp::Reply))
- #merge(atts : Hash(String, String))
- #model
- #redis
- #retrieve!
- #save
- #update(atts : Hash(String, String))
Macro Summary
- attribute(name)
- collection(name, model, reference)
- counter(name)
- index(name)
- list(name, model)
- mutable(name, model, type)
- reference(name, model)
- set(name, model)
- track(name)
- unique(name)
- with_file(filename, command)
Constructor Detail
Class Method Detail
Instance Method Detail
def ==(other : self)
#
Description copied from class Reference
Returns true
if this reference is the same as other. Invokes same?
.
def ==(other)
#
Description copied from class Reference
Returns false
(other can only be a Value
here).