flounder 0.9.11 → 0.9.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/HISTORY +2 -1
- data/flounder.gemspec +1 -1
- data/lib/flounder/query/select.rb +1 -2
- data/qed/joins.md +21 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 644cfad15bfccebed7cfb43c43ac22fde0151f8d
|
4
|
+
data.tar.gz: 38a5f5158fac174f9380e20380b22188b23dd33f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7217b361145c7813b8d17c54c05e2396fca0a21644e2d61aa21514e97106cdb535dabd62259c24a395464cbda85c9f8d002d8dd4c0478b351a239b9d862d7d93
|
7
|
+
data.tar.gz: 1567204faa27723677978ee4acc63d25d3aae8b0ccdfa3491bb454adb4bfb6d90e6e19a74990037443eb738461c8927521e8190ffe9f84fa4c33503342d5d7b6
|
data/Gemfile.lock
CHANGED
data/HISTORY
CHANGED
@@ -13,4 +13,5 @@
|
|
13
13
|
+ localized where as in where(entity, :field => value)
|
14
14
|
+ db.where(entity, hash) form, where all symbols are looked up in entity.
|
15
15
|
+ db.entity.join(:other_entity) is now allowed
|
16
|
-
+ :symbol.in => ... is now working.
|
16
|
+
+ :symbol.in => ... is now working.
|
17
|
+
+ JOIN ... AND is now working.
|
data/flounder.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "flounder"
|
5
|
-
s.version = '0.9.
|
5
|
+
s.version = '0.9.12'
|
6
6
|
s.summary = "Flounder is a way to write SQL simply in Ruby. It deals with everything BUT object relational mapping. "
|
7
7
|
s.email = "kaspar.schiess@technologyastronauts.ch"
|
8
8
|
s.homepage = "https://bitbucket.org/technologyastronauts/oss_flounder"
|
@@ -66,9 +66,8 @@ module Flounder::Query
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def on join_conditions
|
69
|
-
k, v = join_conditions.first
|
70
69
|
manager.on(
|
71
|
-
|
70
|
+
*join_conditions.map { |(k, v)| transform_tuple(entity, k, join_field(v)) })
|
72
71
|
self
|
73
72
|
end
|
74
73
|
def anchor
|
data/qed/joins.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
Joins are correctly created.
|
3
|
+
|
4
|
+
~~~ruby
|
5
|
+
query = domain[:posts].
|
6
|
+
join(users).on(:user_id => :id)
|
7
|
+
|
8
|
+
query.assert generates_sql(%Q(SELECT [fields] FROM "posts" INNER JOIN "users" ON "posts"."user_id" = "users"."id"))
|
9
|
+
|
10
|
+
row = query.first
|
11
|
+
row.post.id.assert == 1
|
12
|
+
~~~
|
13
|
+
|
14
|
+
Joins are … joined using AND.
|
15
|
+
|
16
|
+
~~~ruby
|
17
|
+
query = domain[:posts].
|
18
|
+
join(users).on(:user_id => :id, :strange_example_id => :id)
|
19
|
+
|
20
|
+
query.assert generates_sql(%Q(SELECT [fields] FROM "posts" INNER JOIN "users" ON "posts"."user_id" = "users"."id" AND "posts"."strange_example_id" = "users"."id"))
|
21
|
+
~~~
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flounder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kaspar Schiess
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- qed/flounder.sql
|
124
124
|
- qed/index.md
|
125
125
|
- qed/inserts.md
|
126
|
+
- qed/joins.md
|
126
127
|
- qed/ordering.md
|
127
128
|
- qed/projection.md
|
128
129
|
- qed/results.md
|
@@ -148,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
149
|
version: '0'
|
149
150
|
requirements: []
|
150
151
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.2.
|
152
|
+
rubygems_version: 2.2.0
|
152
153
|
signing_key:
|
153
154
|
specification_version: 4
|
154
155
|
summary: Flounder is a way to write SQL simply in Ruby. It deals with everything BUT
|
@@ -165,6 +166,7 @@ test_files:
|
|
165
166
|
- qed/flounder.sql
|
166
167
|
- qed/index.md
|
167
168
|
- qed/inserts.md
|
169
|
+
- qed/joins.md
|
168
170
|
- qed/ordering.md
|
169
171
|
- qed/projection.md
|
170
172
|
- qed/results.md
|