Skip to content

Commit

Permalink
Merge 363f0af into 8e4850d
Browse files Browse the repository at this point in the history
  • Loading branch information
njlg committed Sep 21, 2015
2 parents 8e4850d + 363f0af commit a2cb7af
Show file tree
Hide file tree
Showing 25 changed files with 1,174 additions and 204 deletions.
7 changes: 7 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
0.11 2015-09-17
- RethinkDB 2.1.0-1 compatibility
- Geospatial functionality
- `index_create` now takes all possible parameters
- Deprecating `attr` in favor of `bracket`
- Cleaning & formatting

0.10 2015-07-28
- 2.0.4 compatibility
- Cleaning & formatting
Expand Down
50 changes: 37 additions & 13 deletions external/ql2.proto
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,19 @@ message Response {
}
optional ResponseType type = 1;

// If `ResponseType` is `RUNTIME_ERROR`, this may be filled in with more
// information about the error.
enum ErrorType {
INTERNAL = 1000000;
RESOURCE_LIMIT = 2000000;
QUERY_LOGIC = 3000000;
NON_EXISTENCE = 3100000;
OP_FAILED = 4100000;
OP_INDETERMINATE = 4200000;
USER = 5000000;
}
optional ErrorType error_type = 7;

// 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
Expand Down Expand Up @@ -237,7 +250,7 @@ message Datum {
// 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 `{use_outdated:BOOL}`)
// type (e.x `{noreply:BOOL}`)
// Many RQL operations are polymorphic. For these, alterantive type signatures
// are separated by `|`.
//
Expand Down Expand Up @@ -313,8 +326,8 @@ message Term {
// Returns a reference to a database.
DB = 14; // STRING -> Database
// Returns a reference to a table.
TABLE = 15; // Database, STRING, {use_outdated:BOOL, identifier_format:STRING} -> Table
// STRING, {use_outdated:BOOL, identifier_format:STRING} -> Table
TABLE = 15; // Database, STRING, {read_mode:STRING, identifier_format:STRING} -> Table
// STRING, {read_mode:STRING, identifier_format:STRING} -> Table
// Gets a single element from a table by its primary or a secondary key.
GET = 16; // Table, STRING -> SingleSelection | Table, NUMBER -> SingleSelection |
// Table, STRING -> NULL | Table, NUMBER -> NULL |
Expand All @@ -335,6 +348,10 @@ message Term {
DIV = 27; // NUMBER... -> NUMBER
MOD = 28; // NUMBER, NUMBER -> NUMBER

FLOOR = 183; // NUMBER -> NUMBER
CEIL = 184; // NUMBER -> NUMBER
ROUND = 185; // NUMBER -> NUMBER

// DATUM Array Ops
// Append a single element to the end of an array (like `snoc`).
APPEND = 29; // ARRAY, DATUM -> ARRAY
Expand All @@ -357,7 +374,7 @@ message Term {
SKIP = 70; // Sequence, NUMBER -> Sequence
LIMIT = 71; // Sequence, NUMBER -> Sequence
OFFSETS_OF = 87; // Sequence, DATUM -> Sequence | Sequence, Function(1) -> Sequence
CONTAINS = 93; // Sequence, DATUM -> BOOL | Sequence, Function(1) -> BOOL
CONTAINS = 93; // Sequence, (DATUM | Function(1))... -> BOOL

// Stream/Object Ops
// Get a particular field from an object, or map that over a
Expand Down Expand Up @@ -408,7 +425,7 @@ message Term {
// Map a function over a sequence and then concatenate the results together.
CONCAT_MAP = 40; // Sequence, Function(1) -> Sequence
// Order a sequence based on one or more attributes.
ORDER_BY = 41; // Sequence, (!STRING | Ordering)... -> Sequence
ORDER_BY = 41; // Sequence, (!STRING | Ordering)..., {index: (!STRING | Ordering)} -> Sequence
// Get all distinct elements of a sequence (like `uniq`).
DISTINCT = 42; // Sequence -> Sequence
// Count the number of elements in a sequence, or only the elements that match
Expand Down Expand Up @@ -507,11 +524,18 @@ message Term {
WAIT = 177; // Table -> OBJECT
// Database -> OBJECT
// Generates a new config for the given table, or all tables in the given database
// The `shards` and `replicas` arguments are required
RECONFIGURE = 176; // Database, {shards:NUMBER, replicas:NUMBER[, primary_replica_tag:STRING, dry_run:BOOLEAN]} -> OBJECT
// Database, {shards:NUMBER, replicas:OBJECT[, primary_replica_tag:STRING, dry_run:BOOLEAN]} -> OBJECT
// Table, {shards:NUMBER, replicas:NUMBER[, primary_replica_tag:STRING, dry_run:BOOLEAN]} -> OBJECT
// Table, {shards:NUMBER, replicas:OBJECT[, primary_replica_tag:STRING, dry_run:BOOLEAN]} -> OBJECT
// 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.
RECONFIGURE = 176; // Database|Table, {shards:NUMBER, replicas:NUMBER [,
// 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.
REBALANCE = 179; // Table -> OBJECT
Expand Down Expand Up @@ -763,7 +787,7 @@ message Term {
// EXAMPLE //
////////////////////////////////////////////////////////////////////////////////
// ```ruby
// r.table('tbl', {:use_outdated => true}).insert([{:id => 0}, {:id => 1}])
// r.table('tbl', {:read_mode => 'outdated'}).insert([{:id => 0}, {:id => 1}])
// ```
// Would turn into:
// Term {
Expand All @@ -774,10 +798,10 @@ message Term {
// type = DATUM;
// datum = Datum { type = R_STR; r_str = "tbl"; };
// }];
// optargs = [["use_outdated",
// optargs = [["read_mode",
// Term {
// type = DATUM;
// datum = Datum { type = R_BOOL; r_bool = true; };
// datum = Datum { type = R_STR; r_bool = "outdated"; };
// }]];
// },
// Term {
Expand Down
Loading

0 comments on commit a2cb7af

Please sign in to comment.