r      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n opqrstuvwxyz{|}~                                                                                                            ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe-Inferred Safe-Inferred  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!  ~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!   Safe-Inferred Safe-Inferred  Safe-Inferred   Safe-Inferred   Safe-InferredNone124F A ReQL value{''k   Safe-InferredA table description+when Nothing, use the connection's databaseA database, referenced by name  None!"124:<FM)Convert other types into ReQL expressions A ReQL Term.An upper or lower bound for between and duringAn exclusive boundAn inclusive bound*A key/value pair used for building objectsBuild arrays of exprsA list of terms!,An operation that accepts optional arguments"+Extend an operation with optional arguments#State used to build a Term(A term ready to be sent over the network)&Internal representation of a ReQL Term9 Build a term:Build a term with no optargs<nA shortcut for inserting strings into ReQL expressions Useful when OverloadedStrings makes the type ambiguous=6A shortcut for inserting numbers into ReQL expressionsBAn empty objectCAdd a note a a ReQL TermaThis note does not get sent to the server. It is used to annotate backtraces and help debugging.      !"#$%&'()*+,-./0123456789:;<=>?@ABC      !"#$%&'()*+,-./0123456789:;A      !"#$%&'()*+,-./0123456789:;<=>?@ABCC34:9)/-*012.+,>@ #$%&'(6<=!"7 5?   A;B   C8t34        !"#$%&'() /-*012.+,56789:;<=>?@ABC      !"#$%&'()*+,-./0123456789:; None+F JThe response to a query[#A connection to the database server_The next token to use`The default databasec.Create a new connection to the database serverExample:2 connect using the default port with no passphrase&h <- connect "localhost" 28015 NothingeSet the default databaseYThe new handle is an alias for the old one. Calling close on either one will close both.fClose an open connectioni Get the next value from a cursorj Get the next batch from a cursork/A lazy stream of all the elements in the cursorlA strict version of collectm2Wait for NoReply queries to complete on the servern() <- runOpts h [NoReply] $ table "users" # get "bob" # update (\row -> merge row ["occupation" := "teacher"]) noReplyWait hL<=>?@DEFGHIABCDJKLMNOPQRSTUVWXYZ[\]^_`abEFGcHIJKLdMNOPQRefSghijTklmnUVWXYZ[\+DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn+[\]^_`abcfedVWXYZhijklgJMLKDHGFENOPQRSTUImn-<=>?@DHGFEIABCDJMLKNOPQRSTUVWXYZ[\]^_`abEFGcHIJKLdMNOPQRefSghijTklmnUVWXYZ[\None!"124~1Convert the raw query response into useful valuesPer-query settings"Run a query with the given options%Run a given query and return a Resultrun h $ num 1 :: IO Int13run h $ str "foo" :: IO (Either RethinkDBError Int)WLeft RethinkDB: Unexpected response: "when expecting a Int, encountered String instead"#run h $ str "foo" :: IO (Maybe Int)Nothingrun h $ str "foo" :: IO Inta*** Exception: RethinkDB: Unexpected response: "when expecting a Int, encountered String instead"Qc <- run h $ table "users" # orderBy [asc "name"] # (!"name"):: IO (Cursor Datum)next c Just "bill" collect c["nancy","sabrina"]$Run a given query and return a DatumNopqrstuvwxyz{|}~]^_`abcdefghijklmnopqrstuvwxyz{|}~opqrstuvwxyz{|}~~stuvwxyz{|}opqr9opqrs tuvwxyz{|}~]_^`abcdefghijklmnopqrstuvwxyz{|}~None,The time and date when the query is executed >>> run' h $ nowWBuild a time object from the year, month, day, hour, minute, second and timezone fields%run' h $ time 2011 12 24 23 59 59 "Z"Time<2011-12-24 23:59:59 +0000>DBuild a time object given the number of seconds since the unix epochrun' h $ epochTime 1147162826Time<2006-05-09 08:20:26 +0000>+Build a time object given an iso8601 string+run' h $ iso8601 "2012-01-07T08:34:00-0700"Time<2012-01-07 08:34:00 -0700>%The same time in a different timezone$_ <- run' h $ inTimezone "+0800" now)Test if a time is between two other timesLrun' h $ during (Open $ now R.- (60*60)) (Closed now) $ epochTime 1382919271falseExtract part of a time valueExtract part of a time valueExtract part of a time valueExtract part of a time valueExtract part of a time valueExtract part of a time valueExtract part of a time valueExtract part of a time valueExtract part of a time valueExtract part of a time valueExtract part of a time value(Convert a time to another representation(Convert a time to another representationNone$Convert a line object into a polygon6run' h $ fill $ line [[-122,37], [-120,39], [-121,38]]2Polygon<[[-122,37],[-120,39],[-121,38],[-122,37]]>9Convert a GeoJSON object into a RethinkDB geometry object?run' h $ geoJSON ["type" := "Point", "coordinates" := [-45,80]]Point<[-45,80]>9Convert a RethinkDB geometry object into a GeoJSON object2run' h $ toGeoJSON $ point (-122.423246) 37.7793886{"coordinates":[-122.423246,37.779388],"type":"Point"}2Search a geospatial index for intersecting objectsIrun' h $ table "places" # getIntersecting (point (-122) 37) (Index "geo")[]0Query a geospatial index for the nearest matchesIrun' h $ table "places" # getNearest (point (-122) 37) (Index "location")[]wrun' h $ table "places" # ex getNearest [maxResults 5, maxDist 10, unit Kilometer] (point (-122) 37) (Index "location")[]/Test whether a geometry object includes anotherCrun' h $ circle (point (-122) 37) 5000 # includes (point (-120) 48)false'Test if two geometry objects intersectsMrun' h $ intersects (line [[-122,37],[-120,48]]) (line [[-120,49],[-122,48]])falseCreate a line object"run' h $ line [[-73,45],[-122,37]]Line<[-73,45],[-122,37]>Create a point objectsrun' h $ point (-73) 40Point<[-73,40]>Create a polygon object.run' h $ polygon [[-73,45],[-122,37],[-73,40]]/Polygon<[[-73,45],[-122,37],[-73,40],[-73,45]]>Punch a hole in a polygonprun' h $ (polygon [[-73,45],[-122,37],[-73,40]]) # polygonSub (polygon [[-73.2,40.1],[-73.2,40.2],[-73.3,40.1]])ePolygon<[[-73,45],[-122,37],[-73,40],[-73,45]],[[-73.2,40.1],[-73.2,40.2],[-73.3,40.1],[-73.2,40.1]]>'Create a polygon approximating a circleGrun' h $ ex circle [numVertices 6, unit Kilometer] (point (-73) 40) 100Polygon<[[-73,39.099310036015424],[-74.00751390838496,39.54527799206398],[-74.02083610406069,40.445812561599965],[-73,40.900549591978255],[-71.97916389593931,40.445812561599965],[-71.99248609161504,39.54527799206398],[-73,39.099310036015424]]>4Distance between a point and another geometry object4run' h $ distance (point (-73) 40) (point (-122) 37)4233453.467303547Crun' h $ ex distance [unit Mile] (point (-73) 40) (point (-122) 37)2630.54602825968 Optional argument for getNearest Optional argument for getNearest5Optional argument for getNearest, circle and distanceOptional argument for circle None!"24u(Apply a function to a list of arguments.Called do in the official drivers#run h $ (\x -> x R.* 2) `apply` [4]8 Evaluate a JavaScript expressionrun' h $ js "Math.PI"3.141592653589793'let r_sin x = js "Math.sin" `apply` [x]run h $ R.map r_sin [pi, pi/2][1.2246063538223773e-16,1]Create a table on the server k>>> run' h $ tableCreate (table "posts") def [{"created":1}] >>> run' h $ tableCreate (table "users"){ tablePrimaryKey = Just "name" } def [{"created":1}] >>> run' h $ tableCreate (Table (Just "doctests") "bar" (Just "name")) def [{"created":1}] >>> run' h $ ex tableCreate ["datacenter":="orion"] (Table (Just "doctests") "bar" (Just "name")) def [{"created":1}]5Insert a document or a list of documents into a tablemrun h $ table "users" # insert (map (\x -> ["name":=x]) ["bill", "bob", "nancy" :: Text]) :: IO WriteResponse {inserted:3}mrun h $ table "posts" # insert ["author" := str "bill", "message" := str "hi", "id" := 1] :: IO WriteResponse {inserted:1}run h $ table "posts" # insert ["author" := str "bill", "message" := str "hello", "id" := 2, "flag" := str "deleted"] :: IO WriteResponse {inserted:1}run h $ table "posts" # insert ["author" := str "bob", "message" := str "lorem ipsum", "id" := 3, "flag" := str "pinned"] :: IO WriteResponse {inserted:1}+Add to or modify the contents of a documenturun h $ table "users" # getAll "name" [str "bob"] # update (const ["occupation" := str "tailor"]) :: IO WriteResponse {replaced:1}Replace a document with anotherrun h $ replace (\user -> ["name" := user!"name", "occupation" := str "clothier"]) . R.filter ((R.== str "tailor") . (!?"occupation")) $ table "users" :: IO WriteResponse {replaced:1}Delete the documentsNrun h $ delete . getAll "name" [str "bob"] $ table "users" :: IO WriteResponse {deleted:1}Like map but for write queries>_ <- run' h $ table "users" # replace (without ["post_count"])run h $ forEach (table "users") (\user -> table "users" # get (user!"name") # ex update [nonAtomic] (const ["post_count" := R.count (table "posts" # R.filter (\post -> post!"author" R.== user!"name"))])) :: IO WriteResponse {replaced:2}A table/fmap sort $ run h $ table "users" :: IO [Datum]@[{"post_count":2,"name":"bill"},{"post_count":0,"name":"nancy"}] Drop a table run' h $ tableDrop (table "foo") {"dropped":1}List the tables in a database<fmap sort $ run h $ tableList (db "doctests") :: IO [String]["places","posts","users"]Addition or concatenation.Use the Num instance, or a qualified operator. run h $ 2 + 57run h $ str "foo" R.+ str "bar""foobar" Subtraction run h $ 2 - 5-3Multiplication run h $ 2 * 510Divisionrun h $ 2 R./ 50.4Modrun h $ 5 `mod` 21 Boolean orrun h $ True R.|| Falsetrue Boolean andrun h $ True R.&& FalsefalseTest for equality"run h $ ["a" := 1] R.== ["a" := 1]trueTest for inequalityrun h $ 1 R./= Falsetrue Greater thanrun h $ 3 R.> 2true Lesser thanrun h $ (str "a") R.< (str "b")trueGreater than or equal torun h $ [1] R.>= NullfalseLesser than or equal torun h $ 2 R.<= 2trueNegationrun h $ R.not Falsetruerun h $ R.not Nulltrue#The size of a sequence or an array.run h $ count (table "users")2Join two sequences./run h $ [1,2,3] `union` ["a", "b", "c" :: Text][1,2,3,"a","b","c"]Map a function over a sequence-run h $ R.map (!"a") [["a" := 1], ["a" := 2]][1,2]#Filter a sequence given a predicate1run h $ R.filter (R.< 4) [3, 1, 4, 1, 5, 9, 2, 6] [3,1,1,2]KQuery all the documents whose value for the given index is in a given rangeJrun h $ table "users" # between "name" (Closed $ str "a") (Open $ str "c") [{"post_count":2,"name":"bill"}]Append a datum to a sequencerun h $ append 3 [1, 2][1,2,3]3Map a function of a sequence and concat the results*run h $ concatMap id [[1, 2], [3], [4, 5]] [1,2,3,4,5]$SQL-like inner join of two sequencesrun' h $ innerJoin (\user post -> user!"name" R.== post!"author") (table "users") (table "posts") # R.zip # orderBy [asc "id"] # pluck ["name", "message"]B[{"name":"bill","message":"hi"},{"name":"bill","message":"hello"}]$SQL-like outer join of two sequencesrun' h $ outerJoin (\user post -> user!"name" R.== post!"author") (table "users") (table "posts") # R.zip # orderBy [asc "id", asc "name"] # pluck ["name", "message"]S[{"name":"nancy"},{"name":"bill","message":"hi"},{"name":"bill","message":"hello"}]\An efficient inner_join that uses a key for the left table and an index for the right table.xrun' h $ table "posts" # eqJoin "author" (table "users") "name" # R.zip # orderBy [asc "id"] # pluck ["name", "message"]B[{"name":"bill","message":"hi"},{"name":"bill","message":"hello"}]*Drop elements from the head of a sequence.run h $ skip 2 [1, 2, 3, 4][3,4]Limit the size of a sequence.run h $ limit 2 [1, 2, 3, 4][1,2]Cut out part of a sequence!run h $ slice 2 4 [1, 2, 3, 4, 5][3,4]#Reduce a sequence to a single valuerun h $ reduce0 (+) 0 [1, 2, 3]6-Reduce a non-empty sequence to a single valuerun h $ reduce (+) [1, 2, 3]6-Filter out identical elements of the sequenceDfmap sort $ run h $ distinct (table "posts" ! "flag") :: IO [String]["deleted","pinned"]EMerge the "left" and "right" attributes of the objects in a sequence.`fmap sort $ run h $ table "posts" # eqJoin "author" (table "users") "name" # R.zip :: IO [Datum][{"post_count":2,"flag":"deleted","name":"bill","author":"bill","id":2,"message":"hello"},{"post_count":2,"name":"bill","author":"bill","id":1,"message":"hi"}]"Order a sequence by the given keys_run' h $ table "users" # orderBy [desc "post_count", asc "name"] # pluck ["name", "post_count"]@[{"post_count":2,"name":"bill"},{"post_count":0,"name":"nancy"}]Irun' h $ table "users" # ex orderBy ["index":="name"] [] # pluck ["name"]"[{"name":"bill"},{"name":"nancy"}]Ascending orderDescending orderUTurn a grouping function and a reduction function into a grouped map reduce operation_run' h $ table "posts" # group (!"author") (reduce (\a b -> a + "\n" + b) . R.map (!"message"))T[{"group":"bill","reduction":"hi\nhello"},{"group":"bob","reduction":"lorem ipsum"}]|run' h $ table "users" # group ((!0) . splitOn "" . (!"name")) (\users -> let pc = users!"post_count" in [avg pc, R.sum pc])A[{"group":"b","reduction":[2,2]},{"group":"n","reduction":[0,0]}]>Rewrite multiple reductions into a single map/reduce operationThe sum of a sequencerun h $ sum [1, 2, 3]6The average of a sequencerun h $ avg [1, 2, 3, 4]2.5 Minimum value !Value that minimizes the function  Minimum value !Value that maximizes the function ;Get a single field from an object or an element of an arrayrun h $ ["foo" := True] ! "foo"truerun h $ [1, 2, 3] ! 010Or a single field from each object in a sequence3run h $ [["foo" := True], ["foo" := False]] ! "foo" [true,false] *Get a single field, or null if not presentrun' h $ empty !? "foo"nullKeep only the given attributesOrun' h $ [["a" := 1, "b" := 2], ["a" := 2, "c" := 7], ["b" := 4]] # pluck ["a"][{"a":1},{"a":2},{}]*Remove the given attributes from an objectQrun' h $ [["a" := 1, "b" := 2], ["a" := 2, "c" := 7], ["b" := 4]] # without ["a"][{"b":2},{"c":7},{"b":4}]+Test if a sequence contains a given elementrun' h $ [1,2,3] # contains 1trueMerge two objects together8run' h $ merge ["a" := 1, "b" := 1] ["b" := 1, "c" := 2]{"a":1,"b":1,"c":2}ELiteral objects, in a merge or update, are not processed recursively.@run' h $ ["a" := ["b" := 1]] # merge ["a" := literal ["c" := 2]] {"a":{"c":2}}*Remove fields when doing a merge or update4run' h $ ["a" := ["b" := 1]] # merge ["a" := remove]{}Server-side ifrun h $ branch (1 R.< 2) 3 43Abort the query with an error'run' h $ R.error (str "haha") R./ 2 + 1/*** Exception: RethinkDB: Runtime error: "haha"- in add(div({- HERE -} error("haha"), 2), 1)Create a Database referencerun' h $ db "test" # info{"name":"test","type":"DB"}Create a database on the serverrun' h $ dbCreate "dev" {"created":1}Drop a databaserun' h $ dbDrop (db "dev") {"dropped":1} List the databases on the server_ <- run' h $ dbList4Create an index on the table from the given functionArun' h $ table "users" # indexCreate "occupation" (!"occupation") {"created":1}Nrun' h $ table "users" # ex indexCreate ["multi":=True] "friends" (!"friends") {"created":1}Nrun' h $ table "users" # ex indexCreate ["geo":=True] "location" (!"location") {"created":1}#Get the status of the given indexes 'run' h $ table "users" # indexStatus []Wait for an index to be built %run' h $ table "users" # indexWait []EEnsures that writes on a given table are written to permanent storagerun' h $ sync (table "users") {"synced":1}List the indexes on the table"run' h $ indexList (table "users")#["friends","location","occupation"]  Drop an index/run' h $ table "users" # indexDrop "occupation" {"dropped":1}!)Retreive documents by their indexed value7run' h $ table "users" # getAll PrimaryKey [str "bill"] [{"post_count":2,"name":"bill"}]"Get a document by primary key$run' h $ table "users" # get "nancy"{"post_count":0,"name":"nancy"}##Convert a value to a different typerun h $ coerceTo "STRING" 1"1"$Convert a value to an array<run h $ asArray $ ["a" := 1, "b" := 2] :: IO [(String, Int)][("a",1),("b",2)]%Convert a value to a string'run h $ asString $ ["a" := 1, "b" := 2]!"{\n\t\"a\":\t1,\n\t\"b\":\t2\n}"&Convert a value to a numberrun h $ asNumber (str "34")34'Convert a value to an object)run' h $ asObject $ [(str "a",1),("b",2)] {"a":1,"b":2}(Convert a value to a boolean) Like hasFields followed by pluckTrun' h $ [["a" := 1, "b" := 2], ["a" := 2, "c" := 7], ["b" := 4]] # withFields ["a"][{"a":1},{"a":2}]*EThe position in the sequence of the elements that match the predicate9run h $ indexesOf (match "ba.") [str "foo", "bar", "baz"][1,2]+Test if a sequence is emptyrun h $ isEmpty [1]false,RSelect a given number of elements from a sequence with uniform random distribution,_ <- run' h $ sample 3 [0,1,2,3,4,5,6,7,8,9]-Prepend an element to an arrayrun h $ prepend 1 [2,3][1,2,3].The different of two lists&run h $ [1,2,3,4,5] # difference [2,5][1,3,4]/5Insert a datum into an array if it is not yet presentrun h $ setInsert 3 [1,2,4,4,5] [1,2,4,5,3]0The union of two setsrun h $ [1,2] `setUnion` [2,3][2,3,1]1The intersection of two sets%run h $ [1,2] `setIntersection` [2,3][2]2The difference of two sets#run h $ [2,3] # setDifference [1,2][3]3&Test if an object has the given fields"run h $ hasFields "a" $ ["a" := 1]true40Insert a datum at the given position in an arrayrun h $ insertAt 1 4 [1,2,3] [1,4,2,3]58Splice an array at a given position inside another array run h $ spliceAt 2 [4,5] [1,2,3] [1,2,4,5,3]6Delete an element from an arrayrun h $ deleteAt 1 [1,2,3][1,3]7Change an element in an arrayrun h $ changeAt 1 4 [1,2,3][1,4,3]8$The list of keys of the given object!run h $ keys ["a" := 1, "b" := 2] ["a","b"]9'Match a string to a regular expression.-run' h $ str "foobar" # match "f(.)+[bc](.+)"j{"groups":[{"start":2,"end":3,"str":"o"},{"start":4,"end":6,"str":"ar"}],"start":0,"end":6,"str":"foobar"}:'Catch some expections inside the query.Called default in the official drivers-run h $ R.handle (const 0) $ ["a" := 1] ! "b"0/run h $ R.handle (expr . id) $ ["a" := 1] ! "b"0"No attribute `b` in object:\n{\n\t\"a\":\t1\n}";/A string representing the type of an expressionrun h $ typeOf 1"NUMBER"<GGet information on a given expression. Useful for tables and databases.run h $ info $ table "users"z{"primary_key":"name","name":"users","indexes":["friends","location"],"type":"TABLE","db":{"name":"doctests","type":"DB"}}="Parse a json string into an objectrun' h $ json "{\"a\":1}"{"a":1}>Flipped function application?Convert to upper caserun h $ upcase (str "Foo")"FOO"@Convert to lower caserun h $ downcase (str "Foo")"foo"A'Split a string on whitespace charactersrun' h $ split (str "foo bar") ["foo","bar"]B#Split a string on a given delimiter%run' h $ str "foo, bar" # splitOn ","["foo"," bar"]run' h $ str "foo" # splitOn "" ["f","o","o"]C,Split a string up to a given number of times'run' h $ str "a:b:c:d" # splitMax ":" 2["a","b","c:d"]DA random float between 0 and 17run' h $ (\x -> x R.< 1 R.&& x R.>= 0) `apply` [random]trueEA random number between 0 and n=run' h $ (\x -> x R.< 10 R.&& x R.>= 0) `apply` [randomTo 10]trueFA random number between 0 and nCrun' h $ (\x -> x R.< 10 R.&& x R.>= 5) `apply` [randomFromTo 5 10]trueG.Retrieve data from the specified URL over HTTPQ_ <- run' h $ http "http://httpbin.org/get" def{ httpParams = Just ["foo" := 1] }q_ <- run' h $ http "http://httpbin.org/put" def{ httpMethod = Just PUT, httpData = Just $ expr ["foo" := "bar"] }H-Splice a list of values into an argument listIDReturn an infinite stream of objects representing changes to a table>cursor <- run h $ table "posts" # changes :: IO (Cursor Datum)frun h $ table "posts" # insert ["author" := "bill", "message" := "bye", "id" := 4] :: IO WriteResponse {inserted:1} next cursorHJust {"new_val":{"author":"bill","id":4,"message":"bye"},"old_val":null}JOOptional argument for returning an array of objects describing the changes made[run h $ table "users" # ex insert [returnChanges] ["name" := "sabrina"] :: IO WriteResponseD{inserted:1,changes:[{"old_val":null,"new_val":{"name":"sabrina"}}]}K,Optional argument for soft durability writesL'Optional argument for non-atomic writesRrun' h $ table "users" # get "sabrina" # update (merge ["lucky_number" := random])~*** Exception: RethinkDB: Runtime error: "Could not prove function deterministic. Maybe you want to use the non_atomic flag?" in {- HERE -} update(5 get(table(db("doctests"), "users"), "sabrina"),1 (\b -> merge(b, {lucky_number: random()})))trun h $ table "users" # get "sabrina" # ex update [nonAtomic] (merge ["lucky_number" := random]) :: IO WriteResponse {replaced:1}      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFTSRQGHIJPKLOMN       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST > None) "<=BCDEFGHJNOPQRSV[cefiklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN+c[femNOPQRSDHGFEJ~iklnV Istuvwxyz{|}opqrJLKM"!   )*+,   -./012  3456789?@ABCDEFH:#$%&'(;<=NG"<=>CBNone "<=BCDEFGHJNOPQRSV[cefiklmnopqrstuvwxyz{|}~     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNNoneFTakes a function that takes a sequence as an argument, and returns a function that only uses that sequence once, by merging the map and reduce operations. This is used by groupBy.ZA built-in map operation\RA Chain of ReQL expressions that might be transformed into a map/reduce operation^"Special cases for reduce with base_A rewritten map/reduce`*map/reduce operations represented as partsa Just a mapb-A constant, not really a map/reduce operationcERepresents a map/reduce operation split into its map and reduce partsi.Compares the two representations of a variablej9notNone checks that it is a map/reduce and not a constantk2Helper function for casting up from Term into ReQLl@Build a single argument function from a constant ReQL expressionm=Build a two argument function from a constant ReQL expressionn)Convert a Chain back into a ReQL functiono#Convert an MRF into a ReQL function{tRewrites the term in the second argument to merge all uses of the variable whose id is given in the first argument.}/Chain a ReQL command onto a MapReduce operation~*Convert some builtin operations into a map9Convert some of the built-in operations into a map/reduce TODO: these have not been tested,Convert from one representation to the otherWThis undocumented optional argument circumvents stream polymorphism on some operations$Rewrite a command into a map/reduce.QThis is a special case for when only one of the arguments is itself a map/reducepRewrite a command that combines the result of multiple map/reduce operations into a single map/reduce operationExtract the inner map/reduce objects, also returning a function which, given the result of all the map/reduce operations, returns the result of the given command1UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1ijklmcdefgh\ba`_^]Z[WYXUVnopqrstuvwxyz{|}~"UVWYXZ[\ba`_^]cdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~V                                 ! " " # $ % & ' ( ) * + , - . . / 0 1 2 3 4 5 6  7 3 8 9 :  ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U U V W X Y Z Z [ [ \ ] ^ _ _ ` a b c d e f g h i j k l m n o p qrrstuuvwxyz{|}~             t                                                                                                     ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N OPQRSRTUVWXYZT[\\]^_`abcdefghijklmnopqnrstuvwxyz{|}~                                                                               ! " # $ % & ' ( ) * + , - . / 0 1 1 2 2 3 P 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~rethinkdb-1.15.2.0Database.RethinkDB.WireDatabase.RethinkDB.Wire.TermDatabase.RethinkDB.Wire.Query Database.RethinkDB.Wire.Response$Database.RethinkDB.Wire.VersionDummyDatabase.RethinkDB.Wire.DatumDatabase.RethinkDB.Wire.FrameDatabase.RethinkDB.DatumDatabase.RethinkDB.TypesDatabase.RethinkDB.ReQLDatabase.RethinkDB.FunctionsDatabase.RethinkDBDatabase.RethinkDB.NetworkDatabase.RethinkDB.DriverDatabase.RethinkDB.TimeDatabase.RethinkDB.GeospatialDatabase.RethinkDB.MapReduceDatabase.RethinkDB.NoClash WireValuetoWirefromWireTermType POLYGON_SUB GET_NEARESTFILLGET_INTERSECTINGCIRCLEINCLUDES INTERSECTSDISTANCEPOLYGONLINEPOINT TO_GEOJSONGEOJSONBINARYARGSCHANGESRANDOMUNGROUPSPLITMAXMINAVGSUMGROUPLITERALDECEMBERNOVEMBEROCTOBER SEPTEMBERAUGUSTJULYJUNEMAYAPRILMARCHFEBRUARYJANUARYSUNDAYSATURDAYFRIDAYTHURSDAY WEDNESDAYTUESDAYMONDAYTIMESECONDSMINUTESHOURS DAY_OF_YEAR DAY_OF_WEEKDAYMONTHYEARTIMEZONE TIME_OF_DAYDATEDURING IN_TIMEZONENOW TO_EPOCH_TIME EPOCH_TIME TO_ISO8601ISO8601JSONDEFAULTSAMPLEDOWNCASEUPCASEMATCHINFODESCASCFUNCFOREACHALLANYBRANCHFUNCALL INDEX_RENAME INDEX_WAIT INDEX_STATUS INDEX_LIST INDEX_DROP INDEX_CREATESYNC TABLE_LIST TABLE_DROP TABLE_CREATEDB_LISTDB_DROP DB_CREATEINSERTREPLACEDELETEUPDATETYPEOF COERCE_TO SPLICE_AT CHANGE_AT DELETE_AT INSERT_ATZIPEQ_JOIN OUTER_JOIN INNER_JOINBRACKETNTHUNIONIS_EMPTYCOUNTDISTINCTORDERBY CONCATMAPFILTERMAPREDUCEBETWEENMERGEWITHOUTPLUCK WITH_FIELDS HAS_FIELDSOBJECTKEYS GET_FIELDCONTAINS INDEXES_OFLIMITSKIPSLICESET_DIFFERENCE SET_UNIONSET_INTERSECTION SET_INSERT DIFFERENCEPREPENDAPPENDMODDIVMULSUBADDNOTGEGTLELTNEEQGET_ALLGETTABLEDB IMPLICIT_VARERRORHTTPUUID JAVASCRIPTVARMAKE_OBJ MAKE_ARRAYDATUM$fWireValueTermType QueryType NOREPLY_WAITSTOPCONTINUESTART$fWireValueQueryType ResponseType RUNTIME_ERROR COMPILE_ERROR CLIENT_ERROR WAIT_COMPLETE SUCCESS_FEEDSUCCESS_PARTIALSUCCESS_SEQUENCE SUCCESS_ATOM$fWireValueResponseTypeProtocolPROTOBUFVersionV0_3V0_2V0_1$fWireValueProtocol$fWireValueVersion DatumTypeR_JSONR_OBJECTR_ARRAYR_STRR_NUMR_BOOLR_NULL$fWireValueDatumType FrameTypeOPTPOS$fWireValueFrameType aeson-0.8.0.2Data.Aeson.Types.InternalparseSuccessErrorResultParserToDatumtoDatumLonLat longitudelatitudePolygonLineObjectArray FromDatum parseDatumDatumBinaryPointTimeNumberStringBoolNull fromDatum.=.:.:?encodedecode eitherDecode resultToMayberesultToEitherobjectIndex PrimaryKeyTable tableDatabase tableNametablePrimaryKeyDatabase databaseNameKeyExprReQLapplyjsdata-default-class-0.0.1Data.Default.ClassdefBound DefaultBoundClosedOpengetBound WireBacktrace backtraceJSONFrameFrameOptFramePos Backtrace WireQuery queryJSONexprexprList TermAttributeDynamicStaticOptArg Attribute NoAttribute::=:=arr baseArrayOptArgsex QuerySettings queryTokenqueryDefaultDatabase queryVarIndexqueryUseOutdatedTermNotetermNotetermTerm termDatumtermTypetermArgs termOptArgsrunReQLwithQuerySettingsnewVarIdcons?:=op'op datumTermstrnum buildQuery reqlToDatumconvertBacktrace closedOrOpenemptynote ErrorCodeErrorUnexpectedResponse ErrorRuntime ErrorBadQueryErrorBrokenClientMoreResponse ResponseBatchResponseSingle ResponseErrorRethinkDBError errorCode errorTerm errorMessageerrorBacktraceRethinkDBConnectionErrorCursor cursorMBox cursorBuffer cursorMapRethinkDBHandle rdbSocket rdbWriteLockrdbToken rdbDatabaserdbWait rdbThreadconnect runQLQueryuseclose nextResponse makeCursornext nextBatchcollectcollect' noReplyWaiteachChangeoldValnewVal WriteResponsewriteResponseInsertedwriteResponseDeletedwriteResponseReplacedwriteResponseUnchangedwriteResponseSkippedwriteResponseErrorswriteResponseFirstErrorwriteResponseGeneratedKeyswriteResponseChanges convertResultRunFlag ArrayLimitProfile DurabilityNoReply UseOutdatedrunOptsrunrun'nowtime epochTimeiso8601 inTimezoneduringtimezonedate timeOfDayyearmonthday dayOfWeek dayOfYearhoursminutesseconds toIso8601 toEpochTimeUnitFoot NauticalMileMile KilometerMeterfillgeoJSON toGeoJSONgetIntersecting getNearestincludes intersectslinepointpolygon polygonSubcircledistance maxResultsmaxDistunit numVertices $fExprUnittermToMapReduceConflictResolutionUpdateReplaceSoftHardPaginationStrategyPaginationFunctionLinkNext HttpMethodHEADPATCHPUTPOSTHttpResultFormat FormatBinary FormatJSONP FormatJSON FormatAuto HttpOptions httpTimeouthttpReattempts httpRedirects httpVerifyhttpResultFormat httpMethodhttpAuth httpParams httpHeaderhttpDatahttpPage httpPageLimit tableCreateinsertupdatereplacedeleteforEachtable tableDrop tableList+-*/mod||&&==/=><>=<=notcountunionmapfilterbetweenappend concatMap innerJoin outerJoineqJoinskiplimitslicereduce0reducedistinctziporderByascdescgroup mapReducesumavgminargminmaxargmax!!?pluckwithoutcontainsmergeliteralremovebrancherrordbdbCreatedbDropdbList indexCreate indexStatus indexWait indexRenamesync indexList indexDropgetAllgetcoerceToasArrayasStringasNumberasObjectasBool withFields indexesOfisEmptysampleprepend difference setInsertsetUnionsetIntersection setDifference hasFieldsinsertAtspliceAtdeleteAtchangeAtkeysmatchhandletypeOfinfojson#upcasedowncasesplitsplitOnsplitMaxrandomrandomTo randomFromTohttpargschanges returnChanges durability nonAtomicconflictuuid$fExprConflictResolution$fExprDurability$fDefaultHttpOptions$fExprPaginationStrategy$fExprHttpMethod$fExprHttpResultFormatReduce BuiltInReduceMapFun ConcatMapFunMap BuiltInMapChainAddBaseSingletonArray MapReduceMapReduceChainNoneMRF _mrfMapFun _mrfReduceFun_mrfBase _mrfFinallysameVarnotConstwraptoFun1toFun2 applyChainapplyMRF applyMapsapplyMap applyMapFun applyReduce chainToMRF thenFinallythenMRF composeMaps composeMapFun thenReduce toMapReduce singletonmrChainmapMRF reduceMRFbaseAttrToOptArg noRecurserewrite1rewritexextract showDouble toJSONDatum parseTimeZone $fOrdDatum $fToJSONDatum$fFromJSONDatum$fToDatumRatio$fToDatumFloat$fToDatumDouble $fToDatumBool $fToDatumText$fToDatumText0$fToDatumInteger $fToDatum[] $fToDatumChar$fToDatumWord64$fToDatumWord32$fToDatumWord16$fToDatumWord8 $fToDatumWord$fToDatumInt64$fToDatumInt32$fToDatumInt16 $fToDatumInt8 $fToDatumInt$fToDatumValue $fToDatumSet$fToDatumMaybe$fToDatumByteString$fToDatumByteString0$fToDatumEither$fToDatumUTCTime$fToDatumZonedTime $fToDatumMap $fToDatumMap0$fToDatumHashMap$fToDatumHashMap0$fToDatum(,,,,)$fToDatum(,,,) $fToDatum(,,) $fToDatum(,) $fToDatum()$fToDatumDatum$fToDatumVector $fToDatum[]0 $fShowDatum$fFromJSONLonLat $fShowLonLat $fEqDatum$fToJSONLonLat$fFromDatumRatio$fFromDatumText$fFromDatumText0$fFromDatumInteger$fFromDatumChar$fFromDatumValue$fFromDatumBool$fFromDatumDouble$fFromDatumWord64$fFromDatumWord32$fFromDatumWord16$fFromDatumWord8$fFromDatumWord$fFromDatumInt64$fFromDatumInt32$fFromDatumInt16$fFromDatumInt8$fFromDatumInt $fFromDatum[]$fFromDatumFloat$fFromDatumVector$fFromDatumUTCTime$fFromDatumZonedTime$fFromDatumSet$fFromDatumMaybe$fFromDatumMap$fFromDatumMap0$fFromDatumHashMap$fFromDatumHashMap0$fFromDatumByteString$fFromDatumByteString0$fFromDatumEither$fFromDatum(,,,,)$fFromDatum(,,,)$fFromDatum(,,)$fFromDatum(,) $fFromDatum()$fFromDatumDatum$fFromDatum[]0$fIsStringIndex$fIsStringTable $fShowTable$fIsStringDatabase$fShowDatabaseArrArgListWireTermtermJSON shortLinesvarNamemapTermAttributebaseAttributesargListtoIntstoIntvarsOfvarOf alphaRenameupdateChildren buildTerm complexDatumencodeTextJSONbuildAttributesboundOp$fFloatingReQL$fFractionalReQL $fExpr(,,,,) $fExpr(,,,) $fExpr(,,) $fExpr(,) $fNumBound$fFunctorBound $fExprTerm$fExprZonedTime $fExprUTCTime$fFromDatumFrame $fShowFrame $fShowReQL $fExprHashMap $fExprArgList$fExpr[]$fExprDatabase $fExprTable $fExpr(->) $fExpr(->)0 $fExprRatio $fExprWord64 $fExprWord32 $fExprWord16 $fExprWord8 $fExprWord$fExprByteString$fExprByteString0 $fExprText $fExprText0 $fExprInt64 $fExprInt32 $fExprInt16 $fExprInt8 $fExprFloat$fExpr() $fExprDouble $fExprDatum $fExprBool $fExprInteger $fExprInt $fExprValue $fExprVector $fExprSet $fExprMaybe $fExprMap $fExprMap0$fExprHashMap0$fExprHashMap1 $fExprEither $fExprChar $fExprReQL$fIsStringReQL $fNumReQL$fShowTermAttribute$fExprAttribute $fArrArgList $fArr(,,,) $fArr(,,)$fArr(,)$fArr[]$fArr() $fShowTerm $fOptArgs(->) $fOptArgsReQL$fDefaultQuerySettingsRethinkDBReadError WireResponse_responseDatum _moreFeed _moreHandle _moreTokenTokennewToken connectTorecvAllsGetNullTerminatedString magicNumber withSocketconvertResponseisNoReplyQueryaddMBox sendQLQuery readResponsesreadSingleResponseisLastResponse closeTokencursorFetchBatch$fExceptionRethinkDBReadError$fShowResponse$fShowErrorCode$fShowRethinkDBError$fExceptionRethinkDBError#$fExceptionRethinkDBConnectionError$fShowRethinkDBHandle$fFunctorCursor renderOptionunsafeFromDatumnextFail assertEnd$fShowWriteResponse$fFromDatumWriteResponse$fFromDatumChange $fShowChange$fResultWriteResponse $fResultDatum$fResult(,,,,) $fResult(,,,) $fResult(,,) $fResult(,) $fResultRatio $fResultMap $fResultMap0$fResultHashMap$fResultHashMap0$fResultVector $fResultSet$fResultUTCTime$fResultZonedTime $fResultText $fResultText0$fResultByteString$fResultByteString0$fResultInteger$fResultWord64$fResultWord32$fResultWord16 $fResultWord8 $fResultWord $fResultInt64 $fResultInt32 $fResultInt16 $fResultInt8 $fResultFloat $fResultChar $fResultValue $fResult() $fResultBool$fResultDouble $fResultInt $fResultMaybe$fResultEither $fResult[]$fResultCursor$fResultResponse