sqldsl 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/lib/numeric.rb +4 -0
- data/lib/or_where_builder.rb +2 -2
- data/lib/select.rb +1 -1
- data/lib/string.rb +4 -0
- data/lib/symbol.rb +5 -1
- data/rakefile.rb +1 -1
- data/test/numeric_test.rb +4 -0
- data/test/select_acceptance_test.rb +1 -1
- data/test/string_test.rb +4 -0
- data/test/symbol_test.rb +4 -0
- metadata +2 -2
data/README
CHANGED
@@ -143,7 +143,7 @@ See the tests for more examples
|
|
143
143
|
end.or do
|
144
144
|
column1 > 100
|
145
145
|
end
|
146
|
-
expected = "select column1, 'book', 10 from table1, table2 where column1 = 0 or column1 > 100"
|
146
|
+
expected = "select column1, 'book', 10 from table1, table2 where column1 = 0 or (column1 > 100)"
|
147
147
|
assert_equal expected, statement.to_sql
|
148
148
|
end
|
149
149
|
|
data/lib/numeric.rb
CHANGED
data/lib/or_where_builder.rb
CHANGED
@@ -7,9 +7,9 @@ class OrWhereBuilder < WhereBuilder
|
|
7
7
|
# OrWhereBuilder.new [] do
|
8
8
|
# equal :column1, 10
|
9
9
|
# equal :column2, 'book'
|
10
|
-
# end.to_sql #=> " or column1 = 10 and column2 = 'book'"
|
10
|
+
# end.to_sql #=> " or (column1 = 10 and column2 = 'book')"
|
11
11
|
def to_sql
|
12
|
-
" or #{sql_parts.join(' and ')}"
|
12
|
+
" or (#{sql_parts.join(' and ')})"
|
13
13
|
end
|
14
14
|
|
15
15
|
end
|
data/lib/select.rb
CHANGED
data/lib/string.rb
CHANGED
data/lib/symbol.rb
CHANGED
data/rakefile.rb
CHANGED
@@ -27,7 +27,7 @@ Gem::manage_gems
|
|
27
27
|
specification = Gem::Specification.new do |s|
|
28
28
|
s.name = "sqldsl"
|
29
29
|
s.summary = "A DSL for creating SQL Statements"
|
30
|
-
s.version = "1.3.
|
30
|
+
s.version = "1.3.1"
|
31
31
|
s.author = 'Jay Fields'
|
32
32
|
s.description = "A DSL for creating SQL Statements"
|
33
33
|
s.email = 'sqldsl-developer@rubyforge.org'
|
data/test/numeric_test.rb
CHANGED
@@ -67,7 +67,7 @@ class SelectAcceptanceTest < Test::Unit::TestCase
|
|
67
67
|
end.or do
|
68
68
|
column1 > 100
|
69
69
|
end
|
70
|
-
expected = "select column1, 'book', 10 from table1, table2 where column1 = 0 or column1 > 100"
|
70
|
+
expected = "select column1, 'book', 10 from table1, table2 where column1 = 0 or (column1 > 100)"
|
71
71
|
assert_equal expected, statement.to_sql
|
72
72
|
end
|
73
73
|
|
data/test/string_test.rb
CHANGED
data/test/symbol_test.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: sqldsl
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.3.
|
7
|
-
date: 2007-03-
|
6
|
+
version: 1.3.1
|
7
|
+
date: 2007-03-14 00:00:00 -04:00
|
8
8
|
summary: A DSL for creating SQL Statements
|
9
9
|
require_paths:
|
10
10
|
- lib
|