flounder 0.11.5 → 0.11.6
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/flounder-0.11.5.gem +0 -0
- data/flounder.gemspec +1 -1
- data/lib/flounder/query/select.rb +10 -1
- data/qed/projection.md +10 -1
- metadata +26 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76dff20170b73d435d8031c55fbfdc351a50de2e
|
4
|
+
data.tar.gz: fd03c13174d8f59b0d1920ab40756fc87e06be99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d48b7d9ef4003ba6d3c1a661852e21675108c918e55f540b588f087a56f04d4563bff05d2c6e1db428c377faa097993cb2ec4734e0994f39c28427ce7fc9c1c8
|
7
|
+
data.tar.gz: de7d5743d7ec8253d240df7b67505d52f7aa985562ce65f5f35ad30c78a4de447b44292602750924ba306765c48565daaa3680065fe67ac2af542d9e1987c125
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
flounder (0.11.
|
4
|
+
flounder (0.11.5)
|
5
5
|
arel (~> 5, > 5.0.1)
|
6
6
|
connection_pool (~> 2)
|
7
7
|
hashie (~> 3, >= 3.2)
|
8
8
|
pg (~> 0.17)
|
9
|
-
pg-hstore (~> 1.2.0)
|
9
|
+
pg-hstore (~> 1.2, >= 1.2.0)
|
10
10
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
data/flounder-0.11.5.gem
ADDED
Binary file
|
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.11.
|
5
|
+
s.version = '0.11.6'
|
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"
|
@@ -29,6 +29,11 @@ module Flounder::Query
|
|
29
29
|
# so that they can be traced back to the entity that contributed them.
|
30
30
|
attr_reader :default_projection
|
31
31
|
|
32
|
+
# Set to true once #project is used. From that point on, no fields can
|
33
|
+
# be added through default projections.
|
34
|
+
#
|
35
|
+
attr_reader :has_projection
|
36
|
+
|
32
37
|
# Each projection has a unique prefix mapping to the entity that uses this
|
33
38
|
# prefix during this query.
|
34
39
|
attr_reader :projection_prefixes
|
@@ -48,6 +53,10 @@ module Flounder::Query
|
|
48
53
|
end
|
49
54
|
|
50
55
|
def add_fields_to_default entity
|
56
|
+
# Don't add fields through the default method if #project was already
|
57
|
+
# used.
|
58
|
+
return if has_projection
|
59
|
+
|
51
60
|
prefix = entity.name.to_s
|
52
61
|
table = entity.table
|
53
62
|
|
@@ -92,7 +101,7 @@ module Flounder::Query
|
|
92
101
|
#
|
93
102
|
def project *field_list
|
94
103
|
@has_projection = true
|
95
|
-
@default_projection =
|
104
|
+
@default_projection = []
|
96
105
|
|
97
106
|
manager.project *map_to_arel(field_list)
|
98
107
|
self
|
data/qed/projection.md
CHANGED
@@ -17,4 +17,13 @@ When projecting, all result data will be toplevel and only the projected data is
|
|
17
17
|
|
18
18
|
result.id.assert == nil # Not loaded.
|
19
19
|
result.name.assert == 'John Snow'
|
20
|
-
~~~
|
20
|
+
~~~
|
21
|
+
|
22
|
+
Otherwise a projected query can be treated like an ordinary query, including appending stuff by joining it in.
|
23
|
+
|
24
|
+
~~~ruby
|
25
|
+
posts.
|
26
|
+
project(users[:name]).
|
27
|
+
join(users).on(:user_id => :id).
|
28
|
+
first
|
29
|
+
~~~
|
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.11.
|
4
|
+
version: 0.11.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kaspar Schiess
|
@@ -9,94 +9,94 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-09-
|
12
|
+
date: 2014-09-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: arel
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ~>
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '5'
|
21
|
-
- -
|
21
|
+
- - '>'
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 5.0.1
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- -
|
28
|
+
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '5'
|
31
|
-
- -
|
31
|
+
- - '>'
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 5.0.1
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: pg
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.17'
|
41
41
|
type: :runtime
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.17'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: hashie
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3'
|
55
|
-
- -
|
55
|
+
- - '>='
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '3.2'
|
58
58
|
type: :runtime
|
59
59
|
prerelease: false
|
60
60
|
version_requirements: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
|
-
- -
|
62
|
+
- - ~>
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '3'
|
65
|
-
- -
|
65
|
+
- - '>='
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '3.2'
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: connection_pool
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- -
|
72
|
+
- - ~>
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '2'
|
75
75
|
type: :runtime
|
76
76
|
prerelease: false
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- -
|
79
|
+
- - ~>
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '2'
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: pg-hstore
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- -
|
86
|
+
- - ~>
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '1.2'
|
89
|
-
- -
|
89
|
+
- - '>='
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: 1.2.0
|
92
92
|
type: :runtime
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
|
-
- -
|
96
|
+
- - ~>
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '1.2'
|
99
|
-
- -
|
99
|
+
- - '>='
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: 1.2.0
|
102
102
|
description: " Flounder is the missing piece between the database and your Ruby
|
@@ -107,14 +107,12 @@ executables: []
|
|
107
107
|
extensions: []
|
108
108
|
extra_rdoc_files: []
|
109
109
|
files:
|
110
|
+
- flounder-0.11.5.gem
|
111
|
+
- flounder.gemspec
|
110
112
|
- Gemfile
|
111
113
|
- Gemfile.lock
|
112
114
|
- HACKING
|
113
115
|
- HISTORY
|
114
|
-
- LICENSE
|
115
|
-
- README
|
116
|
-
- flounder.gemspec
|
117
|
-
- lib/flounder.rb
|
118
116
|
- lib/flounder/connection.rb
|
119
117
|
- lib/flounder/connection_pool.rb
|
120
118
|
- lib/flounder/domain.rb
|
@@ -132,6 +130,8 @@ files:
|
|
132
130
|
- lib/flounder/query/select.rb
|
133
131
|
- lib/flounder/query/update.rb
|
134
132
|
- lib/flounder/symbol_extensions.rb
|
133
|
+
- lib/flounder.rb
|
134
|
+
- LICENSE
|
135
135
|
- qed/applique/ae.rb
|
136
136
|
- qed/applique/flounder.rb
|
137
137
|
- qed/applique/setup_domain.rb
|
@@ -149,6 +149,7 @@ files:
|
|
149
149
|
- qed/results.md
|
150
150
|
- qed/selects.md
|
151
151
|
- qed/updates.md
|
152
|
+
- README
|
152
153
|
homepage: https://bitbucket.org/technologyastronauts/oss_flounder
|
153
154
|
licenses:
|
154
155
|
- MIT
|
@@ -159,17 +160,17 @@ require_paths:
|
|
159
160
|
- lib
|
160
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
161
162
|
requirements:
|
162
|
-
- -
|
163
|
+
- - '>='
|
163
164
|
- !ruby/object:Gem::Version
|
164
165
|
version: '0'
|
165
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
167
|
requirements:
|
167
|
-
- -
|
168
|
+
- - '>='
|
168
169
|
- !ruby/object:Gem::Version
|
169
170
|
version: '0'
|
170
171
|
requirements: []
|
171
172
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.
|
173
|
+
rubygems_version: 2.0.14
|
173
174
|
signing_key:
|
174
175
|
specification_version: 4
|
175
176
|
summary: Flounder is a way to write SQL simply in Ruby. It deals with everything BUT
|