rethinkdb 1.14.0.1 → 1.15.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/func.rb +8 -7
- data/lib/net.rb +4 -3
- data/lib/ql2.pb.rb +15 -0
- data/lib/rpp.rb +12 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96b7e6356ef15d865bb29f59a0c84b164cbfa2ea
|
4
|
+
data.tar.gz: 709661d9216eb7483aa08b99439b7d23e8f7cd68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1b85c8b33bbe60a95b14c2f8f1a33b78e732da55065db74c860f3fd724033c799f064ad4245b4a7b866b8193c2550d4f0f46277477f3baabd422251b8adc17a
|
7
|
+
data.tar.gz: fbd57d77ef74bb44651176827a42f5415bc7747303202980de56123eb77d2f041fd26161fd86a0215cbac0ab6b550d2729928effd03364ab39fa7db7f0b7003a
|
data/lib/func.rb
CHANGED
@@ -38,7 +38,11 @@ module RethinkDB
|
|
38
38
|
:index_rename => -1,
|
39
39
|
:random => -1,
|
40
40
|
:http => 1,
|
41
|
-
:distinct => -1
|
41
|
+
:distinct => -1,
|
42
|
+
:distance => -1,
|
43
|
+
:circle => -1,
|
44
|
+
:get_intersecting => -1,
|
45
|
+
:get_nearest => -1
|
42
46
|
}
|
43
47
|
@@method_aliases = {
|
44
48
|
:lt => :<,
|
@@ -121,15 +125,12 @@ module RethinkDB
|
|
121
125
|
def -@; RQL.new.sub(0, self); end
|
122
126
|
|
123
127
|
def [](ind)
|
124
|
-
if ind.class ==
|
125
|
-
return nth(ind)
|
126
|
-
elsif ind.class == Symbol || ind.class == String
|
127
|
-
return get_field(ind)
|
128
|
-
elsif ind.class == Range
|
128
|
+
if ind.class == Range
|
129
129
|
return slice(ind.begin, ind.end, :right_bound =>
|
130
130
|
(ind.exclude_end? ? 'open' : 'closed'))
|
131
|
+
else
|
132
|
+
return bracket(ind)
|
131
133
|
end
|
132
|
-
raise ArgumentError, "[] cannot handle #{ind.inspect} of type #{ind.class}."
|
133
134
|
end
|
134
135
|
|
135
136
|
def ==(rhs)
|
data/lib/net.rb
CHANGED
@@ -124,11 +124,11 @@ module RethinkDB
|
|
124
124
|
opts = {:host => opts} if opts.class == String
|
125
125
|
@host = opts[:host] || "localhost"
|
126
126
|
@port = opts[:port] || 28015
|
127
|
-
default_db = opts[:db]
|
127
|
+
@default_db = opts[:db]
|
128
128
|
@auth_key = opts[:auth_key] || ""
|
129
129
|
|
130
130
|
@@last = self
|
131
|
-
@default_opts = default_db ? {:db => RQL.new.db(default_db)} : {}
|
131
|
+
@default_opts = @default_db ? {:db => RQL.new.db(@default_db)} : {}
|
132
132
|
@conn_id = 0
|
133
133
|
|
134
134
|
@token_cnt = 0
|
@@ -136,7 +136,7 @@ module RethinkDB
|
|
136
136
|
|
137
137
|
reconnect(:noreply_wait => false)
|
138
138
|
end
|
139
|
-
attr_reader :default_db, :conn_id
|
139
|
+
attr_reader :host, :port, :default_db, :conn_id
|
140
140
|
|
141
141
|
def new_token
|
142
142
|
@token_cnt_mutex.synchronize{@token_cnt += 1}
|
@@ -232,6 +232,7 @@ module RethinkDB
|
|
232
232
|
|
233
233
|
# Change the default database of a connection.
|
234
234
|
def use(new_default_db)
|
235
|
+
@default_db = new_default_db
|
235
236
|
@default_opts[:db] = RQL.new.db(new_default_db)
|
236
237
|
end
|
237
238
|
|
data/lib/ql2.pb.rb
CHANGED
@@ -72,6 +72,7 @@ module RethinkDB
|
|
72
72
|
MAKE_OBJ = 3
|
73
73
|
VAR = 10
|
74
74
|
JAVASCRIPT = 11
|
75
|
+
UUID = 169
|
75
76
|
HTTP = 153
|
76
77
|
ERROR = 12
|
77
78
|
IMPLICIT_VAR = 13
|
@@ -122,6 +123,7 @@ module RethinkDB
|
|
122
123
|
IS_EMPTY = 86
|
123
124
|
UNION = 44
|
124
125
|
NTH = 45
|
126
|
+
BRACKET = 170
|
125
127
|
INNER_JOIN = 48
|
126
128
|
OUTER_JOIN = 49
|
127
129
|
EQ_JOIN = 50
|
@@ -214,6 +216,19 @@ module RethinkDB
|
|
214
216
|
CHANGES = 152
|
215
217
|
ARGS = 154
|
216
218
|
BINARY = 155
|
219
|
+
GEOJSON = 157
|
220
|
+
TO_GEOJSON = 158
|
221
|
+
POINT = 159
|
222
|
+
LINE = 160
|
223
|
+
POLYGON = 161
|
224
|
+
DISTANCE = 162
|
225
|
+
INTERSECTS = 163
|
226
|
+
INCLUDES = 164
|
227
|
+
CIRCLE = 165
|
228
|
+
GET_INTERSECTING = 166
|
229
|
+
FILL = 167
|
230
|
+
GET_NEAREST = 168
|
231
|
+
POLYGON_SUB = 171
|
217
232
|
end
|
218
233
|
|
219
234
|
module AssocPair
|
data/lib/rpp.rb
CHANGED
@@ -98,7 +98,18 @@ module RethinkDB
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def self.can_prefix (name, args)
|
101
|
-
|
101
|
+
if (name == "table" ||
|
102
|
+
name == "table_drop" ||
|
103
|
+
name == "table_create") &&
|
104
|
+
(!args.is_a?(Array) ||
|
105
|
+
!args[0].is_a?(Array) ||
|
106
|
+
args[0][0] != Term::TermType::DB)
|
107
|
+
return false
|
108
|
+
else
|
109
|
+
return !["db", "db_create", "db_drop", "json", "funcall", "args", "branch", "http",
|
110
|
+
"binary", "javascript", "random", "time", "iso8601", "epoch_time", "now",
|
111
|
+
"geojson", "point", "circle", "line", "polygon", "asc", "desc", "literal" ].include?(name)
|
112
|
+
end
|
102
113
|
end
|
103
114
|
def self.pp_int(q, term, bt, pre_dot=false)
|
104
115
|
q.text("\x7", 0) if bt == []
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rethinkdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.15.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RethinkDB Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -31,12 +31,12 @@ extensions: []
|
|
31
31
|
extra_rdoc_files: []
|
32
32
|
files:
|
33
33
|
- lib/ql2.pb.rb
|
34
|
-
- lib/
|
35
|
-
- lib/rethinkdb.rb
|
34
|
+
- lib/net.rb
|
36
35
|
- lib/func.rb
|
36
|
+
- lib/exc.rb
|
37
37
|
- lib/rpp.rb
|
38
|
-
- lib/net.rb
|
39
38
|
- lib/shim.rb
|
39
|
+
- lib/rethinkdb.rb
|
40
40
|
homepage: http://rethinkdb.com
|
41
41
|
licenses:
|
42
42
|
- Apache-2
|