rethinkdb 1.2.0.2 → 1.2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sequence.rb +5 -2
- metadata +14 -14
data/lib/sequence.rb
CHANGED
@@ -325,10 +325,13 @@ module RethinkDB
|
|
325
325
|
# of <b>+table2+</b>):
|
326
326
|
# table1.eq_join(:a, table2)
|
327
327
|
# table2.inner_join(table2) {|row1, row2| r.eq row1[:a],row2[:id]}
|
328
|
-
|
328
|
+
# As this function defaults to <b>+id+</b> for the primary key of the right
|
329
|
+
# table, you will need to specify the primary key if it is otherwise:
|
330
|
+
# table1.eq_join(:a, table2, :t2pk)
|
331
|
+
def eq_join(leftattr, other, rightattr=:id)
|
329
332
|
S.with_var {|vname, v|
|
330
333
|
self.concat_map {|row|
|
331
|
-
RQL.let({vname => other.get(row[leftattr])}) {
|
334
|
+
RQL.let({vname => other.get(row[leftattr], rightattr)}) {
|
332
335
|
RQL.branch(v.ne(nil), [{:left => row, :right => v}], [])
|
333
336
|
}
|
334
337
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rethinkdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 87
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
+
- 6
|
9
10
|
- 0
|
10
|
-
|
11
|
-
version: 1.2.0.2
|
11
|
+
version: 1.2.6.0
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- RethinkDB Inc.
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-11-
|
19
|
+
date: 2012-11-13 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: json
|
@@ -55,21 +55,21 @@ extensions: []
|
|
55
55
|
extra_rdoc_files: []
|
56
56
|
|
57
57
|
files:
|
58
|
-
- lib/
|
59
|
-
- lib/data_collectors.rb
|
58
|
+
- lib/tables.rb
|
60
59
|
- lib/jsons.rb
|
61
|
-
- lib/net.rb
|
62
|
-
- lib/protob_compiler.rb
|
63
60
|
- lib/query.rb
|
64
|
-
- lib/query_language.pb.rb
|
65
61
|
- lib/rethinkdb.rb
|
62
|
+
- lib/bt.rb
|
63
|
+
- lib/writes.rb
|
66
64
|
- lib/rql.rb
|
67
|
-
- lib/streams.rb
|
68
|
-
- lib/tables.rb
|
69
65
|
- lib/utils.rb
|
70
|
-
- lib/
|
66
|
+
- lib/protob_compiler.rb
|
67
|
+
- lib/net.rb
|
68
|
+
- lib/query_language.pb.rb
|
71
69
|
- lib/sequence.rb
|
72
|
-
- lib/
|
70
|
+
- lib/base_classes.rb
|
71
|
+
- lib/streams.rb
|
72
|
+
- lib/data_collectors.rb
|
73
73
|
homepage: http://rethinkdb.com
|
74
74
|
licenses:
|
75
75
|
- Apache-2
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements: []
|
100
100
|
|
101
101
|
rubyforge_project:
|
102
|
-
rubygems_version: 1.
|
102
|
+
rubygems_version: 1.8.24
|
103
103
|
signing_key:
|
104
104
|
specification_version: 3
|
105
105
|
summary: This package provides the Ruby driver library for the RethinkDB database server.
|