MCPcopy Create free account

hub / github.com/christopherhesse/rethinkgo / functions

Functions256 in github.com/christopherhesse/rethinkgo

↓ 103 callersFunctionnaryOperator
(kind expressionKind, operand interface{}, operands ...interface{})
query.go:119
↓ 45 callersFunctionExpr
Expr converts any value to an expression. Internally it uses the `json` module to convert any literals, so any type annotations or methods understood
query.go:219
↓ 35 callersMethodAttr
Attr gets an attribute's value from the row. Example usage: r.Expr(r.Map{"key": "value"}).Attr("key") => "value"
query.go:439
↓ 19 callersMethodCount
Count returns the number of elements in the response. Example usage: var response int err := r.Table("heroes").Count().Run(session).One(&response)
query.go:595
↓ 19 callersMethodErr
Err returns the last error encountered, for example, a network error while contacting the database server, or while parsing. Example usage: err := r
rows.go:137
↓ 18 callersMethodRun
Run runs a query using the given session, there is one Run() method for each type of query.
session.go:183
↓ 16 callersMethodAdd
Add sums two numbers or concatenates two arrays. Example usage: r.Expr(1,2,3).Add(r.Expr(4,5,6)) => [1,2,3,4,5,6] r.Expr(2).Add(2) => 4
query.go:449
↓ 16 callersMethodNth
Nth returns the nth element in sequence, zero-indexed. Example usage: var response int Get the second element of an array err := r.Expr(4,3,2,1).Nth
query.go:673
↓ 16 callersMethodOrderBy
OrderBy sort the sequence by the values of the given key(s) in each row. The default sort is increasing. Example usage: var response []interface{} R
query.go:880
↓ 15 callersMethodUpdate
Update updates rows in the database. Accepts a JSON document, a RQL expression, or a combination of the two. Example usage: var response r.WriteResp
query.go:1622
↓ 15 callersFunctionfuncWrapper
(f interface{}, arity int)
query.go:133
↓ 14 callersMethodGet
Get retrieves a single row by primary key. Example usage: var response map[string]interface{} err := r.Table("heroes").Get("Doctor Strange").Run(ses
query.go:334
↓ 13 callersMethodFilter
Filter removes all objects from a sequence that do not match the given condition. The condition can be an RQL expression, an r.Map, or a function tha
query.go:826
↓ 13 callersMethodMap
Map transforms a sequence by applying the given function to each row. Example usage: var squares []int Square a series of numbers square := func(row
query.go:757
↓ 12 callersMethodEnum
()
ql2/ql2.pb.go:506
↓ 11 callersMethodReduce
Reduce iterates over a sequence, starting with a base value and applying a reduction function to the value so far and the next row of the sequence. E
query.go:935
↓ 9 callersFunctionDb
Db lets you perform operations within a specific database (this will override the database specified on the session). This can be used to access or c
query.go:1396
↓ 8 callersMethodEq
Eq returns true if two values are equal. Example usage: r.Expr(1).Eq(1) => true
query.go:512
↓ 8 callersMethodInsert
Insert inserts rows into the database. If no value is specified for the primary key (by default "id"), a value will be generated by the server, e.g.
query.go:1576
↓ 8 callersFunctionJs
Terms // Js creates an expression using Javascript code. The code is executed on the server (using eval() https://developer.mozilla.org/en-US/docs/
query.go:283
↓ 8 callersMethodPluck
Derived Methods // Pluck takes only the given attributes from an object, discarding all others. See also .Without(). Example usage: var heroes []i
query.go:1027
↓ 7 callersMethodAtomic
Atomic changes the required atomic-ness of a query. By default queries will only be run if they can be executed atomically, that is, all at once. If
query.go:1606
↓ 7 callersFunctionBranch
Branch checks a test expression, evaluating the trueBranch expression if it's true and falseBranch otherwise. Example usage: Roughly equivalent RQL
query.go:310
↓ 7 callersMethodGt
Gt returns true if the first value is greater than the second. Example usage: r.Expr(2).Gt(1) => true
query.go:530
↓ 7 callersFunctionTable
Table references all rows in a specific table, using the database that this method was called on. Example usage: var response []map[string]interface
query.go:1494
↓ 7 callersMethodTableCreate
(name string)
query.go:1420
↓ 6 callersMethodMerge
Merge combines an object with another object, overwriting properties from the first with properties from the second. Example usage: var response int
query.go:616
↓ 6 callersMethodReplace
Replace replaces rows in the database. Accepts a JSON document or a RQL expression, and replaces the original document with the new one. The new row m
query.go:1641
↓ 5 callersMethodCoerceTo
CoerceTo converts a value of one type to another type. You can convert: a selection, sequence, or object into an ARRAY, an array of pairs into an OBJ
query.go:1749
↓ 5 callersMethodGetToken
()
ql2/ql2.pb.go:563
↓ 5 callersMethodLt
Lt returns true if the first value is less than the second. Example usage: r.Expr(1).Lt(2) => true
query.go:548
↓ 5 callersMethodString
()
ql2/ql2.pb.go:801
↓ 5 callersFunctionrunQuery
(c *test.C, pair ExpectPair)
basic_test.go:163
↓ 5 callersMethodtoTerm
toTerm converts an arbitrary object to a Term, within the context that toTerm was called on.
protobuf.go:29
↓ 4 callersMethodDiv
Div divides two numbers. Example usage: r.Expr(3).Div(2) => 1.5
query.go:476
↓ 4 callersMethodGroupBy
GroupBy does a sort of grouped map reduce. First the server groups all rows that have the same value for `attribute`, then it applys the map reduce t
query.go:396
↓ 4 callersMethodHasFields
HasFields returns true if an object has all the given attributes. Example usage: hero := r.Map{"name": "Iron Man", "energy": 6, "speed": 5} r.Expr(h
query.go:837
↓ 4 callersMethodMul
Mul multiplies two numbers. Example usage: r.Expr(2).Mul(3) => 6
query.go:467
↓ 4 callersMethodNot
Not performs a logical not on a value. Example usage: r.Expr(true).Not() => false
query.go:566
↓ 4 callersMethodZip
Zip flattens the results of a join by merging the "left" and "right" fields of each row together. If any keys conflict, the "right" field takes prece
query.go:1268
↓ 3 callersMethodAnd
And performs a logical and on two values. Example usage: r.Expr(true).And(true) => true
query.go:494
↓ 3 callersFunctionAsc
Asc tells OrderBy to sort a particular attribute in ascending order. This is the default sort. Example usage: var response []interface{} Retrieve v
query.go:894
↓ 3 callersMethodForEach
ForEach runs a given write query for each row of a sequence. Example usage: Delete all rows with the given ids var response r.WriteResponse Delete m
query.go:1683
↓ 3 callersMethodGe
Gt returns true if the first value is greater than or equal to the second. Example usage: r.Expr(2).Gt(2) => true
query.go:539
↓ 3 callersMethodNext
Next moves the iterator forward by one document, returns false if there are no more rows or some sort of error has occurred (use .Err() to get the las
rows.go:89
↓ 3 callersMethodScan
Scan writes the current row into the provided variable, which must be passed by reference. NOTE: Scan uses json.Unmarshal internally and will not cle
rows.go:127
↓ 3 callersMethodWithout
Without removes the given attributes from an object. See also .Pluck(). Example usage: var heroes []interface{} err := r.Table("heroes").Without("r
query.go:1052
↓ 3 callersFunctionformatError
(message string, response *p.Response)
error.go:8
↓ 3 callersFunctionstringsToInterfaces
(strings []string)
query.go:125
↓ 2 callersMethodAll
All fetches all the results from an iterator into a reference to a slice. It may perform multiple network requests to the server until it has retriev
rows.go:149
↓ 2 callersMethodAppend
Append appends a value to an array. Example usage: var response []interface{} err := r.Expr(r.List{1, 2, 3, 4}).Append(5).Run(session).One(&response
query.go:630
↓ 2 callersFunctionAvg
Avg computes the average value of an attribute for a group, for use with the .GroupBy() method. Example usage: var response []interface{} err := r.T
query.go:1349
↓ 2 callersMethodBetween
Between gets all rows where the key attribute's value falls between the lowerbound and upperbound (inclusive). Use nil to represent no upper or lower
query.go:864
↓ 2 callersMethodClose
Close closes the session, freeing any associated resources. Example usage: err := sess.Close()
session.go:73
↓ 2 callersMethodDelete
Delete removes one or more rows from the database. Example usage: var response r.WriteResponse Delete a single row by id id := "5d93edbb-2882-4594-
query.go:1661
↓ 2 callersFunctionDesc
Desc tells OrderBy to sort a particular attribute in descending order. Example usage: var response []interface{} Retrieve villains in order of decre
query.go:905
↓ 2 callersMethodEqJoin
EqJoin performs a join on two expressions, it is more efficient than .InnerJoin() and .OuterJoin() because it looks up elements in the right table by
query.go:1192
↓ 2 callersMethodGetType
()
ql2/ql2.pb.go:818
↓ 2 callersMethodOr
Or performs a logical or on two values. Example usage: r.Expr(true).Or(false) => true
query.go:503
↓ 2 callersMethodReconnect
Reconnect closes and re-opens a session. Example usage: err := sess.Reconnect()
session.go:57
↓ 2 callersMethodSkip
Skip returns all results after the first `start` results. Basically it's the opposite of .Limit(). Example usage: var response []int err := r.Expr(
query.go:717
↓ 2 callersMethodSub
Sub subtracts two numbers. Example usage: r.Expr(2).Sub(2) => 0
query.go:458
↓ 2 callersMethodTypeOf
TypeOf returns the type of the expression. Example usage: var response string err := r.Expr(1).TypeOf().Run(session).One(&response) Example respons
query.go:1718
↓ 2 callersMethodUnion
Union concatenates two sequences. Example usage: var response []interface{} Retrieve all heroes and villains r.Table("heroes").Union(r.Table("villai
query.go:658
↓ 2 callersMethodbuildProtobuf
buildProtobuf converts a query to a protobuf and catches any panics raised by the toProtobuf() functions.
protobuf.go:529
↓ 2 callersFunctiondatumUnmarshal
(datum *p.Datum, v interface{})
datum.go:34
↓ 2 callersMethodexecuteQuery
executeQuery is an internal function, shared by Rows iterator and the normal Run() call. Runs a protocol buffer formatted query, returns a list of str
conn.go:143
↓ 2 callersMethodgetContext
()
session.go:177
↓ 2 callersFunctionnextVariableNumber
()
protobuf.go:336
↓ 2 callersFunctionparamsToTerm
(params []int64)
protobuf.go:438
↓ 2 callersFunctionprotobufToString
(p proto.Message, indentLevel int)
utils.go:29
↓ 2 callersFunctionresetDatabase
(c *test.C)
basic_test.go:62
↓ 1 callersMethodConcatMap
ConcatMap constructs a sequence by running the provided function on each row, then concatenating all the results. Example usage: var flattened []int
query.go:787
↓ 1 callersFunctionConnect
Connect creates a new database session. NOTE: You probably should not share sessions between goroutines. Example usage: sess, err := r.Connect("loc
session.go:38
↓ 1 callersFunctionCount
Count counts the number of rows in a group, for use with the .GroupBy() method. Example usage: var response []interface{} Count all heroes in each s
query.go:1294
↓ 1 callersFunctionDbCreate
DbCreate creates a database with the supplied name. Example usage: err := r.DbCreate("marvel").Run(session).Exec()
query.go:1358
↓ 1 callersFunctionDbDrop
DbDrop deletes the specified database Example usage: err := r.DbDrop("marvel").Run(session).Exec()
query.go:1367
↓ 1 callersMethodDistinct
Distinct removes duplicate elements from a sequence. Example usage: var response []interface{} Get a list of all possible strength values for our he
query.go:581
↓ 1 callersMethodError
()
error.go:58
↓ 1 callersMethodGetBacktrace
()
ql2/ql2.pb.go:689
↓ 1 callersMethodGetFrames
()
ql2/ql2.pb.go:649
↓ 1 callersMethodGetKey
()
ql2/ql2.pb.go:856
↓ 1 callersMethodGetRArray
()
ql2/ql2.pb.go:753
↓ 1 callersMethodGetRBool
()
ql2/ql2.pb.go:732
↓ 1 callersMethodGetRNum
()
ql2/ql2.pb.go:739
↓ 1 callersMethodGetRObject
()
ql2/ql2.pb.go:760
↓ 1 callersMethodGetRStr
()
ql2/ql2.pb.go:746
↓ 1 callersMethodGetResponse
()
ql2/ql2.pb.go:682
↓ 1 callersMethodGetVal
()
ql2/ql2.pb.go:863
↓ 1 callersMethodGroupedMapReduce
GroupedMapReduce partitions a sequence into groups, then performs a map and a reduction on each group. See also .Map() and .GroupBy(). Example usage
query.go:1002
↓ 1 callersMethodInnerJoin
InnerJoin performs an inner join on two sequences, using the provided function to compare the rows from each sequence. See also .EqJoin() and .OuterJo
query.go:1095
↓ 1 callersMethodLe
Le returns true if the first value is less than or equal to the second. Example usage: r.Expr(2).Lt(2) => true
query.go:557
↓ 1 callersMethodLimit
Limit returns only the first `limit` results from the query. Example usage: var response []int err := r.Expr(1,2,3,4,5).Limit(3).Run(session).One(&r
query.go:702
↓ 1 callersMethodMod
Mod divides two numbers and returns the remainder. Example usage: r.Expr(23).Mod(10) => 3
query.go:485
↓ 1 callersMethodOne
One gets the first result from a query response. Example usage: var result interface{} err := r.Table("villains").Get("Galactus", "name").Run(sessio
rows.go:205
↓ 1 callersMethodOuterJoin
OuterJoin performs a left outer join on two sequences, using the provided function to compare the rows from each sequence. See also .EqJoin() and .Inn
query.go:1155
↓ 1 callersFunctionSetDebug
SetDebug causes all queries sent to the server and responses received to be printed to stdout in raw form. Example usage: r.SetDebug(true)
conn.go:65
↓ 1 callersMethodSlice
Slice returns a section of a sequence, with bounds [lower, upper), where lower bound is inclusive and upper bound is exclusive. Example usage: var r
query.go:688
↓ 1 callersMethodString
()
ql2/ql2.pb.go:37
↓ 1 callersMethodString
()
ql2/ql2.pb.go:76
next →1–100 of 256, ranked by callers