Safe Haskell | None |
---|
Functions from the ReQL (RethinkDB Query Language)
- (+) :: (Expr a, Expr b) => a -> b -> ReQL
- mod :: (Expr a, Expr b) => a -> b -> ReQL
- (/) :: (Expr a, Expr b) => a -> b -> ReQL
- (*) :: (Expr a, Expr b) => a -> b -> ReQL
- (-) :: (Expr a, Expr b) => a -> b -> ReQL
- (||) :: (Expr a, Expr b) => a -> b -> ReQL
- (&&) :: (Expr a, Expr b) => a -> b -> ReQL
- (==) :: (Expr a, Expr b) => a -> b -> ReQL
- (/=) :: (Expr a, Expr b) => a -> b -> ReQL
- (>) :: (Expr a, Expr b) => a -> b -> ReQL
- (<=) :: (Expr a, Expr b) => a -> b -> ReQL
- (<) :: (Expr a, Expr b) => a -> b -> ReQL
- (>=) :: (Expr a, Expr b) => a -> b -> ReQL
- not :: Expr a => a -> ReQL
- length :: Expr a => a -> ReQL
- (++) :: (Expr a, Expr b) => a -> b -> ReQL
- map :: (Expr a, Expr b) => (ReQL -> b) -> a -> ReQL
- filter :: (Expr predicate, Expr seq) => predicate -> seq -> ReQL
- between :: (Expr left, Expr right, Expr seq) => Key -> left -> right -> seq -> ReQL
- append :: (Expr a, Expr b) => a -> b -> ReQL
- concatMap :: (Expr a, Expr b) => (ReQL -> b) -> a -> ReQL
- innerJoin :: (Expr a, Expr b, Expr c) => (ReQL -> ReQL -> c) -> a -> b -> ReQL
- outerJoin :: (Expr a, Expr b, Expr c) => (ReQL -> ReQL -> c) -> a -> b -> ReQL
- eqJoin :: (Expr a, Expr b) => Key -> a -> Key -> b -> ReQL
- drop :: (Expr a, Expr b) => a -> b -> ReQL
- take :: (Expr n, Expr seq) => n -> seq -> ReQL
- slice :: (Expr a, Expr b, Expr c) => a -> b -> c -> ReQL
- (!!) :: Expr a => a -> ReQL -> ReQL
- reduce :: (Expr base, Expr seq, Expr a) => (ReQL -> ReQL -> a) -> base -> seq -> ReQL
- reduce1 :: (Expr a, Expr s) => (ReQL -> ReQL -> a) -> s -> ReQL
- distinct :: Expr s => s -> ReQL
- forEach :: (Expr s, Expr a) => s -> (ReQL -> a) -> ReQL
- mergeRightLeft :: Expr a => a -> ReQL
- data Order
- orderBy :: Expr s => [Order] -> s -> ReQL
- groupBy :: (Expr group, Expr reduction, Expr seq) => (ReQL -> group) -> (ReQL -> reduction) -> seq -> ReQL
- sum :: Expr s => s -> ReQL
- avg :: Expr s => s -> ReQL
- (!) :: Expr s => s -> ReQL -> ReQL
- pluck :: Expr o => [ReQL] -> o -> ReQL
- without :: Expr o => [ReQL] -> o -> ReQL
- member :: Expr o => [ReQL] -> o -> ReQL
- merge :: (Expr a, Expr b) => a -> b -> ReQL
- class Javascript r where
- if' :: (Expr a, Expr b, Expr c) => a -> b -> c -> ReQL
- error :: Expr s => s -> ReQL
- db :: Text -> Database
- dbCreate :: String -> ReQL
- dbDrop :: Database -> ReQL
- dbList :: ReQL
- indexCreate :: Expr fun => String -> fun -> Table -> ReQL
- indexDrop :: Key -> Table -> ReQL
- indexList :: Table -> ReQL
- getAll :: Expr value => Key -> [value] -> Table -> ReQL
- table :: Text -> Table
- tableCreate :: Table -> TableCreateOptions -> ReQL
- tableDrop :: Table -> ReQL
- tableList :: Database -> ReQL
- get :: (Expr s, Expr k) => k -> s -> ReQL
- insert :: (Expr table, Expr object) => object -> table -> ReQL
- upsert :: (Expr table, Expr object) => object -> table -> ReQL
- update :: Expr selection => (ReQL -> ReQL) -> selection -> ReQL
- replace :: Expr selection => (ReQL -> ReQL) -> selection -> ReQL
- delete :: Expr selection => selection -> ReQL
- coerceTo :: Expr x => ReQL -> x -> ReQL
- asArray :: Expr x => x -> ReQL
- asBool :: Expr x => x -> ReQL
- asObject :: Expr x => x -> ReQL
- asNumber :: Expr x => x -> ReQL
- asString :: Expr x => x -> ReQL
- withFields :: (Expr paths, Expr seq) => [paths] -> seq -> ReQL
- indexesOf :: (Expr fun, Expr seq) => fun -> seq -> ReQL
- isEmpty :: Expr seq => seq -> ReQL
- sample :: (Expr n, Expr seq) => n -> seq -> ReQL
- prepend :: (Expr datum, Expr array) => datum -> array -> ReQL
- (\\) :: (Expr a, Expr b) => a -> b -> ReQL
- setInsert :: (Expr datum, Expr array) => datum -> array -> ReQL
- setUnion :: (Expr a, Expr b) => a -> b -> ReQL
- setIntersection :: (Expr a, Expr b) => a -> b -> ReQL
- setDifference :: (Expr set, Expr remove) => remove -> set -> ReQL
- hasFields :: (Expr obj, Expr paths) => paths -> obj -> ReQL
- insertAt :: (Expr n, Expr datum, Expr array) => n -> datum -> array -> ReQL
- spliceAt :: (Expr n, Expr replace, Expr array) => n -> replace -> array -> ReQL
- deleteAt :: (Expr n, Expr array) => n -> array -> ReQL
- changeAt :: (Expr n, Expr datum, Expr array) => n -> datum -> array -> ReQL
- keys :: Expr obj => obj -> ReQL
- (=~) :: Expr string => string -> ReQL -> ReQL
- apply :: (Expr fun, Expr arg) => fun -> [arg] -> ReQL
- handle :: (Expr handler, Expr reql) => handler -> reql -> ReQL
- typeOf :: Expr a => a -> ReQL
- info :: Expr a => a -> ReQL
- json :: Expr string => string -> ReQL
- (#) :: (Expr a, Expr b) => a -> (ReQL -> b) -> ReQL
- (.) :: (Expr a, Expr b, Expr c) => (ReQL -> b) -> (ReQL -> a) -> c -> ReQL
Documentation
Lists and Streams
length :: Expr a => a -> ReQLSource
The size of a sequence or an array. Called count in the official drivers
(++) :: (Expr a, Expr b) => a -> b -> ReQLSource
Join two sequences. Called union in the official drivers
filter :: (Expr predicate, Expr seq) => predicate -> seq -> ReQLSource
Filter a sequence given a predicate
between :: (Expr left, Expr right, Expr seq) => Key -> left -> right -> seq -> ReQLSource
Query all the documents whose value for the given index is in a given range
concatMap :: (Expr a, Expr b) => (ReQL -> b) -> a -> ReQLSource
Map a function of a sequence and concat the results
innerJoin :: (Expr a, Expr b, Expr c) => (ReQL -> ReQL -> c) -> a -> b -> ReQLSource
SQL-like join of two sequences. Returns each pair of rows that satisfy the 2-ary predicate.
outerJoin :: (Expr a, Expr b, Expr c) => (ReQL -> ReQL -> c) -> a -> b -> ReQLSource
SQL-like join of two sequences. Returns each pair of rows that satisfy the 2-ary predicate.
eqJoin :: (Expr a, Expr b) => Key -> a -> Key -> b -> ReQLSource
An efficient iner_join that uses a key for the first table and an index for the left table.
drop :: (Expr a, Expr b) => a -> b -> ReQLSource
Drop elements from the head of a sequence. Called skip in the official drivers
take :: (Expr n, Expr seq) => n -> seq -> ReQLSource
Limit the size of a sequence. Called limit in the official drivers
reduce :: (Expr base, Expr seq, Expr a) => (ReQL -> ReQL -> a) -> base -> seq -> ReQLSource
Reduce a sequence to a single value
reduce1 :: (Expr a, Expr s) => (ReQL -> ReQL -> a) -> s -> ReQLSource
Reduce a non-empty sequence to a single value
mergeRightLeft :: Expr a => a -> ReQLSource
groupBy :: (Expr group, Expr reduction, Expr seq) => (ReQL -> group) -> (ReQL -> reduction) -> seq -> ReQLSource
Turn a grouping function and a reduction function into a grouped map reduce operation
Accessors
member :: Expr o => [ReQL] -> o -> ReQLSource
Test if an object contains the given attribute. Called contains in the official drivers
class Javascript r whereSource
Create a javascript expression
Javascript ReQL | |
Javascript (ReQL -> ReQL -> ReQL) | |
Javascript (ReQL -> ReQL) |
indexCreate :: Expr fun => String -> fun -> Table -> ReQLSource
Create an index on the table from the given function
getAll :: Expr value => Key -> [value] -> Table -> ReQLSource
Retreive documents by their indexed value
tableCreate :: Table -> TableCreateOptions -> ReQLSource
Create a table on the server
insert :: (Expr table, Expr object) => object -> table -> ReQLSource
Insert a document or a list of documents into a table
upsert :: (Expr table, Expr object) => object -> table -> ReQLSource
Like insert, but update existing documents with the same primary key
update :: Expr selection => (ReQL -> ReQL) -> selection -> ReQLSource
Add to or modify the contents of a document
replace :: Expr selection => (ReQL -> ReQL) -> selection -> ReQLSource
Replace a document with another
withFields :: (Expr paths, Expr seq) => [paths] -> seq -> ReQLSource
Like hasFields followed by pluck
indexesOf :: (Expr fun, Expr seq) => fun -> seq -> ReQLSource
The position in the sequence of the elements that match the predicate
sample :: (Expr n, Expr seq) => n -> seq -> ReQLSource
Select a given number of elements from a sequence with uniform random distribution
setInsert :: (Expr datum, Expr array) => datum -> array -> ReQLSource
Insert a datum into an array if it is not yet present
setIntersection :: (Expr a, Expr b) => a -> b -> ReQLSource
The intersection of two sets
setDifference :: (Expr set, Expr remove) => remove -> set -> ReQLSource
The difference of two sets
hasFields :: (Expr obj, Expr paths) => paths -> obj -> ReQLSource
Test if an object has the given fields
insertAt :: (Expr n, Expr datum, Expr array) => n -> datum -> array -> ReQLSource
Insert a datum at the given position in an array
spliceAt :: (Expr n, Expr replace, Expr array) => n -> replace -> array -> ReQLSource
Splice an array at a given position inside another array
changeAt :: (Expr n, Expr datum, Expr array) => n -> datum -> array -> ReQLSource
Change an element in an array
(=~) :: Expr string => string -> ReQL -> ReQLSource
Match a string to a regular expression. Called match in the official drivers
apply :: (Expr fun, Expr arg) => fun -> [arg] -> ReQLSource
Apply a function to a list of arguments. Called do in the official drivers
handle :: (Expr handler, Expr reql) => handler -> reql -> ReQLSource
Catch some expections inside the query. Called default in the official drivers