ddbcli 0.2.0 → 0.2.1

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.
@@ -172,11 +172,15 @@ rule
172
172
 
173
173
  scan_stmt : SELECT ALL attrs_to_get FROM IDENTIFIER scan_where_clause limit_clause
174
174
  {
175
- struct(:SCAN, :attrs => val[2], :table => val[4], :conds => val[5], :limit => val[6], :count => false)
175
+ struct(:SCAN, :attrs => val[2], :table => val[4], :conds => val[5], :limit => val[6], :count => false, :segment => nil, :total_segments => nil)
176
176
  }
177
177
  | SELECT ALL COUNT '(' '*' ')' FROM IDENTIFIER scan_where_clause limit_clause
178
178
  {
179
- struct(:SCAN, :attrs => [], :table => val[7], :conds => val[8], :limit => val[9], :count => true)
179
+ struct(:SCAN, :attrs => [], :table => val[7], :conds => val[8], :limit => val[9], :count => true, :segment => nil, :total_segments => nil)
180
+ }
181
+ | SELECT NUMBER_VALUE '/' NUMBER_VALUE attrs_to_get FROM IDENTIFIER scan_where_clause limit_clause
182
+ {
183
+ struct(:SCAN, :attrs => val[4], :table => val[6], :conds => val[7], :limit => val[8], :count => false, :segment => val[1], :total_segments => val[3])
180
184
  }
181
185
 
182
186
  get_stmt : GET attrs_to_get FROM IDENTIFIER update_where_clause
@@ -598,7 +602,7 @@ def scan
598
602
  yield [:STRING_VALUE, tok.slice(1...-1).gsub(/""/, '"')]
599
603
  elsif (tok = @ss.scan /\d+(?:\.\d+)?/)
600
604
  yield [:NUMBER_VALUE, (tok =~ /\./ ? tok.to_f : tok.to_i)]
601
- elsif (tok = @ss.scan /[,\(\)\*]/)
605
+ elsif (tok = @ss.scan /[,\(\)\*\/]/)
602
606
  yield [tok, tok]
603
607
  elsif (tok = @ss.scan /\|(?:.*)/)
604
608
  yield [:RUBY_SCRIPT, tok.slice(1..-1)]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddbcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-13 00:00:00.000000000 Z
12
+ date: 2013-05-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json