sqlstmt 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sqlstmt/select.rb +6 -1
- metadata +2 -2
data/lib/sqlstmt/select.rb
CHANGED
@@ -13,6 +13,10 @@ class Select < FromQuery
|
|
13
13
|
self
|
14
14
|
end
|
15
15
|
|
16
|
+
def into(str)
|
17
|
+
@into = str
|
18
|
+
end
|
19
|
+
|
16
20
|
private
|
17
21
|
def verify_minimum_requirements
|
18
22
|
super
|
@@ -21,8 +25,9 @@ private
|
|
21
25
|
|
22
26
|
def build_stmt
|
23
27
|
distinct_str = if @distinct then 'DISTINCT ' else '' end
|
28
|
+
into_str = if @into then " INTO #{@into}" else '' end
|
24
29
|
select_str = @fields.join(',')
|
25
|
-
"SELECT #{distinct_str}#{select_str}#{build_from_clause}"
|
30
|
+
"SELECT #{distinct_str}#{select_str}#{build_from_clause}#{into_str}"
|
26
31
|
end
|
27
32
|
end
|
28
33
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqlstmt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-08-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: dohutil
|