volt-sql 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/sql/lib/sql_adaptor_server.rb +3 -4
- data/app/sql/lib/where_call.rb +3 -1
- data/lib/volt/sql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b564160eb35803e0fd439ca196552b93461d38d
|
4
|
+
data.tar.gz: 8f1f276a51235141e58d53f761e6d068a0cf63d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 815a358dc61816bbe049af19ea637e1e71ad891c0116fdcd83fefdbdc4b5fc8bba5dd02b47308d6aafda637f058b189eda30ad81d58afdabeef6b1cfd26357de
|
7
|
+
data.tar.gz: fa56cc573f964dc9f61d9425de233ef6b3c43fb5a3e52f1b543a1534b68b3037e271b5b3156d46944f77ed8aabba745b4887a192a888f6d0674e6956d077092e
|
@@ -281,7 +281,7 @@ module Volt
|
|
281
281
|
# the query that was captured on the client with QueryIdentifier
|
282
282
|
|
283
283
|
# Grab the AST that was generated from the block call on the client.
|
284
|
-
block_ast = args
|
284
|
+
block_ast, args = args[-1], args[0..-2]
|
285
285
|
args = self.class.move_to_db_types(args)
|
286
286
|
|
287
287
|
result = result.where(*args) do |ident|
|
@@ -316,7 +316,7 @@ module Volt
|
|
316
316
|
end#.tap {|v| puts "QUERY: " + v.inspect }
|
317
317
|
|
318
318
|
# Unpack extra values
|
319
|
-
result = unpack_values
|
319
|
+
result = unpack_values(result)
|
320
320
|
end
|
321
321
|
|
322
322
|
result
|
@@ -406,7 +406,7 @@ module Volt
|
|
406
406
|
# Unpacking means moving the extra field out and into the main fields.
|
407
407
|
#
|
408
408
|
# Then transform Time to VoltTime
|
409
|
-
def unpack_values
|
409
|
+
def unpack_values(inputs)
|
410
410
|
values = inputs.each do |values|
|
411
411
|
extra = values.delete(:extra)
|
412
412
|
|
@@ -430,7 +430,6 @@ module Volt
|
|
430
430
|
|
431
431
|
values
|
432
432
|
end
|
433
|
-
|
434
433
|
end
|
435
434
|
|
436
435
|
|
data/app/sql/lib/where_call.rb
CHANGED
@@ -19,7 +19,7 @@ module Volt
|
|
19
19
|
|
20
20
|
def walk(ast)
|
21
21
|
if ast.is_a?(Array) && !ast.is_a?(Sequel::SQL::Identifier)
|
22
|
-
op = ast
|
22
|
+
op, ast = ast[0], ast[1..-1]
|
23
23
|
|
24
24
|
case op
|
25
25
|
when 'c'
|
@@ -27,6 +27,8 @@ module Volt
|
|
27
27
|
when 'a'
|
28
28
|
# We popped off the 'a', so we just return the array
|
29
29
|
return ast
|
30
|
+
when 'r'
|
31
|
+
return Regexp.new(ast.first)
|
30
32
|
else
|
31
33
|
raise "invalid op: #{op.inspect} - #{ast.inspect} - #{ast.is_a?(Array).inspect}"
|
32
34
|
end
|
data/lib/volt/sql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: volt-sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Stout
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|