rethinkdb-1.15.0.0: A driver for the RethinkDB database server

Safe HaskellNone

Database.RethinkDB.ReQL

Description

Building RQL queries in Haskell

Synopsis

Documentation

data ReQL Source

A ReQL Term

Constructors

ReQL 

Instances

Floating ReQL 
Fractional ReQL 
Num ReQL 
Show ReQL 
IsString ReQL 
Expr ReQL 
OptArgs ReQL 
(~ * a ReQL, ~ * b ReQL) => Expr (a -> b -> ReQL) 
~ * a ReQL => Expr (a -> ReQL) 

op :: Arr a => TermType -> a -> ReQLSource

Build a term with no optargs

op' :: Arr a => TermType -> a -> [Attribute Static] -> ReQLSource

Build a term

data Term Source

Internal representation of a ReQL Term

Constructors

Term 
Datum 

Fields

termDatum :: Datum
 
Note 

Fields

termNote :: String
 
termTerm :: Term
 

Instances

Eq Term 
Show Term 
Expr Term 

buildQuery :: ReQL -> Int64 -> Database -> [(Text, Datum)] -> (WireQuery, Term)Source

data Frame Source

Constructors

FramePos Int 
FrameOpt Text 

Instances

class Expr e whereSource

Convert other types into ReQL expressions

Methods

expr :: e -> ReQLSource

exprList :: [e] -> ReQLSource

Instances

Expr Bool 
Expr Char 
Expr Double 
Expr Float 
Expr Int 
Expr Int8 
Expr Int16 
Expr Int32 
Expr Int64 
Expr Integer 
Expr Word 
Expr Word8 
Expr Word16 
Expr Word32 
Expr Word64 
Expr () 
Expr ByteString 
Expr ByteString 
Expr Text 
Expr UTCTime 
Expr Value 
Expr Text 
Expr ZonedTime 
Expr Datum 
Expr Table 
Expr Database 
Expr ReQL 
Expr Term 
Expr Unit 
Expr ConflictResolution 
Expr Durability 
Expr PaginationStrategy 
Expr HttpMethod 
Expr HttpResultFormat 
Expr a => Expr [a] 
Expr (Ratio Integer) 
Expr a => Expr (Maybe a) 
Expr a => Expr (Vector a) 
Expr a => Expr (Set a) 
Expr (Attribute a) 
(~ * a ReQL, ~ * b ReQL) => Expr (a -> b -> ReQL) 
~ * a ReQL => Expr (a -> ReQL) 
(Expr a, Expr b) => Expr (Either a b) 
(Expr a, Expr b) => Expr (a, b) 
Expr a => Expr (HashMap [Char] a) 
(Expr k, Expr v) => Expr (HashMap k v) 
Expr a => Expr (HashMap Text a) 
Expr a => Expr (Map [Char] a) 
Expr a => Expr (Map Text a) 
(Expr a, Expr b, Expr c) => Expr (a, b, c) 
(Expr a, Expr b, Expr c, Expr d) => Expr (a, b, c, d) 
(Expr a, Expr b, Expr c, Expr d, Expr e) => Expr (a, b, c, d, e) 

data QuerySettings Source

State used to build a Term

Constructors

QuerySettings 

Fields

queryToken :: Int64
 
queryDefaultDatabase :: Database
 
queryVarIndex :: Int
 
queryUseOutdated :: Maybe Bool
 

str :: String -> ReQLSource

A shortcut for inserting strings into ReQL expressions Useful when OverloadedStrings makes the type ambiguous

num :: Double -> ReQLSource

A shortcut for inserting numbers into ReQL expressions

data Attribute a whereSource

A key/value pair used for building objects

Constructors

:= :: Expr e => Text -> e -> Attribute a 
::= :: (Expr k, Expr v) => k -> v -> Attribute Dynamic 
NoAttribute :: Attribute a 

Instances

class OptArgs a whereSource

An operation that accepts optional arguments

Methods

ex :: a -> [Attribute Static] -> aSource

Extend an operation with optional arguments

Instances

OptArgs ReQL 
OptArgs b => OptArgs (a -> b) 

cons :: Expr e => e -> ArgList -> ArgListSource

arr :: Arr a => a -> ArgListSource

data Bound a Source

An upper or lower bound for between and during

Constructors

Open

An inclusive bound

Fields

getBound :: a
 
Closed

An exclusive bound

Fields

getBound :: a
 
DefaultBound 

Fields

getBound :: a
 

Instances

Functor Bound 
Num a => Num (Bound a) 

empty :: ReQLSource

An empty object

newtype WireQuery Source

Constructors

WireQuery 

Fields

queryJSON :: Datum
 

Instances

Show WireQuery 

newtype WireBacktrace Source

Constructors

WireBacktrace 

Fields

backtraceJSON :: Datum
 

note :: String -> ReQL -> ReQLSource

Add a note a a ReQL Term

This note does not get sent to the server. It is used to annotate backtraces and help debugging.

(?:=) :: Expr e => Text -> Maybe e -> Attribute aSource