flounder 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY +6 -1
- data/flounder-0.9.2.gem +0 -0
- data/flounder.gemspec +1 -1
- data/lib/flounder/entity.rb +5 -1
- data/lib/flounder/query/delete.rb +14 -0
- data/lib/flounder.rb +3 -1
- data/qed/delete.md +10 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5865e63fb12cfb93c2514d412f9640e00383072
|
4
|
+
data.tar.gz: 09a4d7dfab77ccea44f7b7c0f0fb9f8212e9d909
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61fe664adec772a796f5136ecba197754aefb6656a9a2839dbddbea8ff4ef1b5331d2e2df023df299ff4365b2d7dfbe2ebdac0ab87eeb9713c53850f89220370
|
7
|
+
data.tar.gz: c711c60ddee3a053ed91ef745773b3b4febb87edb5965028e8d0ff0ef1e17d2857b32d631f6855ac316249572b48228712c80f7483d9ed9a23efb4128c3b3729
|
data/HISTORY
CHANGED
data/flounder-0.9.2.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.9.
|
5
|
+
s.version = '0.9.3'
|
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"
|
data/lib/flounder/entity.rb
CHANGED
@@ -83,6 +83,10 @@ module Flounder
|
|
83
83
|
Query::Update.new(domain, self).tap { |u|
|
84
84
|
u.set(hash) }
|
85
85
|
end
|
86
|
+
|
87
|
+
def delete
|
88
|
+
Query::Delete.new(domain, self)
|
89
|
+
end
|
86
90
|
|
87
91
|
# Temporarily creates a new entity that is available as if it was declared
|
88
92
|
# with the given plural and singular, but referencing to the same
|
@@ -111,7 +115,7 @@ module Flounder
|
|
111
115
|
end
|
112
116
|
|
113
117
|
# Kickers
|
114
|
-
[:first, :all, :size
|
118
|
+
[:first, :all, :size].each do |name|
|
115
119
|
define_method name do |*args|
|
116
120
|
q = select
|
117
121
|
q.send(name, *args)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative 'base'
|
2
|
+
|
3
|
+
module Flounder::Query
|
4
|
+
|
5
|
+
# An update obtained by calling any of the chain methods on an entity.
|
6
|
+
#
|
7
|
+
class Delete < Base
|
8
|
+
def initialize domain, entity
|
9
|
+
super(domain, Arel::DeleteManager, entity)
|
10
|
+
|
11
|
+
manager.from entity.table
|
12
|
+
end
|
13
|
+
end # class
|
14
|
+
end # module Flounder
|
data/lib/flounder.rb
CHANGED
@@ -14,10 +14,12 @@ require 'flounder/entity_alias'
|
|
14
14
|
require 'flounder/field'
|
15
15
|
|
16
16
|
require 'flounder/query/immediate'
|
17
|
+
|
17
18
|
require 'flounder/query/select'
|
18
19
|
require 'flounder/query/insert'
|
19
|
-
|
20
20
|
require 'flounder/query/update'
|
21
|
+
require 'flounder/query/delete'
|
22
|
+
|
21
23
|
require 'flounder/exceptions'
|
22
24
|
|
23
25
|
module Flounder
|
data/qed/delete.md
ADDED
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kaspar Schiess
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-08-
|
12
|
+
date: 2014-08-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: arel
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- LICENSE
|
92
92
|
- README
|
93
93
|
- flounder-0.9.1.gem
|
94
|
+
- flounder-0.9.2.gem
|
94
95
|
- flounder.gemspec
|
95
96
|
- lib/flounder.rb
|
96
97
|
- lib/flounder/connection.rb
|
@@ -103,6 +104,7 @@ files:
|
|
103
104
|
- lib/flounder/field.rb
|
104
105
|
- lib/flounder/postgres_utils.rb
|
105
106
|
- lib/flounder/query/base.rb
|
107
|
+
- lib/flounder/query/delete.rb
|
106
108
|
- lib/flounder/query/immediate.rb
|
107
109
|
- lib/flounder/query/insert.rb
|
108
110
|
- lib/flounder/query/returning.rb
|
@@ -115,6 +117,7 @@ files:
|
|
115
117
|
- qed/atomic_insert_update.md
|
116
118
|
- qed/conditions.md
|
117
119
|
- qed/database_technicalities.md
|
120
|
+
- qed/delete.md
|
118
121
|
- qed/exceptions.md
|
119
122
|
- qed/flounder.sql
|
120
123
|
- qed/index.md
|
@@ -155,6 +158,7 @@ test_files:
|
|
155
158
|
- qed/atomic_insert_update.md
|
156
159
|
- qed/conditions.md
|
157
160
|
- qed/database_technicalities.md
|
161
|
+
- qed/delete.md
|
158
162
|
- qed/exceptions.md
|
159
163
|
- qed/flounder.sql
|
160
164
|
- qed/index.md
|