ddbcli 0.1.0

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.
@@ -0,0 +1,31 @@
1
+ require 'ddbcli/ddb-error'
2
+
3
+ module DynamoDB
4
+ class Endpoint
5
+
6
+ ENDPOINTS = {
7
+ 'dynamodb.us-east-1.amazonaws.com' => 'us-east-1',
8
+ 'dynamodb.us-west-1.amazonaws.com' => 'us-west-1',
9
+ 'dynamodb.us-west-2.amazonaws.com' => 'us-west-2',
10
+ 'dynamodb.eu-west-1.amazonaws.com' => 'eu-west-1',
11
+ 'dynamodb.ap-northeast-1.amazonaws.com' => 'ap-northeast-1',
12
+ 'dynamodb.ap-southeast-1.amazonaws.com' => 'ap-southeast-1',
13
+ 'dynamodb.ap-southeast-2.amazonaws.com' => 'ap-southeast-2',
14
+ 'dynamodb.sa-east-1.amazonaws.com' => 'sa-east-1',
15
+ }
16
+
17
+ def self.endpoint_and_region(endpoint_or_region)
18
+ if ENDPOINTS.key?(endpoint_or_region)
19
+ [endpoint_or_region, ENDPOINTS[endpoint_or_region]]
20
+ elsif ENDPOINTS.value?(endpoint_or_region)
21
+ [ENDPOINTS.key(endpoint_or_region), endpoint_or_region]
22
+ else
23
+ raise DynamoDB::Error, 'Unknown endpoint or region'
24
+ end
25
+ end
26
+
27
+ def self.regions
28
+ ENDPOINTS.values.dup
29
+ end
30
+ end # Endpoint
31
+ end # DynamoDB
@@ -0,0 +1,10 @@
1
+ module DynamoDB
2
+ class Error < StandardError
3
+ attr_reader :data
4
+
5
+ def initialize(error_message, data = {})
6
+ super(error_message)
7
+ @data = data
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ module DynamoDB
2
+ class Iteratorable
3
+ attr_reader :data
4
+ attr_reader :last_evaluated_key
5
+
6
+ def initialize(data, last_evaluated_key)
7
+ @data = data
8
+ @last_evaluated_key = last_evaluated_key
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,1383 @@
1
+ #
2
+ # DO NOT MODIFY!!!!
3
+ # This file is automatically generated by Racc 1.4.9
4
+ # from Racc grammer file "".
5
+ #
6
+
7
+ require 'racc/parser.rb'
8
+
9
+
10
+ require 'strscan'
11
+ require 'ddbcli/ddb-binary'
12
+
13
+ module DynamoDB
14
+
15
+ class Parser < Racc::Parser
16
+
17
+ module_eval(<<'...end ddb-parser.y/module_eval...', 'ddb-parser.y', 461)
18
+
19
+ KEYWORDS = %w(
20
+ ADD
21
+ ALL
22
+ ALTER
23
+ AND
24
+ ASC
25
+ BEGINS_WITH
26
+ BETWEEN
27
+ BINARY
28
+ CREATE
29
+ CONTAINS
30
+ COUNT
31
+ DELETE
32
+ DESCRIBE
33
+ DESC
34
+ DROP
35
+ FROM
36
+ GET
37
+ HASH
38
+ INCLUDE
39
+ INDEX
40
+ INSERT
41
+ INTO
42
+ IN
43
+ IS
44
+ KEYS_ONLY
45
+ LIMIT
46
+ NEXT
47
+ NOT
48
+ NUMBER
49
+ ORDER
50
+ RANGE
51
+ READ
52
+ REGIONS
53
+ SELECT
54
+ SET
55
+ SHOW
56
+ STRING
57
+ TABLES
58
+ TABLE
59
+ UPDATE
60
+ VALUES
61
+ WHERE
62
+ WRITE
63
+ USE
64
+ )
65
+
66
+ KEYWORD_REGEXP = Regexp.compile("(?:#{KEYWORDS.join '|'})", Regexp::IGNORECASE)
67
+
68
+ def initialize(obj)
69
+ src = obj.is_a?(IO) ? obj.read : obj.to_s
70
+ @ss = StringScanner.new(src)
71
+ end
72
+
73
+ @@structs = {}
74
+
75
+ def struct(name, attrs = {})
76
+ unless (clazz = @@structs[name])
77
+ clazz = attrs.empty? ? Struct.new(name.to_s) : Struct.new(name.to_s, *attrs.keys)
78
+ @@structs[name] = clazz
79
+ end
80
+
81
+ obj = clazz.new
82
+
83
+ attrs.each do |key, val|
84
+ obj.send("#{key}=", val)
85
+ end
86
+
87
+ return obj
88
+ end
89
+ private :struct
90
+
91
+ def scan
92
+ tok = nil
93
+
94
+ until @ss.eos?
95
+ if (tok = @ss.scan /\s+/)
96
+ # nothing to do
97
+ elsif (tok = @ss.scan /(?:<>|!=|>=|<=|>|<|=)/)
98
+ sym = {
99
+ '<>' => :NE,
100
+ '!=' => :NE,
101
+ '>=' => :GE,
102
+ '<=' => :LE,
103
+ '>' => :GT,
104
+ '<' => :LT,
105
+ '=' => :EQ,
106
+ }.fetch(tok)
107
+ yield [sym, tok]
108
+ elsif (tok = @ss.scan KEYWORD_REGEXP)
109
+ yield [tok.upcase.to_sym, tok]
110
+ elsif (tok = @ss.scan /NULL/i)
111
+ yield [:NULL, nil]
112
+ elsif (tok = @ss.scan /`(?:[^`]|``)*`/)
113
+ yield [:IDENTIFIER, tok.slice(1...-1).gsub(/``/, '`')]
114
+ elsif (tok = @ss.scan /x'(?:[^']|'')*'/) #'
115
+ hex = tok.slice(2...-1).gsub(/''/, "'")
116
+ bin = DynamoDB::Binary.new([hex].pack('H*'))
117
+ yield [:BINARY_VALUE, bin]
118
+ elsif (tok = @ss.scan /x"(?:[^"]|"")*"/) #"
119
+ hex = tok.slice(2...-1).gsub(/""/, '"')
120
+ bin = DynamoDB::Binary.new([hex].pack('H*'))
121
+ yield [:BINARY_VALUE, bin]
122
+ elsif (tok = @ss.scan /'(?:[^']|'')*'/) #'
123
+ yield [:STRING_VALUE, tok.slice(1...-1).gsub(/''/, "'")]
124
+ elsif (tok = @ss.scan /"(?:[^"]|"")*"/) #"
125
+ yield [:STRING_VALUE, tok.slice(1...-1).gsub(/""/, '"')]
126
+ elsif (tok = @ss.scan /\d+(?:\.\d+)?/)
127
+ yield [:NUMBER_VALUE, (tok =~ /\./ ? tok.to_f : tok.to_i)]
128
+ elsif (tok = @ss.scan /[,\(\)\*]/)
129
+ yield [tok, tok]
130
+ elsif (tok = @ss.scan /\|(?:.*)/)
131
+ yield [:RUBY_SCRIPT, tok.slice(1..-1)]
132
+ elsif (tok = @ss.scan /\!(?:.*)/)
133
+ yield [:SHELL_SCRIPT, tok.slice(1..-1)]
134
+ elsif (tok = @ss.scan /[-.0-9a-z_]*/i)
135
+ yield [:IDENTIFIER, tok]
136
+ else
137
+ raise Racc::ParseError, ('parse error on value "%s"' % @ss.rest.inspect)
138
+ end
139
+ end
140
+
141
+ yield [false, 'EOF']
142
+ end
143
+ private :scan
144
+
145
+ def parse
146
+ yyparse self, :scan
147
+ end
148
+
149
+ def self.parse(obj)
150
+ self.new(obj).parse
151
+ end
152
+
153
+ ...end ddb-parser.y/module_eval...
154
+ ##### State transition tables begin ###
155
+
156
+ racc_action_table = [
157
+ 16, 136, 51, 19, 149, 136, 17, 18, 136, 50,
158
+ 136, 133, 136, 84, 46, 133, 191, 89, 133, 136,
159
+ 133, 91, 133, 136, 20, 21, 22, 23, 136, 133,
160
+ 136, 24, 48, 133, 136, 162, 136, 190, 133, 44,
161
+ 133, 46, 130, 104, 133, 199, 133, 200, 49, 25,
162
+ 134, 135, 26, 27, 134, 135, 28, 134, 135, 134,
163
+ 135, 134, 135, 92, 89, 63, 44, 93, 134, 135,
164
+ 169, 94, 134, 135, 163, 164, 96, 134, 135, 134,
165
+ 135, 104, 46, 134, 135, 134, 135, 177, 170, 171,
166
+ 172, 173, 174, 176, 178, 181, 182, 183, 43, 169,
167
+ 76, 76, 110, 77, 77, 98, 42, 44, 118, 119,
168
+ 120, 118, 119, 120, 211, 210, 194, 170, 171, 172,
169
+ 173, 174, 248, 201, 241, 202, 240, 266, 241, 267,
170
+ 32, 33, 34, 118, 119, 120, 260, 261, 262, 144,
171
+ 203, 145, 204, 67, 68, 30, 31, 67, 68, 99,
172
+ 100, 101, 89, 83, 105, 87, 109, 110, 113, 114,
173
+ 115, 116, 82, 122, 123, 124, 110, 126, 87, 81,
174
+ 80, 138, 139, 142, 55, 79, 146, 147, 78, 87,
175
+ 151, 154, 155, 156, 55, 158, 74, 55, 109, 73,
176
+ 168, 72, 184, 185, 186, 187, 188, 55, 71, 192,
177
+ 70, 196, 98, 198, 69, 65, 64, 142, 61, 136,
178
+ 60, 59, 212, 214, 215, 216, 217, 154, 58, 57,
179
+ 221, 122, 110, 224, 225, 226, 227, 228, 229, 56,
180
+ 232, 233, 55, 235, 151, 55, 53, 239, 52, 242,
181
+ 40, 55, 39, 38, 247, 37, 251, 252, 253, 251,
182
+ 255, 256, 36, 258, 35, 263, 265, 29, 268 ]
183
+
184
+ racc_action_check = [
185
+ 0, 139, 26, 0, 117, 105, 0, 0, 175, 26,
186
+ 177, 139, 193, 65, 24, 105, 151, 70, 175, 227,
187
+ 177, 71, 193, 241, 0, 0, 0, 0, 239, 227,
188
+ 235, 0, 25, 241, 214, 136, 194, 151, 239, 24,
189
+ 235, 43, 105, 85, 214, 159, 194, 159, 25, 0,
190
+ 139, 139, 0, 0, 105, 105, 0, 175, 175, 177,
191
+ 177, 193, 193, 72, 85, 43, 43, 76, 227, 227,
192
+ 142, 77, 241, 241, 136, 136, 78, 239, 239, 235,
193
+ 235, 106, 23, 214, 214, 194, 194, 142, 142, 142,
194
+ 142, 142, 142, 142, 142, 142, 142, 142, 23, 154,
195
+ 116, 57, 106, 116, 57, 79, 23, 23, 217, 217,
196
+ 217, 256, 256, 256, 178, 178, 154, 154, 154, 154,
197
+ 154, 154, 245, 160, 245, 160, 230, 264, 230, 264,
198
+ 16, 16, 16, 96, 96, 96, 258, 258, 258, 112,
199
+ 161, 112, 161, 48, 48, 2, 2, 69, 69, 80,
200
+ 81, 82, 84, 64, 87, 88, 89, 91, 92, 93,
201
+ 94, 95, 63, 97, 98, 99, 100, 101, 104, 62,
202
+ 61, 107, 109, 110, 111, 60, 114, 115, 58, 66,
203
+ 121, 122, 123, 124, 125, 126, 56, 137, 138, 55,
204
+ 140, 52, 144, 145, 146, 147, 149, 150, 51, 152,
205
+ 50, 155, 156, 158, 49, 47, 45, 168, 42, 176,
206
+ 41, 38, 183, 184, 186, 187, 188, 192, 37, 35,
207
+ 196, 197, 198, 200, 202, 204, 208, 211, 213, 34,
208
+ 215, 216, 32, 220, 222, 223, 29, 229, 27, 234,
209
+ 22, 236, 21, 20, 242, 19, 247, 249, 251, 252,
210
+ 253, 255, 18, 257, 17, 262, 263, 1, 267 ]
211
+
212
+ racc_action_pointer = [
213
+ -4, 257, 143, nil, nil, nil, nil, nil, nil, nil,
214
+ nil, nil, nil, nil, nil, nil, 125, 246, 243, 237,
215
+ 235, 233, 231, 73, 5, 23, -23, 180, nil, 236,
216
+ nil, nil, 180, nil, 221, 210, nil, 209, 202, nil,
217
+ nil, 178, 196, 32, nil, 191, nil, 173, 89, 195,
218
+ 191, 166, 182, nil, nil, 167, 177, 81, 166, nil,
219
+ 166, 136, 137, 150, 144, 4, 170, nil, nil, 93,
220
+ -19, 12, 51, nil, nil, nil, 46, 50, 67, 94,
221
+ 136, 141, 117, nil, 116, 28, nil, 133, 146, 147,
222
+ nil, 121, 149, 137, 138, 148, 116, 127, 140, 133,
223
+ 130, 154, nil, nil, 159, -7, 66, 134, nil, 151,
224
+ 164, 122, 126, nil, 161, 162, 80, -10, nil, nil,
225
+ nil, 130, 172, 170, 174, 132, 153, nil, nil, nil,
226
+ nil, nil, nil, nil, nil, nil, 13, 135, 179, -11,
227
+ 153, nil, 49, nil, 133, 184, 171, 175, nil, 181,
228
+ 145, -14, 162, nil, 78, 192, 191, nil, 194, 32,
229
+ 110, 127, nil, nil, nil, nil, nil, nil, 198, nil,
230
+ nil, nil, nil, nil, nil, -4, 197, -2, 66, nil,
231
+ nil, nil, nil, 165, 201, nil, 193, 194, 207, nil,
232
+ nil, nil, 208, 0, 24, nil, 207, 185, 186, nil,
233
+ 201, nil, 163, nil, 163, nil, nil, nil, 189, nil,
234
+ nil, 178, nil, 213, 22, 208, 209, 91, nil, nil,
235
+ 196, nil, 184, 183, nil, nil, nil, 7, nil, 225,
236
+ 113, nil, nil, nil, 223, 18, 189, nil, nil, 16,
237
+ nil, 11, 229, nil, nil, 109, nil, 222, nil, 232,
238
+ nil, 239, 225, 238, nil, 242, 94, 240, 111, nil,
239
+ nil, nil, 243, 247, 114, nil, nil, 249, nil ]
240
+
241
+ racc_action_default = [
242
+ -123, -123, -1, -4, -5, -6, -7, -8, -9, -10,
243
+ -11, -12, -13, -14, -15, -16, -123, -123, -123, -123,
244
+ -123, -123, -123, -123, -123, -123, -123, -123, -106, -123,
245
+ -2, -3, -84, -18, -123, -123, -21, -123, -123, -40,
246
+ -41, -123, -123, -123, -47, -48, -49, -123, -123, -123,
247
+ -123, -123, -123, 269, -17, -123, -123, -123, -123, -39,
248
+ -123, -123, -123, -123, -123, -123, -123, -88, -89, -123,
249
+ -123, -123, -123, -85, -19, -20, -123, -123, -123, -51,
250
+ -123, -123, -123, -50, -123, -123, -90, -123, -123, -123,
251
+ -97, -66, -123, -123, -123, -123, -123, -53, -123, -123,
252
+ -66, -123, -46, -86, -123, -123, -66, -93, -94, -123,
253
+ -123, -84, -123, -100, -123, -123, -123, -123, -26, -27,
254
+ -28, -81, -123, -123, -123, -84, -123, -91, -92, -107,
255
+ -108, -109, -110, -111, -112, -113, -123, -84, -123, -123,
256
+ -67, -68, -123, -98, -123, -123, -123, -123, -22, -23,
257
+ -84, -123, -54, -55, -123, -123, -51, -44, -123, -123,
258
+ -123, -123, -117, -119, -121, -87, -95, -96, -123, -60,
259
+ -61, -62, -63, -64, -65, -123, -123, -123, -123, -74,
260
+ -75, -76, -77, -123, -123, -101, -123, -123, -123, -42,
261
+ -82, -83, -123, -123, -123, -59, -123, -53, -66, -114,
262
+ -123, -115, -123, -116, -123, -69, -70, -71, -123, -73,
263
+ -79, -123, -78, -99, -123, -123, -123, -123, -56, -57,
264
+ -123, -52, -81, -84, -118, -120, -122, -123, -80, -123,
265
+ -123, -104, -29, -30, -123, -123, -84, -45, -72, -123,
266
+ -102, -123, -24, -58, -43, -123, -105, -123, -103, -25,
267
+ -31, -123, -123, -123, -32, -123, -123, -123, -123, -33,
268
+ -34, -35, -123, -123, -123, -37, -36, -123, -38 ]
269
+
270
+ racc_goto_table = [
271
+ 54, 117, 129, 111, 121, 150, 97, 153, 75, 108,
272
+ 141, 85, 125, 230, 66, 90, 179, 250, 137, 41,
273
+ 47, 1, 254, 249, 15, 259, 264, 14, 195, 102,
274
+ 103, 13, 12, 106, 95, 88, 167, 11, 245, 62,
275
+ 10, 152, 9, 193, 8, 7, 140, 6, 175, 207,
276
+ 209, 180, 5, 4, 127, 128, 107, 3, 166, 112,
277
+ 213, 2, 159, 160, 161, nil, nil, 148, 205, nil,
278
+ nil, nil, 206, nil, 208, nil, nil, 218, nil, 143,
279
+ nil, nil, nil, 197, nil, nil, nil, nil, nil, nil,
280
+ 219, 220, nil, 157, nil, nil, nil, nil, nil, nil,
281
+ nil, nil, nil, nil, 222, 165, 236, nil, nil, nil,
282
+ 223, nil, nil, nil, nil, nil, nil, nil, 189, nil,
283
+ nil, nil, 234, nil, 238, nil, nil, nil, nil, nil,
284
+ nil, nil, 243, nil, nil, nil, nil, nil, 246, nil,
285
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
286
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
287
+ nil, 257, nil, nil, nil, nil, nil, nil, nil, nil,
288
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
289
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
290
+ nil, 237, nil, nil, nil, nil, nil, nil, nil, nil,
291
+ nil, nil, nil, nil, 244 ]
292
+
293
+ racc_goto_check = [
294
+ 16, 19, 34, 28, 26, 27, 25, 32, 17, 47,
295
+ 37, 43, 28, 50, 42, 29, 35, 21, 28, 24,
296
+ 24, 1, 21, 20, 15, 22, 23, 14, 35, 29,
297
+ 29, 13, 12, 43, 18, 42, 34, 11, 50, 24,
298
+ 10, 31, 9, 33, 8, 7, 36, 6, 38, 39,
299
+ 40, 41, 5, 4, 44, 45, 46, 3, 47, 48,
300
+ 49, 2, 52, 53, 54, nil, nil, 17, 37, nil,
301
+ nil, nil, 34, nil, 34, nil, nil, 32, nil, 16,
302
+ nil, nil, nil, 25, nil, nil, nil, nil, nil, nil,
303
+ 34, 34, nil, 16, nil, nil, nil, nil, nil, nil,
304
+ nil, nil, nil, nil, 26, 16, 27, nil, nil, nil,
305
+ 28, nil, nil, nil, nil, nil, nil, nil, 16, nil,
306
+ nil, nil, 19, nil, 34, nil, nil, nil, nil, nil,
307
+ nil, nil, 34, nil, nil, nil, nil, nil, 34, nil,
308
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
309
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
310
+ nil, 19, nil, nil, nil, nil, nil, nil, nil, nil,
311
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
312
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
313
+ nil, 16, nil, nil, nil, nil, nil, nil, nil, nil,
314
+ nil, nil, nil, nil, 16 ]
315
+
316
+ racc_goto_pointer = [
317
+ nil, 21, 61, 57, 53, 52, 47, 45, 44, 42,
318
+ 40, 37, 32, 31, 27, 24, -32, -49, -44, -95,
319
+ -224, -230, -233, -237, -4, -73, -93, -116, -88, -55,
320
+ nil, -81, -115, -111, -103, -126, -64, -100, -94, -127,
321
+ -128, -91, -34, -55, -50, -50, -33, -80, -33, -124,
322
+ -201, nil, -74, -73, -72 ]
323
+
324
+ racc_goto_default = [
325
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
326
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
327
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
328
+ 45, nil, nil, nil, 231, nil, nil, nil, nil, 132,
329
+ nil, nil, nil, nil, 86, nil, nil, nil, nil, nil,
330
+ nil, 131, nil, nil, nil ]
331
+
332
+ racc_reduce_table = [
333
+ 0, 0, :racc_error,
334
+ 1, 64, :_reduce_1,
335
+ 2, 64, :_reduce_2,
336
+ 2, 64, :_reduce_3,
337
+ 1, 65, :_reduce_none,
338
+ 1, 65, :_reduce_none,
339
+ 1, 65, :_reduce_none,
340
+ 1, 65, :_reduce_none,
341
+ 1, 65, :_reduce_none,
342
+ 1, 65, :_reduce_none,
343
+ 1, 65, :_reduce_none,
344
+ 1, 65, :_reduce_none,
345
+ 1, 65, :_reduce_none,
346
+ 1, 65, :_reduce_none,
347
+ 1, 65, :_reduce_none,
348
+ 1, 65, :_reduce_none,
349
+ 1, 65, :_reduce_none,
350
+ 3, 66, :_reduce_17,
351
+ 2, 66, :_reduce_18,
352
+ 4, 66, :_reduce_19,
353
+ 4, 67, :_reduce_20,
354
+ 2, 68, :_reduce_21,
355
+ 7, 69, :_reduce_22,
356
+ 3, 81, :_reduce_23,
357
+ 7, 81, :_reduce_24,
358
+ 9, 81, :_reduce_25,
359
+ 1, 82, :_reduce_26,
360
+ 1, 82, :_reduce_27,
361
+ 1, 82, :_reduce_28,
362
+ 7, 80, :_reduce_29,
363
+ 7, 80, :_reduce_30,
364
+ 1, 83, :_reduce_31,
365
+ 3, 83, :_reduce_32,
366
+ 7, 84, :_reduce_33,
367
+ 1, 85, :_reduce_34,
368
+ 1, 85, :_reduce_35,
369
+ 4, 85, :_reduce_36,
370
+ 1, 86, :_reduce_37,
371
+ 3, 86, :_reduce_38,
372
+ 3, 70, :_reduce_39,
373
+ 2, 71, :_reduce_40,
374
+ 2, 71, :_reduce_41,
375
+ 8, 72, :_reduce_42,
376
+ 11, 72, :_reduce_43,
377
+ 7, 73, :_reduce_44,
378
+ 10, 73, :_reduce_45,
379
+ 5, 74, :_reduce_46,
380
+ 1, 87, :_reduce_47,
381
+ 1, 87, :_reduce_48,
382
+ 1, 93, :_reduce_49,
383
+ 3, 93, :_reduce_50,
384
+ 0, 88, :_reduce_none,
385
+ 5, 88, :_reduce_52,
386
+ 0, 89, :_reduce_none,
387
+ 2, 89, :_reduce_54,
388
+ 1, 94, :_reduce_55,
389
+ 3, 94, :_reduce_56,
390
+ 3, 95, :_reduce_57,
391
+ 5, 95, :_reduce_58,
392
+ 1, 96, :_reduce_none,
393
+ 1, 98, :_reduce_60,
394
+ 1, 98, :_reduce_61,
395
+ 1, 98, :_reduce_62,
396
+ 1, 98, :_reduce_63,
397
+ 1, 98, :_reduce_64,
398
+ 1, 98, :_reduce_none,
399
+ 0, 91, :_reduce_none,
400
+ 2, 91, :_reduce_67,
401
+ 1, 99, :_reduce_68,
402
+ 3, 99, :_reduce_69,
403
+ 3, 100, :_reduce_70,
404
+ 3, 100, :_reduce_71,
405
+ 5, 100, :_reduce_72,
406
+ 3, 100, :_reduce_73,
407
+ 1, 101, :_reduce_none,
408
+ 1, 101, :_reduce_none,
409
+ 1, 101, :_reduce_76,
410
+ 1, 104, :_reduce_none,
411
+ 2, 104, :_reduce_78,
412
+ 1, 103, :_reduce_79,
413
+ 2, 103, :_reduce_80,
414
+ 0, 90, :_reduce_none,
415
+ 2, 90, :_reduce_82,
416
+ 2, 90, :_reduce_83,
417
+ 0, 79, :_reduce_none,
418
+ 2, 79, :_reduce_85,
419
+ 5, 75, :_reduce_86,
420
+ 7, 75, :_reduce_87,
421
+ 1, 105, :_reduce_88,
422
+ 1, 105, :_reduce_89,
423
+ 1, 106, :_reduce_90,
424
+ 3, 106, :_reduce_91,
425
+ 3, 107, :_reduce_92,
426
+ 2, 92, :_reduce_93,
427
+ 1, 109, :_reduce_94,
428
+ 3, 109, :_reduce_95,
429
+ 3, 110, :_reduce_96,
430
+ 4, 76, :_reduce_97,
431
+ 6, 76, :_reduce_98,
432
+ 8, 77, :_reduce_99,
433
+ 1, 111, :_reduce_100,
434
+ 3, 111, :_reduce_101,
435
+ 3, 112, :_reduce_102,
436
+ 5, 112, :_reduce_103,
437
+ 1, 113, :_reduce_104,
438
+ 3, 113, :_reduce_105,
439
+ 1, 78, :_reduce_106,
440
+ 1, 108, :_reduce_none,
441
+ 1, 108, :_reduce_none,
442
+ 1, 97, :_reduce_none,
443
+ 1, 97, :_reduce_none,
444
+ 1, 114, :_reduce_none,
445
+ 1, 114, :_reduce_none,
446
+ 1, 114, :_reduce_none,
447
+ 3, 102, :_reduce_114,
448
+ 3, 102, :_reduce_115,
449
+ 3, 102, :_reduce_116,
450
+ 1, 115, :_reduce_117,
451
+ 3, 115, :_reduce_118,
452
+ 1, 116, :_reduce_119,
453
+ 3, 116, :_reduce_120,
454
+ 1, 117, :_reduce_121,
455
+ 3, 117, :_reduce_122 ]
456
+
457
+ racc_reduce_n = 123
458
+
459
+ racc_shift_n = 269
460
+
461
+ racc_token_table = {
462
+ false => 0,
463
+ :error => 1,
464
+ :RUBY_SCRIPT => 2,
465
+ :SHELL_SCRIPT => 3,
466
+ :SHOW => 4,
467
+ :TABLES => 5,
468
+ :REGIONS => 6,
469
+ :CREATE => 7,
470
+ :TABLE => 8,
471
+ :IDENTIFIER => 9,
472
+ :ALTER => 10,
473
+ :USE => 11,
474
+ "(" => 12,
475
+ ")" => 13,
476
+ :HASH => 14,
477
+ "," => 15,
478
+ :RANGE => 16,
479
+ :STRING => 17,
480
+ :NUMBER => 18,
481
+ :BINARY => 19,
482
+ :READ => 20,
483
+ :EQ => 21,
484
+ :NUMBER_VALUE => 22,
485
+ :WRITE => 23,
486
+ :INDEX => 24,
487
+ :ALL => 25,
488
+ :KEYS_ONLY => 26,
489
+ :INCLUDE => 27,
490
+ :DROP => 28,
491
+ :DESCRIBE => 29,
492
+ :DESC => 30,
493
+ :SELECT => 31,
494
+ :FROM => 32,
495
+ :COUNT => 33,
496
+ "*" => 34,
497
+ :GET => 35,
498
+ :WHERE => 36,
499
+ :AND => 37,
500
+ :BETWEEN => 38,
501
+ :LE => 39,
502
+ :LT => 40,
503
+ :GE => 41,
504
+ :GT => 42,
505
+ :BEGINS_WITH => 43,
506
+ :IN => 44,
507
+ :IS => 45,
508
+ :NE => 46,
509
+ :CONTAINS => 47,
510
+ :NOT => 48,
511
+ :NULL => 49,
512
+ :ORDER => 50,
513
+ :ASC => 51,
514
+ :LIMIT => 52,
515
+ :UPDATE => 53,
516
+ :SET => 54,
517
+ :ADD => 55,
518
+ :DELETE => 56,
519
+ :INSERT => 57,
520
+ :INTO => 58,
521
+ :VALUES => 59,
522
+ :NEXT => 60,
523
+ :STRING_VALUE => 61,
524
+ :BINARY_VALUE => 62 }
525
+
526
+ racc_nt_base = 63
527
+
528
+ racc_use_result_var = false
529
+
530
+ Racc_arg = [
531
+ racc_action_table,
532
+ racc_action_check,
533
+ racc_action_default,
534
+ racc_action_pointer,
535
+ racc_goto_table,
536
+ racc_goto_check,
537
+ racc_goto_default,
538
+ racc_goto_pointer,
539
+ racc_nt_base,
540
+ racc_reduce_table,
541
+ racc_token_table,
542
+ racc_shift_n,
543
+ racc_reduce_n,
544
+ racc_use_result_var ]
545
+
546
+ Racc_token_to_s_table = [
547
+ "$end",
548
+ "error",
549
+ "RUBY_SCRIPT",
550
+ "SHELL_SCRIPT",
551
+ "SHOW",
552
+ "TABLES",
553
+ "REGIONS",
554
+ "CREATE",
555
+ "TABLE",
556
+ "IDENTIFIER",
557
+ "ALTER",
558
+ "USE",
559
+ "\"(\"",
560
+ "\")\"",
561
+ "HASH",
562
+ "\",\"",
563
+ "RANGE",
564
+ "STRING",
565
+ "NUMBER",
566
+ "BINARY",
567
+ "READ",
568
+ "EQ",
569
+ "NUMBER_VALUE",
570
+ "WRITE",
571
+ "INDEX",
572
+ "ALL",
573
+ "KEYS_ONLY",
574
+ "INCLUDE",
575
+ "DROP",
576
+ "DESCRIBE",
577
+ "DESC",
578
+ "SELECT",
579
+ "FROM",
580
+ "COUNT",
581
+ "\"*\"",
582
+ "GET",
583
+ "WHERE",
584
+ "AND",
585
+ "BETWEEN",
586
+ "LE",
587
+ "LT",
588
+ "GE",
589
+ "GT",
590
+ "BEGINS_WITH",
591
+ "IN",
592
+ "IS",
593
+ "NE",
594
+ "CONTAINS",
595
+ "NOT",
596
+ "NULL",
597
+ "ORDER",
598
+ "ASC",
599
+ "LIMIT",
600
+ "UPDATE",
601
+ "SET",
602
+ "ADD",
603
+ "DELETE",
604
+ "INSERT",
605
+ "INTO",
606
+ "VALUES",
607
+ "NEXT",
608
+ "STRING_VALUE",
609
+ "BINARY_VALUE",
610
+ "$start",
611
+ "stmt",
612
+ "query",
613
+ "show_stmt",
614
+ "alter_stmt",
615
+ "use_stmt",
616
+ "create_stmt",
617
+ "drop_stmt",
618
+ "describe_stmt",
619
+ "select_stmt",
620
+ "scan_stmt",
621
+ "get_stmt",
622
+ "update_stmt",
623
+ "delete_stmt",
624
+ "insert_stmt",
625
+ "next_stmt",
626
+ "limit_clause",
627
+ "capacity_clause",
628
+ "create_definition",
629
+ "attr_type_list",
630
+ "index_definition_list",
631
+ "index_definition",
632
+ "index_type_definition",
633
+ "index_include_attr_list",
634
+ "attrs_to_get",
635
+ "use_index_clause",
636
+ "select_where_clause",
637
+ "order_clause",
638
+ "scan_where_clause",
639
+ "update_where_clause",
640
+ "attrs_list",
641
+ "select_expr_list",
642
+ "select_expr",
643
+ "select_operator",
644
+ "value",
645
+ "common_operator",
646
+ "scan_expr_list",
647
+ "scan_expr",
648
+ "scan_operator",
649
+ "value_list",
650
+ "null_operator",
651
+ "contains_operator",
652
+ "set_or_add",
653
+ "attr_to_update_list",
654
+ "attr_to_update",
655
+ "value_or_null",
656
+ "update_expr_list",
657
+ "update_expr",
658
+ "attr_to_insert_list",
659
+ "insert_value_clause",
660
+ "insert_value_list",
661
+ "single_value",
662
+ "number_list",
663
+ "string_list",
664
+ "binary_list" ]
665
+
666
+ Racc_debug_parser = false
667
+
668
+ ##### State transition tables end #####
669
+
670
+ # reduce 0 omitted
671
+
672
+ module_eval(<<'.,.,', 'ddb-parser.y', 5)
673
+ def _reduce_1(val, _values)
674
+ [val[0], nil, nil]
675
+
676
+ end
677
+ .,.,
678
+
679
+ module_eval(<<'.,.,', 'ddb-parser.y', 9)
680
+ def _reduce_2(val, _values)
681
+ [val[0], :ruby, val[1]]
682
+
683
+ end
684
+ .,.,
685
+
686
+ module_eval(<<'.,.,', 'ddb-parser.y', 13)
687
+ def _reduce_3(val, _values)
688
+ [val[0], :shell, val[1]]
689
+
690
+ end
691
+ .,.,
692
+
693
+ # reduce 4 omitted
694
+
695
+ # reduce 5 omitted
696
+
697
+ # reduce 6 omitted
698
+
699
+ # reduce 7 omitted
700
+
701
+ # reduce 8 omitted
702
+
703
+ # reduce 9 omitted
704
+
705
+ # reduce 10 omitted
706
+
707
+ # reduce 11 omitted
708
+
709
+ # reduce 12 omitted
710
+
711
+ # reduce 13 omitted
712
+
713
+ # reduce 14 omitted
714
+
715
+ # reduce 15 omitted
716
+
717
+ # reduce 16 omitted
718
+
719
+ module_eval(<<'.,.,', 'ddb-parser.y', 32)
720
+ def _reduce_17(val, _values)
721
+ struct(:SHOW_TABLES, :limit => val[2])
722
+
723
+ end
724
+ .,.,
725
+
726
+ module_eval(<<'.,.,', 'ddb-parser.y', 36)
727
+ def _reduce_18(val, _values)
728
+ struct(:SHOW_REGIONS)
729
+
730
+ end
731
+ .,.,
732
+
733
+ module_eval(<<'.,.,', 'ddb-parser.y', 40)
734
+ def _reduce_19(val, _values)
735
+ struct(:SHOW_CREATE_TABLE, :table => val[3])
736
+
737
+ end
738
+ .,.,
739
+
740
+ module_eval(<<'.,.,', 'ddb-parser.y', 45)
741
+ def _reduce_20(val, _values)
742
+ struct(:ALTER_TABLE, :table => val[2], :capacity => val[3])
743
+
744
+ end
745
+ .,.,
746
+
747
+ module_eval(<<'.,.,', 'ddb-parser.y', 50)
748
+ def _reduce_21(val, _values)
749
+ struct(:USE, :endpoint_or_region => val[1])
750
+
751
+ end
752
+ .,.,
753
+
754
+ module_eval(<<'.,.,', 'ddb-parser.y', 55)
755
+ def _reduce_22(val, _values)
756
+ struct(:CREATE, val[4].merge(:table => val[2], :capacity => val[6]))
757
+
758
+ end
759
+ .,.,
760
+
761
+ module_eval(<<'.,.,', 'ddb-parser.y', 60)
762
+ def _reduce_23(val, _values)
763
+ {:hash => {:name => val[0], :type => val[1]}, :range => nil, :indices => nil}
764
+
765
+ end
766
+ .,.,
767
+
768
+ module_eval(<<'.,.,', 'ddb-parser.y', 64)
769
+ def _reduce_24(val, _values)
770
+ {:hash => {:name => val[0], :type => val[1]}, :range => {:name => val[4], :type => val[5]}, :indices => nil}
771
+
772
+ end
773
+ .,.,
774
+
775
+ module_eval(<<'.,.,', 'ddb-parser.y', 68)
776
+ def _reduce_25(val, _values)
777
+ {:hash => {:name => val[0], :type => val[1]}, :range => {:name => val[4], :type => val[5]}, :indices => val[8]}
778
+
779
+ end
780
+ .,.,
781
+
782
+ module_eval(<<'.,.,', 'ddb-parser.y', 73)
783
+ def _reduce_26(val, _values)
784
+ 'S'
785
+
786
+ end
787
+ .,.,
788
+
789
+ module_eval(<<'.,.,', 'ddb-parser.y', 77)
790
+ def _reduce_27(val, _values)
791
+ 'N'
792
+
793
+ end
794
+ .,.,
795
+
796
+ module_eval(<<'.,.,', 'ddb-parser.y', 81)
797
+ def _reduce_28(val, _values)
798
+ 'B'
799
+
800
+ end
801
+ .,.,
802
+
803
+ module_eval(<<'.,.,', 'ddb-parser.y', 86)
804
+ def _reduce_29(val, _values)
805
+ {:read => val[2], :write => val[6]}
806
+
807
+ end
808
+ .,.,
809
+
810
+ module_eval(<<'.,.,', 'ddb-parser.y', 90)
811
+ def _reduce_30(val, _values)
812
+ {:read => val[6], :write => val[2]}
813
+
814
+ end
815
+ .,.,
816
+
817
+ module_eval(<<'.,.,', 'ddb-parser.y', 95)
818
+ def _reduce_31(val, _values)
819
+ [val[0]]
820
+
821
+ end
822
+ .,.,
823
+
824
+ module_eval(<<'.,.,', 'ddb-parser.y', 99)
825
+ def _reduce_32(val, _values)
826
+ val[0] + [val[2]]
827
+
828
+ end
829
+ .,.,
830
+
831
+ module_eval(<<'.,.,', 'ddb-parser.y', 104)
832
+ def _reduce_33(val, _values)
833
+ {:name => val[1], :key => val[3], :type => val[4], :projection => val[6]}
834
+
835
+ end
836
+ .,.,
837
+
838
+ module_eval(<<'.,.,', 'ddb-parser.y', 109)
839
+ def _reduce_34(val, _values)
840
+ {:type => 'ALL'}
841
+
842
+ end
843
+ .,.,
844
+
845
+ module_eval(<<'.,.,', 'ddb-parser.y', 113)
846
+ def _reduce_35(val, _values)
847
+ {:type => 'KEYS_ONLY'}
848
+
849
+ end
850
+ .,.,
851
+
852
+ module_eval(<<'.,.,', 'ddb-parser.y', 117)
853
+ def _reduce_36(val, _values)
854
+ {:type => 'INCLUDE', :attrs => val[2]}
855
+
856
+ end
857
+ .,.,
858
+
859
+ module_eval(<<'.,.,', 'ddb-parser.y', 122)
860
+ def _reduce_37(val, _values)
861
+ [val[0]]
862
+
863
+ end
864
+ .,.,
865
+
866
+ module_eval(<<'.,.,', 'ddb-parser.y', 126)
867
+ def _reduce_38(val, _values)
868
+ val[0] + [val[2]]
869
+
870
+ end
871
+ .,.,
872
+
873
+ module_eval(<<'.,.,', 'ddb-parser.y', 131)
874
+ def _reduce_39(val, _values)
875
+ struct(:DROP, :table => val[2])
876
+
877
+ end
878
+ .,.,
879
+
880
+ module_eval(<<'.,.,', 'ddb-parser.y', 136)
881
+ def _reduce_40(val, _values)
882
+ struct(:DESCRIBE, :table => val[1])
883
+
884
+ end
885
+ .,.,
886
+
887
+ module_eval(<<'.,.,', 'ddb-parser.y', 140)
888
+ def _reduce_41(val, _values)
889
+ struct(:DESCRIBE, :table => val[1])
890
+
891
+ end
892
+ .,.,
893
+
894
+ module_eval(<<'.,.,', 'ddb-parser.y', 145)
895
+ def _reduce_42(val, _values)
896
+ struct(:SELECT, :attrs => val[1], :table => val[3], :index => val[4], :conds => val[5], :order_asc => val[6], :limit => val[7], :count => false)
897
+
898
+ end
899
+ .,.,
900
+
901
+ module_eval(<<'.,.,', 'ddb-parser.y', 149)
902
+ def _reduce_43(val, _values)
903
+ struct(:SELECT, :attrs => [], :table => val[6], :index => val[7], :conds => val[8], :order_asc => val[9], :limit => val[10], :count => true)
904
+
905
+ end
906
+ .,.,
907
+
908
+ module_eval(<<'.,.,', 'ddb-parser.y', 154)
909
+ def _reduce_44(val, _values)
910
+ struct(:SCAN, :attrs => val[2], :table => val[4], :conds => val[5], :limit => val[6], :count => false)
911
+
912
+ end
913
+ .,.,
914
+
915
+ module_eval(<<'.,.,', 'ddb-parser.y', 158)
916
+ def _reduce_45(val, _values)
917
+ struct(:SCAN, :attrs => [], :table => val[7], :conds => val[8], :limit => val[9], :count => true)
918
+
919
+ end
920
+ .,.,
921
+
922
+ module_eval(<<'.,.,', 'ddb-parser.y', 163)
923
+ def _reduce_46(val, _values)
924
+ struct(:GET, :attrs => val[1], :table => val[3], :conds => val[4])
925
+
926
+ end
927
+ .,.,
928
+
929
+ module_eval(<<'.,.,', 'ddb-parser.y', 168)
930
+ def _reduce_47(val, _values)
931
+ []
932
+
933
+ end
934
+ .,.,
935
+
936
+ module_eval(<<'.,.,', 'ddb-parser.y', 172)
937
+ def _reduce_48(val, _values)
938
+ val[0]
939
+
940
+ end
941
+ .,.,
942
+
943
+ module_eval(<<'.,.,', 'ddb-parser.y', 177)
944
+ def _reduce_49(val, _values)
945
+ [val[0]]
946
+
947
+ end
948
+ .,.,
949
+
950
+ module_eval(<<'.,.,', 'ddb-parser.y', 181)
951
+ def _reduce_50(val, _values)
952
+ val[0] + [val[2]]
953
+
954
+ end
955
+ .,.,
956
+
957
+ # reduce 51 omitted
958
+
959
+ module_eval(<<'.,.,', 'ddb-parser.y', 187)
960
+ def _reduce_52(val, _values)
961
+ val[3]
962
+
963
+ end
964
+ .,.,
965
+
966
+ # reduce 53 omitted
967
+
968
+ module_eval(<<'.,.,', 'ddb-parser.y', 193)
969
+ def _reduce_54(val, _values)
970
+ val[1]
971
+
972
+ end
973
+ .,.,
974
+
975
+ module_eval(<<'.,.,', 'ddb-parser.y', 198)
976
+ def _reduce_55(val, _values)
977
+ [val[0]]
978
+
979
+ end
980
+ .,.,
981
+
982
+ module_eval(<<'.,.,', 'ddb-parser.y', 202)
983
+ def _reduce_56(val, _values)
984
+ val[0] + [val[2]]
985
+
986
+ end
987
+ .,.,
988
+
989
+ module_eval(<<'.,.,', 'ddb-parser.y', 207)
990
+ def _reduce_57(val, _values)
991
+ [val[0], val[1].to_s.upcase.to_sym, [val[2]]]
992
+
993
+ end
994
+ .,.,
995
+
996
+ module_eval(<<'.,.,', 'ddb-parser.y', 211)
997
+ def _reduce_58(val, _values)
998
+ [val[0], val[1].to_s.upcase.to_sym, [val[2], val[4]]]
999
+
1000
+ end
1001
+ .,.,
1002
+
1003
+ # reduce 59 omitted
1004
+
1005
+ module_eval(<<'.,.,', 'ddb-parser.y', 218)
1006
+ def _reduce_60(val, _values)
1007
+ :EQ
1008
+
1009
+ end
1010
+ .,.,
1011
+
1012
+ module_eval(<<'.,.,', 'ddb-parser.y', 222)
1013
+ def _reduce_61(val, _values)
1014
+ :LE
1015
+
1016
+ end
1017
+ .,.,
1018
+
1019
+ module_eval(<<'.,.,', 'ddb-parser.y', 226)
1020
+ def _reduce_62(val, _values)
1021
+ :LT
1022
+
1023
+ end
1024
+ .,.,
1025
+
1026
+ module_eval(<<'.,.,', 'ddb-parser.y', 230)
1027
+ def _reduce_63(val, _values)
1028
+ :GE
1029
+
1030
+ end
1031
+ .,.,
1032
+
1033
+ module_eval(<<'.,.,', 'ddb-parser.y', 234)
1034
+ def _reduce_64(val, _values)
1035
+ :GT
1036
+
1037
+ end
1038
+ .,.,
1039
+
1040
+ # reduce 65 omitted
1041
+
1042
+ # reduce 66 omitted
1043
+
1044
+ module_eval(<<'.,.,', 'ddb-parser.y', 241)
1045
+ def _reduce_67(val, _values)
1046
+ val[1]
1047
+
1048
+ end
1049
+ .,.,
1050
+
1051
+ module_eval(<<'.,.,', 'ddb-parser.y', 246)
1052
+ def _reduce_68(val, _values)
1053
+ [val[0]]
1054
+
1055
+ end
1056
+ .,.,
1057
+
1058
+ module_eval(<<'.,.,', 'ddb-parser.y', 250)
1059
+ def _reduce_69(val, _values)
1060
+ val[0] + [val[2]]
1061
+
1062
+ end
1063
+ .,.,
1064
+
1065
+ module_eval(<<'.,.,', 'ddb-parser.y', 255)
1066
+ def _reduce_70(val, _values)
1067
+ [val[0], val[1].to_s.upcase.to_sym, [val[2]]]
1068
+
1069
+ end
1070
+ .,.,
1071
+
1072
+ module_eval(<<'.,.,', 'ddb-parser.y', 259)
1073
+ def _reduce_71(val, _values)
1074
+ [val[0], val[1].to_s.upcase.to_sym, val[2]]
1075
+
1076
+ end
1077
+ .,.,
1078
+
1079
+ module_eval(<<'.,.,', 'ddb-parser.y', 263)
1080
+ def _reduce_72(val, _values)
1081
+ [val[0], val[1].to_s.upcase.to_sym, [val[2], val[4]]]
1082
+
1083
+ end
1084
+ .,.,
1085
+
1086
+ module_eval(<<'.,.,', 'ddb-parser.y', 267)
1087
+ def _reduce_73(val, _values)
1088
+ [val[0], val[2].to_s.upcase.to_sym, []]
1089
+
1090
+ end
1091
+ .,.,
1092
+
1093
+ # reduce 74 omitted
1094
+
1095
+ # reduce 75 omitted
1096
+
1097
+ module_eval(<<'.,.,', 'ddb-parser.y', 273)
1098
+ def _reduce_76(val, _values)
1099
+ :NE
1100
+
1101
+ end
1102
+ .,.,
1103
+
1104
+ # reduce 77 omitted
1105
+
1106
+ module_eval(<<'.,.,', 'ddb-parser.y', 279)
1107
+ def _reduce_78(val, _values)
1108
+ :NOT_CONTAINS
1109
+
1110
+ end
1111
+ .,.,
1112
+
1113
+ module_eval(<<'.,.,', 'ddb-parser.y', 283)
1114
+ def _reduce_79(val, _values)
1115
+ :NULL
1116
+
1117
+ end
1118
+ .,.,
1119
+
1120
+ module_eval(<<'.,.,', 'ddb-parser.y', 287)
1121
+ def _reduce_80(val, _values)
1122
+ :NOT_NULL
1123
+
1124
+ end
1125
+ .,.,
1126
+
1127
+ # reduce 81 omitted
1128
+
1129
+ module_eval(<<'.,.,', 'ddb-parser.y', 293)
1130
+ def _reduce_82(val, _values)
1131
+ true
1132
+
1133
+ end
1134
+ .,.,
1135
+
1136
+ module_eval(<<'.,.,', 'ddb-parser.y', 297)
1137
+ def _reduce_83(val, _values)
1138
+ false
1139
+
1140
+ end
1141
+ .,.,
1142
+
1143
+ # reduce 84 omitted
1144
+
1145
+ module_eval(<<'.,.,', 'ddb-parser.y', 303)
1146
+ def _reduce_85(val, _values)
1147
+ val[1]
1148
+
1149
+ end
1150
+ .,.,
1151
+
1152
+ module_eval(<<'.,.,', 'ddb-parser.y', 308)
1153
+ def _reduce_86(val, _values)
1154
+ struct(:UPDATE, :table => val[1], :action => val[2], :attrs => val[3], :conds => val[4])
1155
+
1156
+ end
1157
+ .,.,
1158
+
1159
+ module_eval(<<'.,.,', 'ddb-parser.y', 312)
1160
+ def _reduce_87(val, _values)
1161
+ struct(:UPDATE_ALL, :table => val[2], :action => val[3], :attrs => val[4], :conds => val[5], :limit => val[6])
1162
+
1163
+ end
1164
+ .,.,
1165
+
1166
+ module_eval(<<'.,.,', 'ddb-parser.y', 317)
1167
+ def _reduce_88(val, _values)
1168
+ :PUT
1169
+
1170
+ end
1171
+ .,.,
1172
+
1173
+ module_eval(<<'.,.,', 'ddb-parser.y', 321)
1174
+ def _reduce_89(val, _values)
1175
+ :ADD
1176
+
1177
+ end
1178
+ .,.,
1179
+
1180
+ module_eval(<<'.,.,', 'ddb-parser.y', 326)
1181
+ def _reduce_90(val, _values)
1182
+ [val[0]]
1183
+
1184
+ end
1185
+ .,.,
1186
+
1187
+ module_eval(<<'.,.,', 'ddb-parser.y', 330)
1188
+ def _reduce_91(val, _values)
1189
+ val[0] + [val[2]]
1190
+
1191
+ end
1192
+ .,.,
1193
+
1194
+ module_eval(<<'.,.,', 'ddb-parser.y', 335)
1195
+ def _reduce_92(val, _values)
1196
+ [val[0], val[2]]
1197
+
1198
+ end
1199
+ .,.,
1200
+
1201
+ module_eval(<<'.,.,', 'ddb-parser.y', 340)
1202
+ def _reduce_93(val, _values)
1203
+ val[1]
1204
+
1205
+ end
1206
+ .,.,
1207
+
1208
+ module_eval(<<'.,.,', 'ddb-parser.y', 345)
1209
+ def _reduce_94(val, _values)
1210
+ [val[0]]
1211
+
1212
+ end
1213
+ .,.,
1214
+
1215
+ module_eval(<<'.,.,', 'ddb-parser.y', 349)
1216
+ def _reduce_95(val, _values)
1217
+ val[0] + [val[2]]
1218
+
1219
+ end
1220
+ .,.,
1221
+
1222
+ module_eval(<<'.,.,', 'ddb-parser.y', 354)
1223
+ def _reduce_96(val, _values)
1224
+ [val[0], val[2]]
1225
+
1226
+ end
1227
+ .,.,
1228
+
1229
+ module_eval(<<'.,.,', 'ddb-parser.y', 359)
1230
+ def _reduce_97(val, _values)
1231
+ struct(:DELETE, :table => val[2], :conds => val[3])
1232
+
1233
+ end
1234
+ .,.,
1235
+
1236
+ module_eval(<<'.,.,', 'ddb-parser.y', 363)
1237
+ def _reduce_98(val, _values)
1238
+ struct(:DELETE_ALL, :table => val[3], :conds => val[4], :limit => val[5])
1239
+
1240
+ end
1241
+ .,.,
1242
+
1243
+ module_eval(<<'.,.,', 'ddb-parser.y', 368)
1244
+ def _reduce_99(val, _values)
1245
+ struct(:INSERT, :table => val[2], :attrs => val[4], :values => val[7])
1246
+
1247
+ end
1248
+ .,.,
1249
+
1250
+ module_eval(<<'.,.,', 'ddb-parser.y', 373)
1251
+ def _reduce_100(val, _values)
1252
+ [val[0]]
1253
+
1254
+ end
1255
+ .,.,
1256
+
1257
+ module_eval(<<'.,.,', 'ddb-parser.y', 377)
1258
+ def _reduce_101(val, _values)
1259
+ val[0] + [val[2]]
1260
+
1261
+ end
1262
+ .,.,
1263
+
1264
+ module_eval(<<'.,.,', 'ddb-parser.y', 382)
1265
+ def _reduce_102(val, _values)
1266
+ [val[1]]
1267
+
1268
+ end
1269
+ .,.,
1270
+
1271
+ module_eval(<<'.,.,', 'ddb-parser.y', 386)
1272
+ def _reduce_103(val, _values)
1273
+ val[0] + [val[3]]
1274
+
1275
+ end
1276
+ .,.,
1277
+
1278
+ module_eval(<<'.,.,', 'ddb-parser.y', 391)
1279
+ def _reduce_104(val, _values)
1280
+ [val[0]]
1281
+
1282
+ end
1283
+ .,.,
1284
+
1285
+ module_eval(<<'.,.,', 'ddb-parser.y', 395)
1286
+ def _reduce_105(val, _values)
1287
+ val[0] + [val[2]]
1288
+
1289
+ end
1290
+ .,.,
1291
+
1292
+ module_eval(<<'.,.,', 'ddb-parser.y', 400)
1293
+ def _reduce_106(val, _values)
1294
+ struct(:NEXT)
1295
+
1296
+ end
1297
+ .,.,
1298
+
1299
+ # reduce 107 omitted
1300
+
1301
+ # reduce 108 omitted
1302
+
1303
+ # reduce 109 omitted
1304
+
1305
+ # reduce 110 omitted
1306
+
1307
+ # reduce 111 omitted
1308
+
1309
+ # reduce 112 omitted
1310
+
1311
+ # reduce 113 omitted
1312
+
1313
+ module_eval(<<'.,.,', 'ddb-parser.y', 414)
1314
+ def _reduce_114(val, _values)
1315
+ val[1]
1316
+
1317
+ end
1318
+ .,.,
1319
+
1320
+ module_eval(<<'.,.,', 'ddb-parser.y', 418)
1321
+ def _reduce_115(val, _values)
1322
+ val[1]
1323
+
1324
+ end
1325
+ .,.,
1326
+
1327
+ module_eval(<<'.,.,', 'ddb-parser.y', 422)
1328
+ def _reduce_116(val, _values)
1329
+ val[1]
1330
+
1331
+ end
1332
+ .,.,
1333
+
1334
+ module_eval(<<'.,.,', 'ddb-parser.y', 427)
1335
+ def _reduce_117(val, _values)
1336
+ [val[0]]
1337
+
1338
+ end
1339
+ .,.,
1340
+
1341
+ module_eval(<<'.,.,', 'ddb-parser.y', 431)
1342
+ def _reduce_118(val, _values)
1343
+ val[0] + [val[2]]
1344
+
1345
+ end
1346
+ .,.,
1347
+
1348
+ module_eval(<<'.,.,', 'ddb-parser.y', 436)
1349
+ def _reduce_119(val, _values)
1350
+ [val[0]]
1351
+
1352
+ end
1353
+ .,.,
1354
+
1355
+ module_eval(<<'.,.,', 'ddb-parser.y', 440)
1356
+ def _reduce_120(val, _values)
1357
+ val[0] + [val[2]]
1358
+
1359
+ end
1360
+ .,.,
1361
+
1362
+ module_eval(<<'.,.,', 'ddb-parser.y', 445)
1363
+ def _reduce_121(val, _values)
1364
+ [val[0]]
1365
+
1366
+ end
1367
+ .,.,
1368
+
1369
+ module_eval(<<'.,.,', 'ddb-parser.y', 449)
1370
+ def _reduce_122(val, _values)
1371
+ val[0] + [val[2]]
1372
+
1373
+ end
1374
+ .,.,
1375
+
1376
+ def _reduce_none(val, _values)
1377
+ val[0]
1378
+ end
1379
+
1380
+ end # class Parser
1381
+
1382
+
1383
+ end # DynamoDB