ddbcli 0.4.2.beta2 → 0.5.0.beta
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/README.md +34 -28
- data/lib/ddbcli/cli/help.rb +33 -28
- data/lib/ddbcli/ddb-driver.rb +126 -100
- data/lib/ddbcli/ddb-parser.tab.rb +776 -720
- data/lib/ddbcli/ddb-parser.y +53 -32
- data/lib/ddbcli/version.rb +1 -1
- data/spec/ddbcli_spec.rb +18 -6
- metadata +2 -2
data/lib/ddbcli/ddb-parser.y
CHANGED
@@ -67,26 +67,39 @@ rule
|
|
67
67
|
val[1]
|
68
68
|
}
|
69
69
|
|
70
|
-
alter_stmt :
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
70
|
+
alter_stmt : alter_table_stmt
|
71
|
+
| alter_table_index_stmt
|
72
|
+
|
73
|
+
|
74
|
+
alter_table_stmt :ALTER TABLE IDENTIFIER capacity_clause
|
75
|
+
{
|
76
|
+
struct(:ALTER_TABLE, :table => val[2], :capacity => val[3], :stream => nil)
|
77
|
+
}
|
78
|
+
| ALTER TABLE IDENTIFIER stream_clause
|
79
|
+
{
|
80
|
+
struct(:ALTER_TABLE, :table => val[2], :capacity => nil, :stream => val[3])
|
81
|
+
}
|
82
|
+
| ALTER TABLE IDENTIFIER capacity_clause stream_clause
|
83
|
+
{
|
84
|
+
struct(:ALTER_TABLE, :table => val[2], :capacity => val[3], :stream => val[4])
|
85
|
+
}
|
86
|
+
| ALTER TABLE IDENTIFIER stream_clause capacity_clause
|
87
|
+
{
|
88
|
+
struct(:ALTER_TABLE, :table => val[2], :capacity => val[4], :stream => val[3])
|
89
|
+
}
|
90
|
+
|
91
|
+
alter_table_index_stmt : ALTER TABLE IDENTIFIER CHANGE GLOBAL INDEX IDENTIFIER capacity_clause
|
92
|
+
{
|
93
|
+
struct(:ALTER_TABLE_INDEX, :table => val[2], :action => 'Update', :index_definition => {:name => val[6], :capacity => val[7]})
|
94
|
+
}
|
95
|
+
| ALTER TABLE IDENTIFIER ADD global_index_definition_with_capacity
|
96
|
+
{
|
97
|
+
struct(:ALTER_TABLE_INDEX, :table => val[2], :action => 'Create', :index_definition => val[4])
|
98
|
+
}
|
99
|
+
| ALTER TABLE IDENTIFIER DROP GLOBAL INDEX IDENTIFIER
|
100
|
+
{
|
101
|
+
struct(:ALTER_TABLE_INDEX, :table => val[2], :action => 'Delete', :index_definition => {:name => val[6]})
|
102
|
+
}
|
90
103
|
|
91
104
|
use_stmt : USE IDENTIFIER
|
92
105
|
{
|
@@ -200,18 +213,26 @@ rule
|
|
200
213
|
val[0] + [val[2]]
|
201
214
|
}
|
202
215
|
|
203
|
-
index_definition :
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
216
|
+
index_definition : locat_index_definition
|
217
|
+
| global_index_definition
|
218
|
+
|
219
|
+
locat_index_definition : INDEX IDENTIFIER '(' IDENTIFIER attr_type_list ')' index_type_definition
|
220
|
+
{
|
221
|
+
{:name => val[1], :key => val[3], :type => val[4], :projection => val[6]}
|
222
|
+
}
|
223
|
+
|
224
|
+
global_index_definition : global_index_definition_without_capacity
|
225
|
+
| global_index_definition_with_capacity
|
226
|
+
|
227
|
+
global_index_definition_without_capacity : GLOBAL INDEX IDENTIFIER '(' global_index_keys ')' index_type_definition
|
228
|
+
{
|
229
|
+
{:name => val[2], :keys => val[4], :projection => val[6], :global => true}
|
230
|
+
}
|
231
|
+
|
232
|
+
global_index_definition_with_capacity : GLOBAL INDEX IDENTIFIER '(' global_index_keys ')' index_type_definition strict_capacity_clause
|
233
|
+
{
|
234
|
+
{:name => val[2], :keys => val[4], :projection => val[6], :capacity => val[7], :global => true}
|
235
|
+
}
|
215
236
|
|
216
237
|
global_index_keys : IDENTIFIER attr_type_list
|
217
238
|
{
|
data/lib/ddbcli/version.rb
CHANGED
data/spec/ddbcli_spec.rb
CHANGED
@@ -34,7 +34,9 @@ describe 'ddbcli' do
|
|
34
34
|
"KeySchema"=>[{"AttributeName"=>"id", "KeyType"=>"HASH"}],
|
35
35
|
"TableStatus"=>"ACTIVE",
|
36
36
|
"ProvisionedThroughput"=>
|
37
|
-
{"
|
37
|
+
{"LastIncreaseDateTime"=>0.0,
|
38
|
+
"LastDecreaseDateTime"=>0.0,
|
39
|
+
"NumberOfDecreasesToday"=>0,
|
38
40
|
"ReadCapacityUnits"=>2,
|
39
41
|
"WriteCapacityUnits"=>2},
|
40
42
|
"TableSizeBytes"=>0,
|
@@ -64,7 +66,9 @@ describe 'ddbcli' do
|
|
64
66
|
{"AttributeName"=>"val", "KeyType"=>"RANGE"}],
|
65
67
|
"TableStatus"=>"ACTIVE",
|
66
68
|
"ProvisionedThroughput"=>
|
67
|
-
{"
|
69
|
+
{"LastIncreaseDateTime"=>0.0,
|
70
|
+
"LastDecreaseDateTime"=>0.0,
|
71
|
+
"NumberOfDecreasesToday"=>0,
|
68
72
|
"ReadCapacityUnits"=>2,
|
69
73
|
"WriteCapacityUnits"=>2},
|
70
74
|
"TableSizeBytes"=>0,
|
@@ -96,7 +100,9 @@ describe 'ddbcli' do
|
|
96
100
|
{"AttributeName"=>"val", "KeyType"=>"RANGE"}],
|
97
101
|
"TableStatus"=>"ACTIVE",
|
98
102
|
"ProvisionedThroughput"=>
|
99
|
-
{"
|
103
|
+
{"LastIncreaseDateTime"=>0.0,
|
104
|
+
"LastDecreaseDateTime"=>0.0,
|
105
|
+
"NumberOfDecreasesToday"=>0,
|
100
106
|
"ReadCapacityUnits"=>2,
|
101
107
|
"WriteCapacityUnits"=>2},
|
102
108
|
"TableSizeBytes"=>0,
|
@@ -136,7 +142,9 @@ describe 'ddbcli' do
|
|
136
142
|
{"AttributeName"=>"val", "KeyType"=>"RANGE"}],
|
137
143
|
"TableStatus"=>"ACTIVE",
|
138
144
|
"ProvisionedThroughput"=>
|
139
|
-
{"
|
145
|
+
{"LastIncreaseDateTime"=>0.0,
|
146
|
+
"LastDecreaseDateTime"=>0.0,
|
147
|
+
"NumberOfDecreasesToday"=>0,
|
140
148
|
"ReadCapacityUnits"=>2,
|
141
149
|
"WriteCapacityUnits"=>2},
|
142
150
|
"TableSizeBytes"=>0,
|
@@ -178,7 +186,9 @@ describe 'ddbcli' do
|
|
178
186
|
{"AttributeName"=>"val", "KeyType"=>"RANGE"}],
|
179
187
|
"TableStatus"=>"ACTIVE",
|
180
188
|
"ProvisionedThroughput"=>
|
181
|
-
{"
|
189
|
+
{"LastIncreaseDateTime"=>0.0,
|
190
|
+
"LastDecreaseDateTime"=>0.0,
|
191
|
+
"NumberOfDecreasesToday"=>0,
|
182
192
|
"ReadCapacityUnits"=>4,
|
183
193
|
"WriteCapacityUnits"=>4},
|
184
194
|
"TableSizeBytes"=>0,
|
@@ -220,7 +230,9 @@ describe 'ddbcli' do
|
|
220
230
|
{"AttributeName"=>"val", "KeyType"=>"RANGE"}],
|
221
231
|
"TableStatus"=>"ACTIVE",
|
222
232
|
"ProvisionedThroughput"=>
|
223
|
-
{"
|
233
|
+
{"LastIncreaseDateTime"=>0.0,
|
234
|
+
"LastDecreaseDateTime"=>0.0,
|
235
|
+
"NumberOfDecreasesToday"=>0,
|
224
236
|
"ReadCapacityUnits"=>2,
|
225
237
|
"WriteCapacityUnits"=>2},
|
226
238
|
"TableSizeBytes"=>0,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddbcli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|