Documentation ¶
Overview ¶
Package ql2 is a generated protocol buffer package.
It is generated from these files:
ql2/ql2.proto
It has these top-level messages:
VersionDummy Query Frame Backtrace Response Datum Term
Index ¶
- Constants
- Variables
- type Backtrace
- type Datum
- func (m *Datum) ExtensionMap() map[int32]proto.Extension
- func (*Datum) ExtensionRangeArray() []proto.ExtensionRange
- func (m *Datum) GetRArray() []*Datum
- func (m *Datum) GetRBool() bool
- func (m *Datum) GetRNum() float64
- func (m *Datum) GetRObject() []*Datum_AssocPair
- func (m *Datum) GetRStr() string
- func (m *Datum) GetType() Datum_DatumType
- func (*Datum) ProtoMessage()
- func (m *Datum) Reset()
- func (m *Datum) String() string
- type Datum_AssocPair
- type Datum_DatumType
- type Frame
- type Frame_FrameType
- type Query
- func (m *Query) GetAcceptsRJson() bool
- func (m *Query) GetGlobalOptargs() []*Query_AssocPair
- func (m *Query) GetOBSOLETENoreply() bool
- func (m *Query) GetQuery() *Term
- func (m *Query) GetToken() int64
- func (m *Query) GetType() Query_QueryType
- func (*Query) ProtoMessage()
- func (m *Query) Reset()
- func (m *Query) String() string
- type Query_AssocPair
- type Query_QueryType
- type Response
- func (m *Response) GetBacktrace() *Backtrace
- func (m *Response) GetErrorType() Response_ErrorType
- func (m *Response) GetNotes() []Response_ResponseNote
- func (m *Response) GetProfile() *Datum
- func (m *Response) GetResponse() []*Datum
- func (m *Response) GetToken() int64
- func (m *Response) GetType() Response_ResponseType
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- type Response_ErrorType
- type Response_ResponseNote
- type Response_ResponseType
- type Term
- func (m *Term) ExtensionMap() map[int32]proto.Extension
- func (*Term) ExtensionRangeArray() []proto.ExtensionRange
- func (m *Term) GetArgs() []*Term
- func (m *Term) GetDatum() *Datum
- func (m *Term) GetOptargs() []*Term_AssocPair
- func (m *Term) GetType() Term_TermType
- func (*Term) ProtoMessage()
- func (m *Term) Reset()
- func (m *Term) String() string
- type Term_AssocPair
- type Term_TermType
- type VersionDummy
- type VersionDummy_Protocol
- type VersionDummy_Version
Constants ¶
const Default_Query_AcceptsRJson bool = false
const Default_Query_OBSOLETENoreply bool = false
Variables ¶
var Datum_DatumType_name = map[int32]string{
1: "R_NULL",
2: "R_BOOL",
3: "R_NUM",
4: "R_STR",
5: "R_ARRAY",
6: "R_OBJECT",
7: "R_JSON",
}
var Datum_DatumType_value = map[string]int32{
"R_NULL": 1,
"R_BOOL": 2,
"R_NUM": 3,
"R_STR": 4,
"R_ARRAY": 5,
"R_OBJECT": 6,
"R_JSON": 7,
}
var Frame_FrameType_name = map[int32]string{
1: "POS",
2: "OPT",
}
var Frame_FrameType_value = map[string]int32{
"POS": 1,
"OPT": 2,
}
var Query_QueryType_name = map[int32]string{
1: "START",
2: "CONTINUE",
3: "STOP",
4: "NOREPLY_WAIT",
}
var Query_QueryType_value = map[string]int32{
"START": 1,
"CONTINUE": 2,
"STOP": 3,
"NOREPLY_WAIT": 4,
}
var Response_ErrorType_name = map[int32]string{
1000000: "INTERNAL",
2000000: "RESOURCE_LIMIT",
3000000: "QUERY_LOGIC",
3100000: "NON_EXISTENCE",
4100000: "OP_FAILED",
4200000: "OP_INDETERMINATE",
5000000: "USER",
}
var Response_ErrorType_value = map[string]int32{
"INTERNAL": 1000000,
"RESOURCE_LIMIT": 2000000,
"QUERY_LOGIC": 3000000,
"NON_EXISTENCE": 3100000,
"OP_FAILED": 4100000,
"OP_INDETERMINATE": 4200000,
"USER": 5000000,
}
var Response_ResponseNote_name = map[int32]string{
1: "SEQUENCE_FEED",
2: "ATOM_FEED",
3: "ORDER_BY_LIMIT_FEED",
4: "UNIONED_FEED",
5: "INCLUDES_STATES",
}
var Response_ResponseNote_value = map[string]int32{
"SEQUENCE_FEED": 1,
"ATOM_FEED": 2,
"ORDER_BY_LIMIT_FEED": 3,
"UNIONED_FEED": 4,
"INCLUDES_STATES": 5,
}
var Response_ResponseType_name = map[int32]string{
1: "SUCCESS_ATOM",
2: "SUCCESS_SEQUENCE",
3: "SUCCESS_PARTIAL",
4: "WAIT_COMPLETE",
16: "CLIENT_ERROR",
17: "COMPILE_ERROR",
18: "RUNTIME_ERROR",
}
var Response_ResponseType_value = map[string]int32{
"SUCCESS_ATOM": 1,
"SUCCESS_SEQUENCE": 2,
"SUCCESS_PARTIAL": 3,
"WAIT_COMPLETE": 4,
"CLIENT_ERROR": 16,
"COMPILE_ERROR": 17,
"RUNTIME_ERROR": 18,
}
var Term_TermType_name = map[int32]string{}/* 175 elements not displayed */
var Term_TermType_value = map[string]int32{}/* 175 elements not displayed */
var VersionDummy_Protocol_name = map[int32]string{
656407617: "PROTOBUF",
2120839367: "JSON",
}
var VersionDummy_Protocol_value = map[string]int32{
"PROTOBUF": 656407617,
"JSON": 2120839367,
}
var VersionDummy_Version_name = map[int32]string{
1063369270: "V0_1",
1915781601: "V0_2",
1601562686: "V0_3",
1074539808: "V0_4",
}
var VersionDummy_Version_value = map[string]int32{
"V0_1": 1063369270,
"V0_2": 1915781601,
"V0_3": 1601562686,
"V0_4": 1074539808,
}
Functions ¶
This section is empty.
Types ¶
type Backtrace ¶
type Backtrace struct { Frames []*Frame `protobuf:"bytes,1,rep,name=frames" json:"frames,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Backtrace) ProtoMessage ¶
func (*Backtrace) ProtoMessage()
type Datum ¶
type Datum struct { Type *Datum_DatumType `protobuf:"varint,1,opt,name=type,enum=Datum_DatumType" json:"type,omitempty"` RBool *bool `protobuf:"varint,2,opt,name=r_bool" json:"r_bool,omitempty"` RNum *float64 `protobuf:"fixed64,3,opt,name=r_num" json:"r_num,omitempty"` RStr *string `protobuf:"bytes,4,opt,name=r_str" json:"r_str,omitempty"` RArray []*Datum `protobuf:"bytes,5,rep,name=r_array" json:"r_array,omitempty"` RObject []*Datum_AssocPair `protobuf:"bytes,6,rep,name=r_object" json:"r_object,omitempty"` XXX_extensions map[int32]proto.Extension `json:"-"` XXX_unrecognized []byte `json:"-"` }
A Datum is a chunk of data that can be serialized to disk or returned to the user in a Response. Currently we only support JSON types, but we may support other types in the future (e.g., a date type or an integer type).
func (*Datum) ExtensionRangeArray ¶
func (*Datum) ExtensionRangeArray() []proto.ExtensionRange
func (*Datum) GetRObject ¶
func (m *Datum) GetRObject() []*Datum_AssocPair
func (*Datum) GetType ¶
func (m *Datum) GetType() Datum_DatumType
func (*Datum) ProtoMessage ¶
func (*Datum) ProtoMessage()
type Datum_AssocPair ¶
type Datum_AssocPair struct { Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Val *Datum `protobuf:"bytes,2,opt,name=val" json:"val,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Datum_AssocPair) GetKey ¶
func (m *Datum_AssocPair) GetKey() string
func (*Datum_AssocPair) GetVal ¶
func (m *Datum_AssocPair) GetVal() *Datum
func (*Datum_AssocPair) ProtoMessage ¶
func (*Datum_AssocPair) ProtoMessage()
func (*Datum_AssocPair) Reset ¶
func (m *Datum_AssocPair) Reset()
func (*Datum_AssocPair) String ¶
func (m *Datum_AssocPair) String() string
type Datum_DatumType ¶
type Datum_DatumType int32
const ( Datum_R_NULL Datum_DatumType = 1 Datum_R_BOOL Datum_DatumType = 2 Datum_R_NUM Datum_DatumType = 3 Datum_R_STR Datum_DatumType = 4 Datum_R_ARRAY Datum_DatumType = 5 Datum_R_OBJECT Datum_DatumType = 6 // This [DatumType] will only be used if [accepts_r_json] is // set to [true] in [Query]. [r_str] will be filled with a // JSON encoding of the [Datum]. Datum_R_JSON Datum_DatumType = 7 )
func (Datum_DatumType) Enum ¶
func (x Datum_DatumType) Enum() *Datum_DatumType
func (Datum_DatumType) MarshalJSON ¶ added in v0.6.0
func (x Datum_DatumType) MarshalJSON() ([]byte, error)
func (Datum_DatumType) String ¶
func (x Datum_DatumType) String() string
func (*Datum_DatumType) UnmarshalJSON ¶
func (x *Datum_DatumType) UnmarshalJSON(data []byte) error
type Frame ¶
type Frame struct { Type *Frame_FrameType `protobuf:"varint,1,opt,name=type,enum=Frame_FrameType" json:"type,omitempty"` Pos *int64 `protobuf:"varint,2,opt,name=pos" json:"pos,omitempty"` Opt *string `protobuf:"bytes,3,opt,name=opt" json:"opt,omitempty"` XXX_unrecognized []byte `json:"-"` }
A backtrace frame (see `backtrace` in Response below)
func (*Frame) GetType ¶
func (m *Frame) GetType() Frame_FrameType
func (*Frame) ProtoMessage ¶
func (*Frame) ProtoMessage()
type Frame_FrameType ¶
type Frame_FrameType int32
const ( Frame_POS Frame_FrameType = 1 Frame_OPT Frame_FrameType = 2 )
func (Frame_FrameType) Enum ¶
func (x Frame_FrameType) Enum() *Frame_FrameType
func (Frame_FrameType) MarshalJSON ¶ added in v0.6.0
func (x Frame_FrameType) MarshalJSON() ([]byte, error)
func (Frame_FrameType) String ¶
func (x Frame_FrameType) String() string
func (*Frame_FrameType) UnmarshalJSON ¶
func (x *Frame_FrameType) UnmarshalJSON(data []byte) error
type Query ¶
type Query struct { Type *Query_QueryType `protobuf:"varint,1,opt,name=type,enum=Query_QueryType" json:"type,omitempty"` // A [Term] is how we represent the operations we want a query to perform. Query *Term `protobuf:"bytes,2,opt,name=query" json:"query,omitempty"` Token *int64 `protobuf:"varint,3,opt,name=token" json:"token,omitempty"` // This flag is ignored on the server. `noreply` should be added // to `global_optargs` instead (the key "noreply" should map to // either true or false). OBSOLETENoreply *bool `protobuf:"varint,4,opt,name=OBSOLETE_noreply,def=0" json:"OBSOLETE_noreply,omitempty"` // If this is set to [true], then [Datum] values will sometimes be // of [DatumType] [R_JSON] (see below). This can provide enormous // speedups in languages with poor protobuf libraries. AcceptsRJson *bool `protobuf:"varint,5,opt,name=accepts_r_json,def=0" json:"accepts_r_json,omitempty"` GlobalOptargs []*Query_AssocPair `protobuf:"bytes,6,rep,name=global_optargs" json:"global_optargs,omitempty"` XXX_unrecognized []byte `json:"-"` }
You send one of:
- A [START] query with a Term to evaluate and a unique-per-connection token.
- A [CONTINUE] query with the same token as a [START] query that returned [SUCCESS_PARTIAL] in its Response.
- A [STOP] query with the same token as a [START] query that you want to stop.
- A [NOREPLY_WAIT] query with a unique per-connection token. The server answers with a [WAIT_COMPLETE] Response.
func (*Query) GetAcceptsRJson ¶
func (*Query) GetGlobalOptargs ¶
func (m *Query) GetGlobalOptargs() []*Query_AssocPair
func (*Query) GetOBSOLETENoreply ¶
func (*Query) GetType ¶
func (m *Query) GetType() Query_QueryType
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
type Query_AssocPair ¶
type Query_AssocPair struct { Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Val *Term `protobuf:"bytes,2,opt,name=val" json:"val,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Query_AssocPair) GetKey ¶
func (m *Query_AssocPair) GetKey() string
func (*Query_AssocPair) GetVal ¶
func (m *Query_AssocPair) GetVal() *Term
func (*Query_AssocPair) ProtoMessage ¶
func (*Query_AssocPair) ProtoMessage()
func (*Query_AssocPair) Reset ¶
func (m *Query_AssocPair) Reset()
func (*Query_AssocPair) String ¶
func (m *Query_AssocPair) String() string
type Query_QueryType ¶
type Query_QueryType int32
const ( Query_START Query_QueryType = 1 Query_CONTINUE Query_QueryType = 2 // (see [Response]). Query_STOP Query_QueryType = 3 Query_NOREPLY_WAIT Query_QueryType = 4 )
func (Query_QueryType) Enum ¶
func (x Query_QueryType) Enum() *Query_QueryType
func (Query_QueryType) MarshalJSON ¶ added in v0.6.0
func (x Query_QueryType) MarshalJSON() ([]byte, error)
func (Query_QueryType) String ¶
func (x Query_QueryType) String() string
func (*Query_QueryType) UnmarshalJSON ¶
func (x *Query_QueryType) UnmarshalJSON(data []byte) error
type Response ¶
type Response struct { Type *Response_ResponseType `protobuf:"varint,1,opt,name=type,enum=Response_ResponseType" json:"type,omitempty"` ErrorType *Response_ErrorType `protobuf:"varint,7,opt,name=error_type,enum=Response_ErrorType" json:"error_type,omitempty"` Notes []Response_ResponseNote `protobuf:"varint,6,rep,name=notes,enum=Response_ResponseNote" json:"notes,omitempty"` Token *int64 `protobuf:"varint,2,opt,name=token" json:"token,omitempty"` // [response] contains 1 RQL datum if [type] is [SUCCESS_ATOM], or many RQL // data if [type] is [SUCCESS_SEQUENCE] or [SUCCESS_PARTIAL]. It contains 1 // error message (of type [R_STR]) in all other cases. Response []*Datum `protobuf:"bytes,3,rep,name=response" json:"response,omitempty"` // If [type] is [CLIENT_ERROR], [TYPE_ERROR], or [RUNTIME_ERROR], then a // backtrace will be provided. The backtrace says where in the query the // error occured. Ideally this information will be presented to the user as // a pretty-printed version of their query with the erroneous section // underlined. A backtrace is a series of 0 or more [Frame]s, each of which // specifies either the index of a positional argument or the name of an // optional argument. (Those words will make more sense if you look at the // [Term] message below.) Backtrace *Backtrace `protobuf:"bytes,4,opt,name=backtrace" json:"backtrace,omitempty"` // If the [global_optargs] in the [Query] that this [Response] is a // response to contains a key "profile" which maps to a static value of // true then [profile] will contain a [Datum] which provides profiling // information about the execution of the query. This field should be // returned to the user along with the result that would normally be // returned (a datum or a cursor). In official drivers this is accomplished // by putting them inside of an object with "value" mapping to the return // value and "profile" mapping to the profile object. Profile *Datum `protobuf:"bytes,5,opt,name=profile" json:"profile,omitempty"` XXX_unrecognized []byte `json:"-"` }
You get back a response with the same [token] as your query.
func (*Response) GetBacktrace ¶
func (*Response) GetErrorType ¶ added in v1.1.0
func (m *Response) GetErrorType() Response_ErrorType
func (*Response) GetNotes ¶ added in v0.7.0
func (m *Response) GetNotes() []Response_ResponseNote
func (*Response) GetProfile ¶
func (*Response) GetResponse ¶
func (*Response) GetType ¶
func (m *Response) GetType() Response_ResponseType
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
type Response_ErrorType ¶ added in v1.1.0
type Response_ErrorType int32
If `ResponseType` is `RUNTIME_ERROR`, this may be filled in with more information about the error.
const ( Response_INTERNAL Response_ErrorType = 1000000 Response_RESOURCE_LIMIT Response_ErrorType = 2000000 Response_QUERY_LOGIC Response_ErrorType = 3000000 Response_NON_EXISTENCE Response_ErrorType = 3100000 Response_OP_FAILED Response_ErrorType = 4100000 Response_OP_INDETERMINATE Response_ErrorType = 4200000 Response_USER Response_ErrorType = 5000000 )
func (Response_ErrorType) Enum ¶ added in v1.1.0
func (x Response_ErrorType) Enum() *Response_ErrorType
func (Response_ErrorType) MarshalJSON ¶ added in v1.1.0
func (x Response_ErrorType) MarshalJSON() ([]byte, error)
func (Response_ErrorType) String ¶ added in v1.1.0
func (x Response_ErrorType) String() string
func (*Response_ErrorType) UnmarshalJSON ¶ added in v1.1.0
func (x *Response_ErrorType) UnmarshalJSON(data []byte) error
type Response_ResponseNote ¶ added in v0.7.0
type Response_ResponseNote int32
ResponseNotes are used to provide information about the query response that may be useful for people writing drivers or ORMs. Currently all the notes we send indicate that a stream has certain special properties.
const ( // The stream is a changefeed stream (e.g. `r.table('test').changes()`). Response_SEQUENCE_FEED Response_ResponseNote = 1 // The stream is a point changefeed stream // (e.g. `r.table('test').get(0).changes()`). Response_ATOM_FEED Response_ResponseNote = 2 // The stream is an order_by_limit changefeed stream // (e.g. `r.table('test').order_by(index: 'id').limit(5).changes()`). Response_ORDER_BY_LIMIT_FEED Response_ResponseNote = 3 // The stream is a union of multiple changefeed types that can't be // collapsed to a single type // (e.g. `r.table('test').changes().union(r.table('test').get(0).changes())`). Response_UNIONED_FEED Response_ResponseNote = 4 // The stream is a changefeed stream and includes notes on what state // the changefeed stream is in (e.g. objects of the form `{state: // 'initializing'}`). Response_INCLUDES_STATES Response_ResponseNote = 5 )
func (Response_ResponseNote) Enum ¶ added in v0.7.0
func (x Response_ResponseNote) Enum() *Response_ResponseNote
func (Response_ResponseNote) MarshalJSON ¶ added in v0.7.0
func (x Response_ResponseNote) MarshalJSON() ([]byte, error)
func (Response_ResponseNote) String ¶ added in v0.7.0
func (x Response_ResponseNote) String() string
func (*Response_ResponseNote) UnmarshalJSON ¶ added in v0.7.0
func (x *Response_ResponseNote) UnmarshalJSON(data []byte) error
type Response_ResponseType ¶
type Response_ResponseType int32
const ( // These response types indicate success. Response_SUCCESS_ATOM Response_ResponseType = 1 Response_SUCCESS_SEQUENCE Response_ResponseType = 2 Response_SUCCESS_PARTIAL Response_ResponseType = 3 // datatypes. If you send a [CONTINUE] query with // the same token as this response, you will get // more of the sequence. Keep sending [CONTINUE] // queries until you get back [SUCCESS_SEQUENCE]. Response_WAIT_COMPLETE Response_ResponseType = 4 // These response types indicate failure. Response_CLIENT_ERROR Response_ResponseType = 16 // client sends a malformed protobuf, or tries to // send [CONTINUE] for an unknown token. Response_COMPILE_ERROR Response_ResponseType = 17 // checking. For example, if you pass too many // arguments to a function. Response_RUNTIME_ERROR Response_ResponseType = 18 )
func (Response_ResponseType) Enum ¶
func (x Response_ResponseType) Enum() *Response_ResponseType
func (Response_ResponseType) MarshalJSON ¶ added in v0.6.0
func (x Response_ResponseType) MarshalJSON() ([]byte, error)
func (Response_ResponseType) String ¶
func (x Response_ResponseType) String() string
func (*Response_ResponseType) UnmarshalJSON ¶
func (x *Response_ResponseType) UnmarshalJSON(data []byte) error
type Term ¶
type Term struct { Type *Term_TermType `protobuf:"varint,1,opt,name=type,enum=Term_TermType" json:"type,omitempty"` // This is only used when type is DATUM. Datum *Datum `protobuf:"bytes,2,opt,name=datum" json:"datum,omitempty"` Args []*Term `protobuf:"bytes,3,rep,name=args" json:"args,omitempty"` Optargs []*Term_AssocPair `protobuf:"bytes,4,rep,name=optargs" json:"optargs,omitempty"` XXX_extensions map[int32]proto.Extension `json:"-"` XXX_unrecognized []byte `json:"-"` }
A Term is either a piece of data (see **Datum** above), or an operator and its operands. If you have a Datum, it's stored in the member [datum]. If you have an operator, its positional arguments are stored in [args] and its optional arguments are stored in [optargs].
A note about type signatures: We use the following notation to denote types:
arg1_type, arg2_type, argrest_type... -> result_type
So, for example, if we have a function `avg` that takes any number of arguments and averages them, we might write:
NUMBER... -> NUMBER
Or if we had a function that took one number modulo another:
NUMBER, NUMBER -> NUMBER
Or a function that takes a table and a primary key of any Datum type, then retrieves the entry with that primary key:
Table, DATUM -> OBJECT
Some arguments must be provided as literal values (and not the results of sub terms). These are marked with a `!`. Optional arguments are specified within curly braces as argname `:` value type (e.x `{noreply:BOOL}`) Many RQL operations are polymorphic. For these, alterantive type signatures are separated by `|`.
The RQL type hierarchy is as follows:
Top DATUM NULL BOOL NUMBER STRING OBJECT SingleSelection ARRAY Sequence ARRAY Stream StreamSelection Table Database Function Ordering - used only by ORDER_BY Pathspec -- an object, string, or array that specifies a path Error
func (*Term) ExtensionRangeArray ¶
func (*Term) ExtensionRangeArray() []proto.ExtensionRange
func (*Term) GetOptargs ¶
func (m *Term) GetOptargs() []*Term_AssocPair
func (*Term) GetType ¶
func (m *Term) GetType() Term_TermType
func (*Term) ProtoMessage ¶
func (*Term) ProtoMessage()
type Term_AssocPair ¶
type Term_AssocPair struct { Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Val *Term `protobuf:"bytes,2,opt,name=val" json:"val,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Term_AssocPair) GetKey ¶
func (m *Term_AssocPair) GetKey() string
func (*Term_AssocPair) GetVal ¶
func (m *Term_AssocPair) GetVal() *Term
func (*Term_AssocPair) ProtoMessage ¶
func (*Term_AssocPair) ProtoMessage()
func (*Term_AssocPair) Reset ¶
func (m *Term_AssocPair) Reset()
func (*Term_AssocPair) String ¶
func (m *Term_AssocPair) String() string
type Term_TermType ¶
type Term_TermType int32
const ( // A RQL datum, stored in `datum` below. Term_DATUM Term_TermType = 1 Term_MAKE_ARRAY Term_TermType = 2 // Evaluate the terms in [optargs] and make an object Term_MAKE_OBJ Term_TermType = 3 // Takes an integer representing a variable and returns the value stored // in that variable. It's the responsibility of the client to translate // from their local representation of a variable to a unique _non-negative_ // integer for that variable. (We do it this way instead of letting // clients provide variable names as strings to discourage // variable-capturing client libraries, and because it's more efficient // on the wire.) Term_VAR Term_TermType = 10 // Takes some javascript code and executes it. Term_JAVASCRIPT Term_TermType = 11 // STRING {timeout: !NUMBER} -> Function(*) Term_UUID Term_TermType = 169 // Takes an HTTP URL and gets it. If the get succeeds and // returns valid JSON, it is converted into a DATUM Term_HTTP Term_TermType = 153 // Takes a string and throws an error with that message. // Inside of a `default` block, you can omit the first // argument to rethrow whatever error you catch (this is most // useful as an argument to the `default` filter optarg). Term_ERROR Term_TermType = 12 // Takes nothing and returns a reference to the implicit variable. Term_IMPLICIT_VAR Term_TermType = 13 // * Data Operators // Returns a reference to a database. Term_DB Term_TermType = 14 // Returns a reference to a table. Term_TABLE Term_TermType = 15 // STRING, {read_mode:STRING, identifier_format:STRING} -> Table // Gets a single element from a table by its primary or a secondary key. Term_GET Term_TermType = 16 // Table, STRING -> NULL | Table, NUMBER -> NULL | Term_GET_ALL Term_TermType = 78 // Simple DATUM Ops Term_EQ Term_TermType = 17 Term_NE Term_TermType = 18 Term_LT Term_TermType = 19 Term_LE Term_TermType = 20 Term_GT Term_TermType = 21 Term_GE Term_TermType = 22 Term_NOT Term_TermType = 23 // ADD can either add two numbers or concatenate two arrays. Term_ADD Term_TermType = 24 Term_SUB Term_TermType = 25 Term_MUL Term_TermType = 26 Term_DIV Term_TermType = 27 Term_MOD Term_TermType = 28 Term_FLOOR Term_TermType = 183 Term_CEIL Term_TermType = 184 Term_ROUND Term_TermType = 185 // DATUM Array Ops // Append a single element to the end of an array (like `snoc`). Term_APPEND Term_TermType = 29 // Prepend a single element to the end of an array (like `cons`). Term_PREPEND Term_TermType = 80 // Remove the elements of one array from another array. Term_DIFFERENCE Term_TermType = 95 // DATUM Set Ops // Set ops work on arrays. They don't use actual sets and thus have // performance characteristics you would expect from arrays rather than // from sets. All set operations have the post condition that they // array they return contains no duplicate values. Term_SET_INSERT Term_TermType = 88 Term_SET_INTERSECTION Term_TermType = 89 Term_SET_UNION Term_TermType = 90 Term_SET_DIFFERENCE Term_TermType = 91 Term_SLICE Term_TermType = 30 Term_SKIP Term_TermType = 70 Term_LIMIT Term_TermType = 71 Term_OFFSETS_OF Term_TermType = 87 Term_CONTAINS Term_TermType = 93 // Stream/Object Ops // Get a particular field from an object, or map that over a // sequence. Term_GET_FIELD Term_TermType = 31 // | Sequence, STRING -> Sequence // Return an array containing the keys of the object. Term_KEYS Term_TermType = 94 // Creates an object Term_OBJECT Term_TermType = 143 // Check whether an object contains all the specified fields, // or filters a sequence so that all objects inside of it // contain all the specified fields. Term_HAS_FIELDS Term_TermType = 32 // x.with_fields(...) <=> x.has_fields(...).pluck(...) Term_WITH_FIELDS Term_TermType = 96 // Get a subset of an object by selecting some attributes to preserve, // or map that over a sequence. (Both pick and pluck, polymorphic.) Term_PLUCK Term_TermType = 33 // Get a subset of an object by selecting some attributes to discard, or // map that over a sequence. (Both unpick and without, polymorphic.) Term_WITHOUT Term_TermType = 34 // Merge objects (right-preferential) Term_MERGE Term_TermType = 35 // Sequence Ops // Get all elements of a sequence between two values. // Half-open by default, but the openness of either side can be // changed by passing 'closed' or 'open for `right_bound` or // `left_bound`. Term_BETWEEN_DEPRECATED Term_TermType = 36 // With the newer version, clients should use `r.minval` and `r.maxval` for unboundedness Term_BETWEEN Term_TermType = 182 Term_REDUCE Term_TermType = 37 Term_MAP Term_TermType = 38 // Filter a sequence with either a function or a shortcut // object (see API docs for details). The body of FILTER is // wrapped in an implicit `.default(false)`, and you can // change the default value by specifying the `default` // optarg. If you make the default `r.error`, all errors // caught by `default` will be rethrown as if the `default` // did not exist. Term_FILTER Term_TermType = 39 // Sequence, OBJECT, {default:DATUM} -> Sequence // Map a function over a sequence and then concatenate the results together. Term_CONCAT_MAP Term_TermType = 40 // Order a sequence based on one or more attributes. Term_ORDER_BY Term_TermType = 41 // Get all distinct elements of a sequence (like `uniq`). Term_DISTINCT Term_TermType = 42 // Count the number of elements in a sequence, or only the elements that match // a given filter. Term_COUNT Term_TermType = 43 Term_IS_EMPTY Term_TermType = 86 // Take the union of multiple sequences (preserves duplicate elements! (use distinct)). Term_UNION Term_TermType = 44 // Get the Nth element of a sequence. Term_NTH Term_TermType = 45 // do NTH or GET_FIELD depending on target object Term_BRACKET Term_TermType = 170 Term_INNER_JOIN Term_TermType = 48 Term_OUTER_JOIN Term_TermType = 49 // An inner-join that does an equality comparison on two attributes. Term_EQ_JOIN Term_TermType = 50 Term_ZIP Term_TermType = 72 Term_RANGE Term_TermType = 173 // Array Ops // Insert an element in to an array at a given index. Term_INSERT_AT Term_TermType = 82 // Remove an element at a given index from an array. Term_DELETE_AT Term_TermType = 83 // ARRAY, NUMBER, NUMBER -> ARRAY // Change the element at a given index of an array. Term_CHANGE_AT Term_TermType = 84 // Splice one array in to another array. Term_SPLICE_AT Term_TermType = 85 // * Type Ops // Coerces a datum to a named type (e.g. "bool"). // If you previously used `stream_to_array`, you should use this instead // with the type "array". Term_COERCE_TO Term_TermType = 51 // Returns the named type of a datum (e.g. TYPE_OF(true) = "BOOL") Term_TYPE_OF Term_TermType = 52 // * Write Ops (the OBJECTs contain data about number of errors etc.) // Updates all the rows in a selection. Calls its Function with the row // to be updated, and then merges the result of that call. Term_UPDATE Term_TermType = 53 // SingleSelection, Function(1), {non_atomic:BOOL, durability:STRING, return_changes:BOOL} -> OBJECT | // StreamSelection, OBJECT, {non_atomic:BOOL, durability:STRING, return_changes:BOOL} -> OBJECT | // SingleSelection, OBJECT, {non_atomic:BOOL, durability:STRING, return_changes:BOOL} -> OBJECT // Deletes all the rows in a selection. Term_DELETE Term_TermType = 54 // Replaces all the rows in a selection. Calls its Function with the row // to be replaced, and then discards it and stores the result of that // call. Term_REPLACE Term_TermType = 55 // Inserts into a table. If `conflict` is replace, overwrites // entries with the same primary key. If `conflict` is // update, does an update on the entry. If `conflict` is // error, or is omitted, conflicts will trigger an error. Term_INSERT Term_TermType = 56 // * Administrative OPs // Creates a database with a particular name. Term_DB_CREATE Term_TermType = 57 // Drops a database with a particular name. Term_DB_DROP Term_TermType = 58 // Lists all the databases by name. (Takes no arguments) Term_DB_LIST Term_TermType = 59 // Creates a table with a particular name in a particular // database. (You may omit the first argument to use the // default database.) Term_TABLE_CREATE Term_TermType = 60 // Database, STRING, {primary_key:STRING, shards:NUMBER, replicas:OBJECT, primary_replica_tag:STRING} -> OBJECT // STRING, {primary_key:STRING, shards:NUMBER, replicas:NUMBER, primary_replica_tag:STRING} -> OBJECT // STRING, {primary_key:STRING, shards:NUMBER, replicas:OBJECT, primary_replica_tag:STRING} -> OBJECT // Drops a table with a particular name from a particular // database. (You may omit the first argument to use the // default database.) Term_TABLE_DROP Term_TermType = 61 // STRING -> OBJECT // Lists all the tables in a particular database. (You may // omit the first argument to use the default database.) Term_TABLE_LIST Term_TermType = 62 // -> ARRAY // Returns the row in the `rethinkdb.table_config` or `rethinkdb.db_config` table // that corresponds to the given database or table. Term_CONFIG Term_TermType = 174 // Table -> SingleSelection // Returns the row in the `rethinkdb.table_status` table that corresponds to the // given table. Term_STATUS Term_TermType = 175 // Called on a table, waits for that table to be ready for read/write operations. // Called on a database, waits for all of the tables in the database to be ready. // Returns the corresponding row or rows from the `rethinkdb.table_status` table. Term_WAIT Term_TermType = 177 // Database -> OBJECT // Generates a new config for the given table, or all tables in the given database // The `shards` and `replicas` arguments are required. If `emergency_repair` is // specified, it will enter a completely different mode of repairing a table // which has lost half or more of its replicas. Term_RECONFIGURE Term_TermType = 176 // dry_run:BOOLEAN] // } -> OBJECT // Database|Table, {shards:NUMBER, replicas:OBJECT [, // primary_replica_tag:STRING, // nonvoting_replica_tags:ARRAY, // dry_run:BOOLEAN] // } -> OBJECT // Table, {emergency_repair:STRING, dry_run:BOOLEAN} -> OBJECT // Balances the table's shards but leaves everything else the same. Can also be // applied to an entire database at once. Term_REBALANCE Term_TermType = 179 // Ensures that previously issued soft-durability writes are complete and // written to disk. Term_SYNC Term_TermType = 138 // * Secondary indexes OPs // Creates a new secondary index with a particular name and definition. Term_INDEX_CREATE Term_TermType = 75 // Drops a secondary index with a particular name from the specified table. Term_INDEX_DROP Term_TermType = 76 // Lists all secondary indexes on a particular table. Term_INDEX_LIST Term_TermType = 77 // Gets information about whether or not a set of indexes are ready to // be accessed. Returns a list of objects that look like this: // {index:STRING, ready:BOOL[, blocks_processed:NUMBER, blocks_total:NUMBER]} Term_INDEX_STATUS Term_TermType = 139 // Blocks until a set of indexes are ready to be accessed. Returns the // same values INDEX_STATUS. Term_INDEX_WAIT Term_TermType = 140 // Renames the given index to a new name Term_INDEX_RENAME Term_TermType = 156 // * Control Operators // Calls a function on data Term_FUNCALL Term_TermType = 64 // Executes its first argument, and returns its second argument if it // got [true] or its third argument if it got [false] (like an `if` // statement). Term_BRANCH Term_TermType = 65 // Returns true if any of its arguments returns true (short-circuits). Term_OR Term_TermType = 66 // Returns true if all of its arguments return true (short-circuits). Term_AND Term_TermType = 67 // Calls its Function with each entry in the sequence // and executes the array of terms that Function returns. Term_FOR_EACH Term_TermType = 68 // An anonymous function. Takes an array of numbers representing // variables (see [VAR] above), and a [Term] to execute with those in // scope. Returns a function that may be passed an array of arguments, // then executes the Term with those bound to the variable names. The // user will never construct this directly. We use it internally for // things like `map` which take a function. The "arity" of a [Function] is // the number of arguments it takes. // For example, here's what `_X_.map{|x| x+2}` turns into: // Term { // type = MAP; // args = [_X_, // Term { // type = Function; // args = [Term { // type = DATUM; // datum = Datum { // type = R_ARRAY; // r_array = [Datum { type = R_NUM; r_num = 1; }]; // }; // }, // Term { // type = ADD; // args = [Term { // type = VAR; // args = [Term { // type = DATUM; // datum = Datum { type = R_NUM; // r_num = 1}; // }]; // }, // Term { // type = DATUM; // datum = Datum { type = R_NUM; r_num = 2; }; // }]; // }]; // }]; Term_FUNC Term_TermType = 69 // Indicates to ORDER_BY that this attribute is to be sorted in ascending order. Term_ASC Term_TermType = 73 // Indicates to ORDER_BY that this attribute is to be sorted in descending order. Term_DESC Term_TermType = 74 // Gets info about anything. INFO is most commonly called on tables. Term_INFO Term_TermType = 79 // `a.match(b)` returns a match object if the string `a` // matches the regular expression `b`. Term_MATCH Term_TermType = 97 // Change the case of a string. Term_UPCASE Term_TermType = 141 Term_DOWNCASE Term_TermType = 142 // Select a number of elements from sequence with uniform distribution. Term_SAMPLE Term_TermType = 81 // Evaluates its first argument. If that argument returns // NULL or throws an error related to the absence of an // expected value (for instance, accessing a non-existent // field or adding NULL to an integer), DEFAULT will either // return its second argument or execute it if it's a // function. If the second argument is a function, it will be // passed either the text of the error or NULL as its // argument. Term_DEFAULT Term_TermType = 92 // Parses its first argument as a json string and returns it as a // datum. Term_JSON Term_TermType = 98 // Returns the datum as a JSON string. // N.B.: we would really prefer this be named TO_JSON and that exists as // an alias in Python and JavaScript drivers; however it conflicts with the // standard `to_json` method defined by Ruby's standard json library. Term_TO_JSON_STRING Term_TermType = 172 // Parses its first arguments as an ISO 8601 time and returns it as a // datum. Term_ISO8601 Term_TermType = 99 // Prints a time as an ISO 8601 time. Term_TO_ISO8601 Term_TermType = 100 // Returns a time given seconds since epoch in UTC. Term_EPOCH_TIME Term_TermType = 101 // Returns seconds since epoch in UTC given a time. Term_TO_EPOCH_TIME Term_TermType = 102 // The time the query was received by the server. Term_NOW Term_TermType = 103 // Puts a time into an ISO 8601 timezone. Term_IN_TIMEZONE Term_TermType = 104 // a.during(b, c) returns whether a is in the range [b, c) Term_DURING Term_TermType = 105 // Retrieves the date portion of a time. Term_DATE Term_TermType = 106 // x.time_of_day == x.date - x Term_TIME_OF_DAY Term_TermType = 126 // Returns the timezone of a time. Term_TIMEZONE Term_TermType = 127 // These access the various components of a time. Term_YEAR Term_TermType = 128 Term_MONTH Term_TermType = 129 Term_DAY Term_TermType = 130 Term_DAY_OF_WEEK Term_TermType = 131 Term_DAY_OF_YEAR Term_TermType = 132 Term_HOURS Term_TermType = 133 Term_MINUTES Term_TermType = 134 Term_SECONDS Term_TermType = 135 // Construct a time from a date and optional timezone or a // date+time and optional timezone. Term_TIME Term_TermType = 136 // Constants for ISO 8601 days of the week. Term_MONDAY Term_TermType = 107 Term_TUESDAY Term_TermType = 108 Term_WEDNESDAY Term_TermType = 109 Term_THURSDAY Term_TermType = 110 Term_FRIDAY Term_TermType = 111 Term_SATURDAY Term_TermType = 112 Term_SUNDAY Term_TermType = 113 // Constants for ISO 8601 months. Term_JANUARY Term_TermType = 114 Term_FEBRUARY Term_TermType = 115 Term_MARCH Term_TermType = 116 Term_APRIL Term_TermType = 117 Term_MAY Term_TermType = 118 Term_JUNE Term_TermType = 119 Term_JULY Term_TermType = 120 Term_AUGUST Term_TermType = 121 Term_SEPTEMBER Term_TermType = 122 Term_OCTOBER Term_TermType = 123 Term_NOVEMBER Term_TermType = 124 Term_DECEMBER Term_TermType = 125 // Indicates to MERGE to replace, or remove in case of an empty literal, the // other object rather than merge it. Term_LITERAL Term_TermType = 137 // SEQUENCE, STRING -> GROUPED_SEQUENCE | SEQUENCE, FUNCTION -> GROUPED_SEQUENCE Term_GROUP Term_TermType = 144 Term_SUM Term_TermType = 145 Term_AVG Term_TermType = 146 Term_MIN Term_TermType = 147 Term_MAX Term_TermType = 148 // `str.split()` splits on whitespace // `str.split(" ")` splits on spaces only // `str.split(" ", 5)` splits on spaces with at most 5 results // `str.split(nil, 5)` splits on whitespace with at most 5 results Term_SPLIT Term_TermType = 149 Term_UNGROUP Term_TermType = 150 // Takes a range of numbers and returns a random number within the range Term_RANDOM Term_TermType = 151 Term_CHANGES Term_TermType = 152 Term_ARGS Term_TermType = 154 // BINARY is client-only at the moment, it is not supported on the server Term_BINARY Term_TermType = 155 Term_GEOJSON Term_TermType = 157 Term_TO_GEOJSON Term_TermType = 158 Term_POINT Term_TermType = 159 Term_LINE Term_TermType = 160 Term_POLYGON Term_TermType = 161 Term_DISTANCE Term_TermType = 162 Term_INTERSECTS Term_TermType = 163 Term_INCLUDES Term_TermType = 164 Term_CIRCLE Term_TermType = 165 Term_GET_INTERSECTING Term_TermType = 166 Term_FILL Term_TermType = 167 Term_GET_NEAREST Term_TermType = 168 Term_POLYGON_SUB Term_TermType = 171 // Constants for specifying key ranges Term_MINVAL Term_TermType = 180 Term_MAXVAL Term_TermType = 181 )
func (Term_TermType) Enum ¶
func (x Term_TermType) Enum() *Term_TermType
func (Term_TermType) MarshalJSON ¶ added in v0.6.0
func (x Term_TermType) MarshalJSON() ([]byte, error)
func (Term_TermType) String ¶
func (x Term_TermType) String() string
func (*Term_TermType) UnmarshalJSON ¶
func (x *Term_TermType) UnmarshalJSON(data []byte) error
type VersionDummy ¶
type VersionDummy struct {
XXX_unrecognized []byte `json:"-"`
}
func (*VersionDummy) ProtoMessage ¶
func (*VersionDummy) ProtoMessage()
func (*VersionDummy) Reset ¶
func (m *VersionDummy) Reset()
func (*VersionDummy) String ¶
func (m *VersionDummy) String() string
type VersionDummy_Protocol ¶
type VersionDummy_Protocol int32
The protocol to use after the handshake, specified in V0_3
const ( VersionDummy_PROTOBUF VersionDummy_Protocol = 656407617 VersionDummy_JSON VersionDummy_Protocol = 2120839367 )
func (VersionDummy_Protocol) Enum ¶
func (x VersionDummy_Protocol) Enum() *VersionDummy_Protocol
func (VersionDummy_Protocol) MarshalJSON ¶ added in v0.6.0
func (x VersionDummy_Protocol) MarshalJSON() ([]byte, error)
func (VersionDummy_Protocol) String ¶
func (x VersionDummy_Protocol) String() string
func (*VersionDummy_Protocol) UnmarshalJSON ¶
func (x *VersionDummy_Protocol) UnmarshalJSON(data []byte) error
type VersionDummy_Version ¶
type VersionDummy_Version int32
non-conforming protobuf libraries This enum contains the magic numbers for your version. See **THE HIGH-LEVEL VIEW** for what to do with it.
const ( VersionDummy_V0_1 VersionDummy_Version = 1063369270 VersionDummy_V0_2 VersionDummy_Version = 1915781601 VersionDummy_V0_3 VersionDummy_Version = 1601562686 VersionDummy_V0_4 VersionDummy_Version = 1074539808 )
func (VersionDummy_Version) Enum ¶
func (x VersionDummy_Version) Enum() *VersionDummy_Version
func (VersionDummy_Version) MarshalJSON ¶ added in v0.6.0
func (x VersionDummy_Version) MarshalJSON() ([]byte, error)
func (VersionDummy_Version) String ¶
func (x VersionDummy_Version) String() string
func (*VersionDummy_Version) UnmarshalJSON ¶
func (x *VersionDummy_Version) UnmarshalJSON(data []byte) error