avers-0.0.10: empty

Safe HaskellNone
LanguageHaskell2010

Avers.Storage.Expressions

Description

This module contains RethinkDB Expressions which are used to build queries.

Synopsis

Documentation

primaryKeyField :: Text Source

The primary key in all our documents is the default "id".

primaryKeyFieldE :: Exp Text Source

Expression which represents the primary key field.

objectFieldE :: IsDatum a => Text -> Exp Object -> Exp a Source

Expression which represents the value of a field inside of an Object.

objectFieldEqE :: ToDatum a => Text -> a -> Exp Object -> Exp Bool Source

True if the object field matches the given value.

primaryKeyEqE :: Text -> Exp Object -> Exp Bool Source

True if the object's primary key matches the given string.

headE :: (IsSequence a, IsDatum r) => Exp a -> Exp r Source

Take the first item out of a sequence. Beware that this throws an error when the sequence is empty.

limitE :: IsSequence s => Int -> Exp s -> Exp s Source

Limit a sequence to the first n items.