Module: Redisted

Defined in:
lib/redisted/base.rb,
lib/redisted/index.rb,
lib/redisted/delete.rb,
lib/redisted/errors.rb,
lib/redisted/fields.rb,
lib/redisted/version.rb,
lib/redisted/relation.rb,
lib/redisted/getsetattr.rb,
lib/redisted/references.rb,
lib/redisted/instantiate.rb

Overview

Uniqueness Index:

index :test_int, unique: true
    >> An index named "test_int" that verifies that "test_int" is always unique.
index :ti, unique: :test_int
    >> An index named "ti" that verifies that "test_int" is always unique.
index :idxkey, unique: [:test_int,:provider]
    >> An index named "idxkey" that verifies that the "test_int"/"provider" pair is always unique.

Filter/Sort Index:

index :odd,includes: ->(elem){(elem.test_int%2)!=0}
    >> An index named "odd" that contains reference to objects who's test_int values are odd numbers.
index :asc,order: ->(elem){elem.test_int},fields: :test_int
    >> An index named "asc" that contains references to *all* objects, sorted by test_int. (only recalculate when :test_int changes)
index :sortedodd,includes: ->(elem){(elem.test_int%2)!=0}, order: ->(elem){elem.test_int}
    >> An index named "sortedodd" that contains reference to objects who's test_int values are odd numbers, sorted by test_int
index :provider, match: ->(elem){(elem.provider)}
    >> Create multiple indices, one for each unique value returned by the match proc. Used for filtering.

Defined Under Namespace

Classes: Base, InvalidField, InvalidIndex, InvalidQuery, InvalidReference, IsDirty, MultiSessionConflict, RecordInvalid, RedisConnectionNotDefined, RedisSaveFailed, ValueNotUnique

Constant Summary collapse

VERSION =
"0.0.2"