ddbcli 0.1.5 → 0.1.6

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.
@@ -40,6 +40,10 @@ rule
40
40
  {
41
41
  struct(:SHOW_TABLES, :limit => val[2])
42
42
  }
43
+ show_stmt : SHOW TABLE STATUS
44
+ {
45
+ struct(:SHOW_TABLE_STATUS, :limit => val[2])
46
+ }
43
47
  | SHOW REGIONS
44
48
  {
45
49
  struct(:SHOW_REGIONS)
@@ -384,6 +388,14 @@ rule
384
388
  {
385
389
  struct(:INSERT, :table => val[2], :attrs => val[4], :values => val[7])
386
390
  }
391
+ | INSERT INTO IDENTIFIER select_stmt
392
+ {
393
+ struct(:INSERT_SELECT, :table => val[2], :select => val[3])
394
+ }
395
+ | INSERT INTO IDENTIFIER scan_stmt
396
+ {
397
+ struct(:INSERT_SCAN, :table => val[2], :select => val[3])
398
+ }
387
399
 
388
400
  attr_to_insert_list : IDENTIFIER
389
401
  {
@@ -513,6 +525,7 @@ KEYWORDS = %w(
513
525
  SELECT
514
526
  SET
515
527
  SHOW
528
+ STATUS
516
529
  STRING
517
530
  TABLES
518
531
  TABLE
@@ -523,7 +536,7 @@ KEYWORDS = %w(
523
536
  USE
524
537
  )
525
538
 
526
- KEYWORD_REGEXP = Regexp.compile("(?:#{KEYWORDS.join '|'})", Regexp::IGNORECASE)
539
+ KEYWORD_REGEXP = Regexp.compile("(?:#{KEYWORDS.join '|'})\\b", Regexp::IGNORECASE)
527
540
 
528
541
  def initialize(obj)
529
542
  src = obj.is_a?(IO) ? obj.read : obj.to_s
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.1.5
4
+ version: 0.1.6
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-10 00:00:00.000000000 Z
12
+ date: 2013-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json