sqlstmt 0.1.26 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sqlstmt/select.rb +7 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8ed1a4a02049a6f87c891fa4a681e176353522d
|
4
|
+
data.tar.gz: 9e18e8909c1da94dc693bf33da747faf28107a65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29d7d966c5482b1a30c4bd037993d9acc18e52b3c69df6cc4e5ba1427e724d90a7def459172bdf2c5f56a4fd92cb4834bfeeb4222f534554d87503ef7936dfa2
|
7
|
+
data.tar.gz: 19f20fe22f94abe0f0e0fe940ba4982be8d96e57958c01714469c69859a88435f2701872d73c8fe7d72d01429ad5f133b06587eff280ee12ff732851d41bf1fe
|
data/lib/sqlstmt/select.rb
CHANGED
@@ -19,6 +19,11 @@ class Select < FromQuery
|
|
19
19
|
self
|
20
20
|
end
|
21
21
|
|
22
|
+
def straight_join
|
23
|
+
@straight_join = true
|
24
|
+
self
|
25
|
+
end
|
26
|
+
|
22
27
|
def into_outfile(str)
|
23
28
|
@into = "OUTFILE #{str}"
|
24
29
|
self
|
@@ -31,10 +36,11 @@ private
|
|
31
36
|
end
|
32
37
|
|
33
38
|
def build_stmt
|
39
|
+
straight_join_str = if @straight_join then 'STRAIGHT_JOIN ' else '' end
|
34
40
|
distinct_str = if @distinct then 'DISTINCT ' else '' end
|
35
41
|
into_str = if @into then " INTO #{@into}" else '' end
|
36
42
|
select_str = @fields.join(',')
|
37
|
-
"SELECT #{distinct_str}#{select_str}#{build_from_clause}#{into_str}"
|
43
|
+
"SELECT #{straight_join_str}#{distinct_str}#{select_str}#{build_from_clause}#{into_str}"
|
38
44
|
end
|
39
45
|
end
|
40
46
|
|
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.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Makani Mason
|
@@ -9,34 +9,34 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-10-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dohutil
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 0.2.21
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 0.2.21
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: dohtest
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: 0.1.42
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 0.1.42
|
42
42
|
description: build SQL statements in a modular fashion, one piece at a time; only
|
@@ -48,6 +48,7 @@ extensions: []
|
|
48
48
|
extra_rdoc_files:
|
49
49
|
- MIT-LICENSE
|
50
50
|
files:
|
51
|
+
- MIT-LICENSE
|
51
52
|
- lib/sqlstmt.rb
|
52
53
|
- lib/sqlstmt/delete.rb
|
53
54
|
- lib/sqlstmt/error.rb
|
@@ -64,7 +65,6 @@ files:
|
|
64
65
|
- test/select.dt.rb
|
65
66
|
- test/to_sql.dt.rb
|
66
67
|
- test/update.dt.rb
|
67
|
-
- MIT-LICENSE
|
68
68
|
homepage: https://github.com/atpsoft/sqlstmt
|
69
69
|
licenses:
|
70
70
|
- MIT
|
@@ -75,17 +75,17 @@ require_paths:
|
|
75
75
|
- lib
|
76
76
|
required_ruby_version: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- -
|
78
|
+
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: 2.0.0
|
81
81
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
87
|
rubyforge_project:
|
88
|
-
rubygems_version: 2.
|
88
|
+
rubygems_version: 2.4.8
|
89
89
|
signing_key:
|
90
90
|
specification_version: 4
|
91
91
|
summary: build SQL statements in a modular fashion, one piece at a time
|