ddbcli 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b9b5689abaab19b224c1faf91c18b8f017f2e28
4
- data.tar.gz: 58179d820b68f1a2cbfbf31bc2765aefeed81dca
3
+ metadata.gz: e22c773139b9f7d5b5db91ab0fdaaacce305d2d1
4
+ data.tar.gz: ced168e9cffdc8c44771c1296b401b64320874cf
5
5
  SHA512:
6
- metadata.gz: 84df621c127d0b18d690e486a6711909a3e134fb5625618d3c7a1e7ac2e960ccb696384d3de86c6afc831d250ca4fa08f2770e1aae96f3eac0c5403090c65337
7
- data.tar.gz: 46f74db1ce0f3fc58f37da124cee5038e9d820cf4627e9e6bbe3797fd36a6f34459ed5b2623b29a0f2be8111a3af989939133e0423d45af055731044ac38d5cb
6
+ metadata.gz: a939abf03cbb06476d190bdc6e1b5436bf28995e0f6f31d4caef735e6fc6bf7444d1e8127417db60b979e619633144d96ad976c3ca32efa23a1091be2222ffaa
7
+ data.tar.gz: 1479787aa997ab15b5570ed96199a31d30d376fdb8b4dc84975ff75d164a091258ed48c6f91b16e0529acdb0c3202d75eeb1e1b5a6aa8fad73354c0cc59104a2
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ install:
5
+ - mkdir /tmp/dynamodb
6
+ - wget -O - http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest | tar xz --directory /tmp/dynamodb
7
+ before_script:
8
+ - java -Djava.library.path=/tmp/dynamodb/DynamoDBLocal_lib -jar /tmp/dynamodb/DynamoDBLocal.jar -inMemory &
9
+ script:
10
+ - bundle install
11
+ - bundle exec rake
data/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  ddbcli is an interactive command-line client of Amazon DynamoDB.
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/ddbcli.png)](http://badge.fury.io/rb/ddbcli)
6
+ [![Build Status](https://travis-ci.org/winebarrel/ddbcli.svg?branch=master)](https://travis-ci.org/winebarrel/ddbcli)
6
7
 
7
8
  ## Installation
8
9
 
@@ -64,7 +65,7 @@ DEBUG: 'i' contains: [{"gender"=>"F"}, {"gender"=>"F"}, {"gender"=>"F"}] ...
64
65
 
65
66
  ## Help
66
67
 
67
- ```
68
+ ```sql
68
69
  ##### Query #####
69
70
 
70
71
  SHOW TABLES [LIMIT num] [LIKE '...']
@@ -165,6 +166,12 @@ List
165
166
  Map
166
167
  {key1:'String', "key2":(1, 2, 3), key3: ['FOO', 'BAR'], ...}
167
168
 
169
+ Bool
170
+ true, false
171
+
172
+ Null
173
+ null
174
+
168
175
 
169
176
  ##### Operator #####
170
177
 
@@ -222,3 +229,12 @@ Append
222
229
  .timeout SECOND? displays a timeout second or changes it
223
230
  .version displays a version
224
231
  ```
232
+
233
+ # Test
234
+
235
+ ```sh
236
+ # http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest
237
+ java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar
238
+ bundle install
239
+ bundle exec rake
240
+ ```
@@ -102,6 +102,12 @@ List
102
102
  Map
103
103
  {key1:'String', "key2":(1, 2, 3), key3: ['FOO', 'BAR'], ...}
104
104
 
105
+ Bool
106
+ true, false
107
+
108
+ Null
109
+ null
110
+
105
111
 
106
112
  ##### Operator #####
107
113
 
@@ -578,7 +578,10 @@ module DynamoDB
578
578
  'WriteCapacityUnits' => parsed.capacity[:write],
579
579
  }
580
580
  else
581
- req_hash['ProvisionedThroughput'] = table_info['ProvisionedThroughput']
581
+ req_hash['ProvisionedThroughput'] = {
582
+ 'ReadCapacityUnits' => table_info['ProvisionedThroughput']['ReadCapacityUnits'],
583
+ 'WriteCapacityUnits' => table_info['ProvisionedThroughput']['WriteCapacityUnits'],
584
+ }
582
585
  end
583
586
 
584
587
  @client.query('CreateTable', req_hash)
@@ -995,6 +998,11 @@ module DynamoDB
995
998
  },
996
999
  }
997
1000
 
1001
+
1002
+ if parsed.attrs.length != val_list.length
1003
+ raise DynamoDB::Error, "number of attribute name and value are different: #{parsed.attrs.inspect} != #{val_list.inspect}"
1004
+ end
1005
+
998
1006
  parsed.attrs.zip(val_list).each do |name, val|
999
1007
  h[name] = convert_to_attribute_value(val)
1000
1008
  end
@@ -114,9 +114,11 @@ def scan
114
114
  '=' => :EQ,
115
115
  }.fetch(tok)
116
116
  yield [sym, tok]
117
- elsif (tok = @ss.scan KEYWORD_REGEXP)
117
+ elsif (tok = @ss.check KEYWORD_REGEXP) and @ss.rest.slice(tok.length) !~ /\A\w/
118
+ tok = @ss.scan KEYWORD_REGEXP
118
119
  yield [tok.upcase.to_sym, tok]
119
- elsif (tok = @ss.scan /NULL/i)
120
+ elsif (tok = @ss.check /NULL/i) and @ss.rest.slice(tok.length) !~ /\A\w/
121
+ tok = @ss.scan /NULL/i
120
122
  yield [:NULL, nil]
121
123
  elsif (tok = @ss.scan /`(?:[^`]|``)*`/)
122
124
  yield [:IDENTIFIER, tok.slice(1...-1).gsub(/``/, '`')]
@@ -194,132 +196,132 @@ end
194
196
  ##### State transition tables begin ###
195
197
 
196
198
  racc_action_table = [
197
- 175, 258, 227, 210, 175, 256, 55, 53, 175, 211,
198
- 190, 53, 175, 188, 191, 177, 175, 216, 330, 177,
199
- 189, 100, 136, 177, 174, 56, 223, 177, 174, 53,
200
- 58, 177, 174, 131, 175, 51, 174, 57, 175, 51,
201
- 174, 215, 114, 144, 249, 224, 225, 226, 228, 177,
202
- 114, 171, 257, 177, 255, 171, 74, 51, 174, 171,
203
- 273, 272, 174, 171, 207, 170, 172, 171, 173, 170,
199
+ 175, 258, 227, 211, 175, 256, 55, 53, 175, 53,
200
+ 190, 210, 175, 188, 191, 177, 175, 216, 100, 177,
201
+ 189, 211, 136, 177, 174, 56, 223, 177, 174, 210,
202
+ 330, 177, 174, 53, 175, 51, 174, 51, 175, 144,
203
+ 174, 215, 284, 114, 249, 224, 225, 226, 228, 177,
204
+ 284, 171, 257, 177, 255, 171, 285, 131, 174, 171,
205
+ 74, 51, 174, 171, 285, 170, 172, 171, 173, 170,
204
206
  172, 176, 173, 170, 172, 176, 173, 170, 172, 176,
205
207
  173, 170, 172, 176, 173, 171, 175, 176, 217, 171,
206
- 288, 348, 41, 175, 349, 100, 117, 175, 42, 170,
208
+ 207, 58, 261, 175, 262, 288, 114, 175, 57, 170,
207
209
  172, 177, 173, 170, 172, 176, 173, 136, 177, 176,
208
- 174, 287, 177, 53, 25, 175, 144, 174, 282, 175,
209
- 153, 174, 284, 175, 130, 137, 154, 155, 114, 50,
210
- 177, 175, 49, 129, 177, 284, 285, 171, 177, 174,
211
- 48, 51, 284, 174, 171, 110, 177, 174, 171, 285,
212
- 95, 170, 172, 96, 173, 174, 285, 176, 170, 172,
213
- 70, 173, 170, 172, 176, 173, 171, 99, 176, 153,
214
- 171, 143, 153, 98, 171, 154, 155, 175, 154, 155,
210
+ 174, 94, 177, 53, 100, 175, 287, 174, 117, 175,
211
+ 153, 174, 95, 175, 130, 96, 154, 155, 144, 50,
212
+ 177, 175, 49, 137, 177, 114, 25, 171, 177, 174,
213
+ 48, 51, 348, 174, 171, 349, 177, 174, 171, 282,
214
+ 41, 170, 172, 284, 173, 174, 42, 176, 170, 172,
215
+ 204, 173, 170, 172, 176, 173, 171, 285, 176, 153,
216
+ 171, 263, 153, 264, 171, 154, 155, 175, 154, 155,
215
217
  170, 172, 171, 173, 170, 172, 176, 173, 170, 172,
216
- 176, 173, 177, 144, 176, 94, 170, 172, 204, 173,
217
- 70, 174, 176, 3, 4, 153, 95, 227, 18, 96,
218
- 148, 154, 155, 21, 153, 95, 19, 210, 96, 20,
219
- 154, 155, 333, 211, 320, 32, 33, 34, 171, 35,
220
- 149, 223, 80, 81, 82, 83, 22, 23, 24, 25,
221
- 150, 151, 170, 172, 26, 173, 127, 126, 176, 231,
222
- 224, 225, 226, 228, 230, 232, 235, 236, 237, 158,
223
- 36, 37, 27, 38, 39, 28, 95, 29, 159, 96,
224
- 30, 80, 81, 82, 83, 342, 343, 344, 342, 343,
225
- 344, 261, 263, 262, 264, 319, 357, 320, 358, 265,
226
- 160, 266, 144, 162, 163, 110, 60, 125, 123, 180,
218
+ 176, 173, 177, 129, 176, 95, 170, 172, 96, 173,
219
+ 99, 174, 176, 3, 4, 153, 98, 227, 18, 273,
220
+ 272, 154, 155, 21, 153, 95, 19, 110, 96, 20,
221
+ 154, 155, 32, 33, 34, 265, 35, 266, 171, 36,
222
+ 37, 223, 38, 39, 70, 143, 22, 23, 24, 25,
223
+ 144, 70, 170, 172, 26, 173, 148, 149, 176, 231,
224
+ 224, 225, 226, 228, 230, 232, 235, 236, 237, 333,
225
+ 95, 320, 27, 96, 319, 28, 320, 29, 150, 151,
226
+ 30, 80, 81, 82, 83, 80, 81, 82, 83, 342,
227
+ 343, 344, 342, 343, 344, 357, 127, 358, 126, 158,
228
+ 159, 160, 144, 162, 163, 110, 61, 125, 123, 180,
227
229
  181, 184, 64, 186, 100, 122, 121, 120, 116, 193,
228
- 195, 198, 199, 200, 64, 202, 203, 59, 114, 70,
229
- 64, 64, 143, 110, 222, 107, 238, 239, 240, 241,
230
- 242, 243, 245, 184, 247, 106, 251, 129, 253, 144,
231
- 105, 104, 259, 260, 103, 102, 101, 184, 100, 177,
232
- 92, 89, 274, 276, 277, 278, 279, 280, 90, 64,
233
- 89, 222, 198, 46, 45, 292, 158, 144, 64, 44,
234
- 87, 43, 86, 300, 301, 302, 303, 304, 305, 40,
235
- 308, 309, 310, 85, 312, 313, 314, 195, 64, 84,
236
- 318, 77, 76, 322, 323, 324, 75, 245, 61, 31,
237
- 329, 132, 331, 64, 62, 72, 71, 337, 310, 338,
238
- 339, 70, 68, 67, 346, 347, 66, 351, 353, 354,
239
- 355, 65, 64, 359, 360, 361, 189, 191 ]
230
+ 195, 198, 199, 200, 64, 202, 203, 60, 59, 114,
231
+ 64, 64, 143, 70, 222, 110, 238, 239, 240, 241,
232
+ 242, 243, 245, 184, 247, 107, 251, 129, 253, 144,
233
+ 106, 105, 259, 260, 104, 103, 102, 184, 101, 177,
234
+ 100, 92, 274, 276, 277, 278, 279, 280, 89, 64,
235
+ 90, 222, 198, 46, 45, 292, 158, 144, 64, 44,
236
+ 89, 43, 87, 300, 301, 302, 303, 304, 305, 40,
237
+ 308, 309, 310, 86, 312, 313, 314, 195, 64, 85,
238
+ 318, 84, 77, 322, 323, 324, 76, 245, 62, 31,
239
+ 329, 132, 331, 64, 75, 64, 72, 337, 310, 338,
240
+ 339, 71, 70, 68, 346, 347, 67, 351, 353, 354,
241
+ 355, 66, 65, 359, 360, 361, 189, 191 ]
240
242
 
241
243
  racc_action_check = [
242
- 318, 208, 198, 173, 320, 205, 27, 105, 314, 173,
243
- 150, 26, 303, 149, 150, 318, 276, 177, 323, 320,
244
- 149, 111, 139, 314, 318, 27, 198, 303, 320, 49,
245
- 28, 276, 314, 103, 260, 105, 303, 28, 259, 26,
246
- 276, 177, 111, 139, 198, 198, 198, 198, 198, 260,
247
- 107, 318, 208, 259, 205, 320, 49, 49, 260, 314,
248
- 232, 232, 259, 303, 173, 318, 318, 276, 318, 320,
244
+ 318, 208, 198, 258, 320, 205, 27, 105, 314, 26,
245
+ 150, 258, 303, 149, 150, 318, 276, 177, 140, 320,
246
+ 149, 173, 108, 314, 318, 27, 198, 303, 320, 173,
247
+ 323, 276, 314, 49, 260, 105, 303, 26, 259, 140,
248
+ 276, 177, 310, 108, 198, 198, 198, 198, 198, 260,
249
+ 329, 318, 208, 259, 205, 320, 310, 103, 260, 314,
250
+ 49, 49, 259, 303, 329, 318, 318, 276, 318, 320,
249
251
  320, 318, 320, 314, 314, 320, 314, 303, 303, 314,
250
252
  303, 276, 276, 303, 276, 260, 256, 276, 177, 259,
251
- 245, 345, 20, 249, 345, 140, 87, 248, 20, 260,
252
- 260, 256, 260, 259, 259, 260, 259, 108, 249, 259,
253
- 256, 245, 248, 25, 87, 231, 140, 249, 243, 229,
254
- 282, 248, 243, 181, 102, 110, 282, 282, 108, 25,
255
- 231, 172, 25, 101, 229, 329, 243, 256, 181, 231,
256
- 25, 25, 310, 229, 249, 112, 172, 181, 248, 329,
257
- 151, 256, 256, 151, 256, 172, 310, 256, 249, 249,
258
- 113, 249, 248, 248, 249, 248, 231, 68, 248, 351,
259
- 229, 114, 337, 68, 181, 351, 351, 137, 337, 337,
260
- 231, 231, 172, 231, 229, 229, 231, 229, 181, 181,
261
- 229, 181, 137, 116, 181, 67, 172, 172, 172, 172,
262
- 117, 137, 172, 0, 0, 125, 67, 184, 0, 67,
263
- 121, 125, 125, 0, 330, 148, 0, 258, 148, 0,
264
- 330, 330, 327, 258, 327, 2, 2, 2, 137, 2,
265
- 122, 184, 84, 84, 84, 84, 0, 0, 0, 0,
266
- 123, 124, 137, 137, 0, 137, 100, 99, 137, 184,
267
- 184, 184, 184, 184, 184, 184, 184, 184, 184, 128,
268
- 18, 18, 0, 18, 18, 0, 126, 0, 129, 126,
269
- 0, 55, 55, 55, 55, 338, 338, 338, 339, 339,
270
- 339, 212, 213, 212, 213, 306, 352, 306, 352, 214,
271
- 130, 214, 131, 132, 133, 136, 31, 98, 96, 141,
253
+ 173, 28, 212, 172, 212, 245, 107, 248, 28, 260,
254
+ 260, 256, 260, 259, 259, 260, 259, 139, 172, 259,
255
+ 256, 67, 248, 25, 111, 231, 245, 172, 87, 229,
256
+ 282, 248, 67, 181, 102, 67, 282, 282, 139, 25,
257
+ 231, 137, 25, 110, 229, 111, 87, 256, 181, 231,
258
+ 25, 25, 345, 229, 172, 345, 137, 181, 248, 243,
259
+ 20, 256, 256, 243, 256, 137, 20, 256, 172, 172,
260
+ 172, 172, 248, 248, 172, 248, 231, 243, 248, 125,
261
+ 229, 213, 337, 213, 181, 125, 125, 249, 337, 337,
262
+ 231, 231, 137, 231, 229, 229, 231, 229, 181, 181,
263
+ 229, 181, 249, 101, 181, 151, 137, 137, 151, 137,
264
+ 68, 249, 137, 0, 0, 351, 68, 184, 0, 232,
265
+ 232, 351, 351, 0, 330, 148, 0, 112, 148, 0,
266
+ 330, 330, 2, 2, 2, 214, 2, 214, 249, 18,
267
+ 18, 184, 18, 18, 113, 114, 0, 0, 0, 0,
268
+ 116, 117, 249, 249, 0, 249, 121, 122, 249, 184,
269
+ 184, 184, 184, 184, 184, 184, 184, 184, 184, 327,
270
+ 126, 327, 0, 126, 306, 0, 306, 0, 123, 124,
271
+ 0, 84, 84, 84, 84, 55, 55, 55, 55, 338,
272
+ 338, 338, 339, 339, 339, 352, 100, 352, 99, 128,
273
+ 129, 130, 131, 132, 133, 136, 34, 98, 96, 141,
272
274
  143, 144, 145, 146, 147, 95, 94, 89, 86, 152,
273
- 157, 158, 159, 160, 161, 162, 163, 29, 85, 79,
274
- 178, 179, 180, 78, 182, 77, 186, 188, 189, 190,
275
- 191, 193, 194, 195, 196, 76, 199, 200, 202, 203,
276
- 75, 74, 210, 211, 73, 72, 71, 222, 69, 230,
277
- 66, 65, 237, 238, 239, 240, 241, 242, 64, 244,
278
- 63, 246, 247, 24, 23, 251, 252, 253, 254, 22,
279
- 59, 21, 58, 262, 264, 266, 270, 273, 275, 19,
280
- 277, 279, 281, 57, 284, 285, 291, 293, 294, 56,
281
- 305, 54, 52, 311, 312, 313, 50, 315, 34, 1,
282
- 322, 104, 324, 326, 35, 48, 47, 331, 334, 335,
283
- 336, 44, 43, 40, 340, 344, 39, 346, 347, 348,
284
- 349, 37, 36, 354, 355, 358, 359, 360 ]
275
+ 157, 158, 159, 160, 161, 162, 163, 31, 29, 85,
276
+ 178, 179, 180, 79, 182, 78, 186, 188, 189, 190,
277
+ 191, 193, 194, 195, 196, 77, 199, 200, 202, 203,
278
+ 76, 75, 210, 211, 74, 73, 72, 222, 71, 230,
279
+ 69, 66, 237, 238, 239, 240, 241, 242, 65, 244,
280
+ 64, 246, 247, 24, 23, 251, 252, 253, 254, 22,
281
+ 63, 21, 59, 262, 264, 266, 270, 273, 275, 19,
282
+ 277, 279, 281, 58, 284, 285, 291, 293, 294, 57,
283
+ 305, 56, 54, 311, 312, 313, 52, 315, 35, 1,
284
+ 322, 104, 324, 326, 50, 36, 48, 331, 334, 335,
285
+ 336, 47, 44, 43, 340, 344, 40, 346, 347, 348,
286
+ 349, 39, 37, 354, 355, 358, 359, 360 ]
285
287
 
286
288
  racc_action_pointer = [
287
- 201, 399, 223, nil, nil, nil, nil, nil, nil, nil,
288
- nil, nil, nil, nil, nil, nil, nil, nil, 252, 370,
289
- 79, 362, 360, 351, 350, 100, -2, -7, -2, 250,
290
- nil, 296, nil, nil, 393, 399, 363, 411, nil, 407,
291
- 400, nil, nil, 399, 398, nil, nil, 367, 385, 16,
292
- 354, nil, 369, nil, 352, 209, 376, 370, 333, 357,
293
- nil, nil, nil, 346, 329, 337, 337, 179, 153, 325,
294
- nil, 333, 304, 305, 321, 311, 322, 312, 310, 306,
295
- nil, nil, nil, nil, 170, 274, 295, 76, nil, 302,
296
- nil, nil, nil, nil, 289, 277, 270, nil, 284, 234,
297
- 233, 115, 103, 20, 360, -6, nil, 6, 84, nil,
298
- 97, -2, 132, 147, 158, nil, 149, 187, nil, nil,
299
- nil, 197, 201, 211, 220, 186, 239, nil, 215, 251,
300
- 251, 248, 272, 255, nil, nil, 282, 172, nil, -1,
301
- 72, 254, nil, 272, 288, 243, 282, 281, 188, -10,
302
- -13, 123, 287, nil, nil, nil, nil, 250, 298, 292,
289
+ 201, 399, 220, nil, nil, nil, nil, nil, nil, nil,
290
+ nil, nil, nil, nil, nil, nil, nil, nil, 221, 370,
291
+ 137, 362, 360, 351, 350, 100, -4, -7, 59, 251,
292
+ nil, 317, nil, nil, 291, 393, 346, 412, nil, 412,
293
+ 403, nil, nil, 400, 399, nil, nil, 372, 386, 20,
294
+ 362, nil, 373, nil, 353, 213, 378, 376, 344, 359,
295
+ nil, nil, nil, 356, 331, 344, 338, 95, 186, 327,
296
+ nil, 335, 305, 306, 324, 312, 327, 322, 312, 310,
297
+ nil, nil, nil, nil, 209, 275, 295, 98, nil, 302,
298
+ nil, nil, nil, nil, 289, 277, 270, nil, 284, 275,
299
+ 273, 175, 103, 44, 360, -6, nil, 52, -1, nil,
300
+ 105, 91, 204, 221, 222, nil, 196, 228, nil, nil,
301
+ nil, 233, 218, 239, 248, 150, 233, nil, 245, 273,
302
+ 252, 248, 272, 255, nil, nil, 282, 126, nil, 84,
303
+ -5, 254, nil, 272, 288, 243, 282, 281, 188, -10,
304
+ -13, 168, 287, nil, nil, nil, nil, 250, 298, 292,
303
305
  300, 255, 276, 303, nil, nil, nil, nil, nil, nil,
304
- nil, nil, 126, -10, nil, nil, nil, 12, 261, 262,
306
+ nil, nil, 88, 16, nil, nil, nil, 12, 261, 262,
305
307
  309, 118, 279, nil, 203, nil, 258, nil, 297, 300,
306
308
  302, 302, nil, 308, 275, 320, 289, nil, -2, 323,
307
309
  319, nil, 325, 295, nil, -18, nil, nil, -22, nil,
308
- 267, 268, 260, 261, 268, nil, nil, nil, nil, nil,
310
+ 267, 268, 71, 150, 204, nil, nil, nil, nil, nil,
309
311
  nil, nil, 334, nil, nil, nil, nil, nil, nil, 114,
310
- 329, 110, 5, nil, nil, nil, nil, 298, 333, 326,
311
- 326, 328, 328, 105, 300, 53, 316, 349, 92, 88,
312
- nil, 344, 322, 323, 309, nil, 81, nil, 204, 33,
312
+ 329, 110, 154, nil, nil, nil, nil, 298, 333, 326,
313
+ 326, 328, 328, 136, 300, 58, 316, 349, 92, 172,
314
+ nil, 344, 322, 323, 309, nil, 81, nil, -2, 33,
313
315
  29, nil, 344, nil, 369, nil, 299, nil, nil, nil,
314
316
  331, nil, nil, 321, nil, 355, 11, 351, nil, 352,
315
317
  nil, 359, 101, nil, 371, 368, nil, nil, nil, nil,
316
318
  nil, 341, nil, 327, 329, nil, nil, nil, nil, nil,
317
- nil, nil, nil, 7, nil, 370, 264, nil, nil, nil,
318
- 125, 369, 374, 382, 3, 340, nil, nil, -5, nil,
319
- -1, nil, 377, 5, 382, nil, 344, 201, nil, 118,
320
- 195, 394, nil, nil, 385, 388, 389, 153, 243, 246,
321
- 391, nil, nil, nil, 395, 64, 404, 405, 391, 392,
322
- nil, 150, 265, nil, 394, 395, nil, nil, 412, 396,
319
+ nil, nil, nil, 7, nil, 370, 243, nil, nil, nil,
320
+ 25, 369, 374, 382, 3, 340, nil, nil, -5, nil,
321
+ -1, nil, 377, 17, 382, nil, 344, 238, nil, 33,
322
+ 195, 394, nil, nil, 385, 388, 389, 153, 247, 250,
323
+ 391, nil, nil, nil, 395, 115, 404, 405, 391, 392,
324
+ nil, 186, 264, nil, 394, 395, nil, nil, 412, 396,
323
325
  400, nil ]
324
326
 
325
327
  racc_action_default = [
@@ -552,7 +552,7 @@ rule
552
552
  {
553
553
  {val[0] => val[2]}
554
554
  }
555
- | STRING ':' value
555
+ | STRING_VALUE ':' value
556
556
  {
557
557
  {val[0] => val[2]}
558
558
  }
@@ -717,9 +717,11 @@ def scan
717
717
  '=' => :EQ,
718
718
  }.fetch(tok)
719
719
  yield [sym, tok]
720
- elsif (tok = @ss.scan KEYWORD_REGEXP)
720
+ elsif (tok = @ss.check KEYWORD_REGEXP) and @ss.rest.slice(tok.length) !~ /\A\w/
721
+ tok = @ss.scan KEYWORD_REGEXP
721
722
  yield [tok.upcase.to_sym, tok]
722
- elsif (tok = @ss.scan /NULL/i)
723
+ elsif (tok = @ss.check /NULL/i) and @ss.rest.slice(tok.length) !~ /\A\w/
724
+ tok = @ss.scan /NULL/i
723
725
  yield [:NULL, nil]
724
726
  elsif (tok = @ss.scan /`(?:[^`]|``)*`/)
725
727
  yield [:IDENTIFIER, tok.slice(1...-1).gsub(/``/, '`')]
@@ -1,5 +1,5 @@
1
1
  module DynamoDB
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
4
4
 
5
5
  Version = DynamoDB::VERSION
data/spec/ddbcli_spec.rb CHANGED
@@ -195,8 +195,6 @@ describe 'ddbcli' do
195
195
  end
196
196
 
197
197
  it 'create table like' do
198
- pending('GSI does not work in DynamoDB Local')
199
-
200
198
  ddbcli(<<-'EOS')
201
199
  CREATE TABLE `foo` (
202
200
  `id` NUMBER HASH,
data/spec/insert_spec.rb CHANGED
@@ -46,5 +46,80 @@ CREATE TABLE `employees` (
46
46
  "str_array"=>["A", "B", "C"]}]
47
47
  )
48
48
  end
49
+
50
+ it 'insert list/map/bool/null' do
51
+ ddbcli(<<-'EOS')
52
+ insert into employees (
53
+ emp_no,
54
+ birth_date,
55
+ bool1,
56
+ bool2,
57
+ null_val,
58
+ list,
59
+ map
60
+ ) values (
61
+ 1,
62
+ '1977-11-11',
63
+ true,
64
+ false,
65
+ null,
66
+ [1, "2", 3, ["FOO", "BAR"], {foo: "foo", bar: 100}],
67
+ {foo: "foo", "bar": [1, 2, 3, {zoo: "zoo"}]}
68
+ )
69
+ EOS
70
+
71
+ out = ddbcli('select all * from employees')
72
+ out = JSON.parse(out)
73
+
74
+ expect(out).to eq(
75
+ [{"birth_date"=>"1977-11-11",
76
+ "bool1"=>true,
77
+ "bool2"=>false,
78
+ "emp_no"=>1,
79
+ "list"=>[1, "2", 3, ["FOO", "BAR"], {"bar"=>100, "foo"=>"foo"}],
80
+ "map"=>{"bar"=>[1, 2, 3, {"zoo"=>"zoo"}], "foo"=>"foo"},
81
+ "null_val"=>nil}]
82
+ )
83
+ end
84
+
85
+ it 'insert error (1)' do
86
+ sql = <<-'EOS'
87
+ insert into employees (
88
+ emp_no,
89
+ birth_date,
90
+ num,
91
+ str
92
+ ) values (
93
+ 1,
94
+ '1977-11-11',
95
+ 2
96
+ )
97
+ EOS
98
+
99
+ expect {
100
+ ddbcli(sql)
101
+ }.to raise_error(%|// number of attribute name and value are different: ["emp_no", "birth_date", "num", "str"] != [1, "1977-11-11", 2]\n\n|)
102
+ end
103
+
104
+ it 'insert error (2)' do
105
+ sql = <<-'EOS'
106
+ insert into employees (
107
+ emp_no,
108
+ birth_date,
109
+ num,
110
+ str
111
+ ) values (
112
+ 1,
113
+ '1977-11-11',
114
+ 2,
115
+ 'XXX',
116
+ 'YYY'
117
+ )
118
+ EOS
119
+
120
+ expect {
121
+ ddbcli(sql)
122
+ }.to raise_error(%|// number of attribute name and value are different: ["emp_no", "birth_date", "num", "str"] != [1, "1977-11-11", 2, "XXX", "YYY"]\n\n|)
123
+ end
49
124
  end
50
125
  end
data/spec/select_spec.rb CHANGED
@@ -26,8 +26,6 @@ VALUES
26
26
  end
27
27
 
28
28
  it 'select using GSI' do
29
- pending('GSI does not work in DynamoDB Local')
30
-
31
29
  out = ddbcli('select * from employees use index (global_idx) where gender = "M" and hire_date < "1990-01-01"')
32
30
  out = JSON.parse(out)
33
31
 
data/spec/update_spec.rb CHANGED
@@ -246,7 +246,7 @@ VALUES
246
246
  )
247
247
  end
248
248
 
249
- it 'update delete' do
249
+ it 'update null' do
250
250
  ddbcli('update all employees set hire_date = null where gender = "M"')
251
251
  out = ddbcli('select all * from employees')
252
252
  out = JSON.parse(out)
@@ -256,11 +256,13 @@ VALUES
256
256
  "emp_no"=>2,
257
257
  "first_name"=>"Cathie",
258
258
  "gender"=>"M",
259
+ "hire_date"=>nil,
259
260
  "last_name"=>"Keohane"},
260
261
  {"birth_date"=>"1961-10-19",
261
262
  "emp_no"=>2,
262
263
  "first_name"=>"Collette",
263
264
  "gender"=>"M",
265
+ "hire_date"=>nil,
264
266
  "last_name"=>"Ghemri"},
265
267
  {"birth_date"=>"1964-04-30",
266
268
  "emp_no"=>2,
@@ -272,6 +274,7 @@ VALUES
272
274
  "emp_no"=>1,
273
275
  "first_name"=>"Katsuyuki",
274
276
  "gender"=>"F",
277
+ "hire_date"=>nil,
275
278
  "hire_date"=>"1989-12-28",
276
279
  "last_name"=>"Weedon"},
277
280
  {"birth_date"=>"1964-12-29",
@@ -284,16 +287,19 @@ VALUES
284
287
  "emp_no"=>4,
285
288
  "first_name"=>"Zine",
286
289
  "gender"=>"M",
290
+ "hire_date"=>nil,
287
291
  "last_name"=>"Butner"},
288
292
  {"birth_date"=>"1957-09-16",
289
293
  "emp_no"=>4,
290
294
  "first_name"=>"Aemilian",
291
295
  "gender"=>"M",
296
+ "hire_date"=>nil,
292
297
  "last_name"=>"Roccetti"},
293
298
  {"birth_date"=>"1959-07-01",
294
299
  "emp_no"=>4,
295
300
  "first_name"=>"Dayanand",
296
301
  "gender"=>"M",
302
+ "hire_date"=>nil,
297
303
  "last_name"=>"Waterhouse"},
298
304
  {"birth_date"=>"1961-04-28",
299
305
  "emp_no"=>4,
@@ -305,9 +311,415 @@ VALUES
305
311
  "emp_no"=>4,
306
312
  "first_name"=>"Tristan",
307
313
  "gender"=>"M",
314
+ "hire_date"=>nil,
308
315
  "last_name"=>"Biran"}]
309
316
  )
310
317
  end
311
318
 
319
+ it 'update delete (1)' do
320
+ ddbcli('update all employees delete hire_date where gender = "M"')
321
+ out = ddbcli('select all * from employees')
322
+ out = JSON.parse(out)
323
+
324
+ expect(out).to eq(
325
+ [{"birth_date"=>"1956-05-15",
326
+ "emp_no"=>2,
327
+ "first_name"=>"Cathie",
328
+ "gender"=>"M",
329
+ "last_name"=>"Keohane"},
330
+ {"birth_date"=>"1961-10-19",
331
+ "emp_no"=>2,
332
+ "first_name"=>"Collette",
333
+ "gender"=>"M",
334
+ "last_name"=>"Ghemri"},
335
+ {"birth_date"=>"1964-04-30",
336
+ "emp_no"=>2,
337
+ "first_name"=>"Akhilish",
338
+ "gender"=>"F",
339
+ "hire_date"=>"1985-03-21",
340
+ "last_name"=>"Isaak"},
341
+ {"birth_date"=>"1963-07-14",
342
+ "emp_no"=>1,
343
+ "first_name"=>"Katsuyuki",
344
+ "gender"=>"F",
345
+ "hire_date"=>"1989-12-28",
346
+ "last_name"=>"Weedon"},
347
+ {"birth_date"=>"1964-12-29",
348
+ "emp_no"=>7,
349
+ "first_name"=>"Mack",
350
+ "gender"=>"F",
351
+ "hire_date"=>"1988-02-25",
352
+ "last_name"=>"Hambrick"},
353
+ {"birth_date"=>"1955-04-26",
354
+ "emp_no"=>4,
355
+ "first_name"=>"Zine",
356
+ "gender"=>"M",
357
+ "last_name"=>"Butner"},
358
+ {"birth_date"=>"1957-09-16",
359
+ "emp_no"=>4,
360
+ "first_name"=>"Aemilian",
361
+ "gender"=>"M",
362
+ "last_name"=>"Roccetti"},
363
+ {"birth_date"=>"1959-07-01",
364
+ "emp_no"=>4,
365
+ "first_name"=>"Dayanand",
366
+ "gender"=>"M",
367
+ "last_name"=>"Waterhouse"},
368
+ {"birth_date"=>"1961-04-28",
369
+ "emp_no"=>4,
370
+ "first_name"=>"Selwyn",
371
+ "gender"=>"F",
372
+ "hire_date"=>"1994-08-12",
373
+ "last_name"=>"Parascandalo"},
374
+ {"birth_date"=>"1962-07-06",
375
+ "emp_no"=>4,
376
+ "first_name"=>"Tristan",
377
+ "gender"=>"M",
378
+ "last_name"=>"Biran"}]
379
+ )
380
+ end
381
+
382
+ it 'update delete (2)' do
383
+ ddbcli('update all employees del hire_date where gender = "M"')
384
+ out = ddbcli('select all * from employees')
385
+ out = JSON.parse(out)
386
+
387
+ expect(out).to eq(
388
+ [{"birth_date"=>"1956-05-15",
389
+ "emp_no"=>2,
390
+ "first_name"=>"Cathie",
391
+ "gender"=>"M",
392
+ "last_name"=>"Keohane"},
393
+ {"birth_date"=>"1961-10-19",
394
+ "emp_no"=>2,
395
+ "first_name"=>"Collette",
396
+ "gender"=>"M",
397
+ "last_name"=>"Ghemri"},
398
+ {"birth_date"=>"1964-04-30",
399
+ "emp_no"=>2,
400
+ "first_name"=>"Akhilish",
401
+ "gender"=>"F",
402
+ "hire_date"=>"1985-03-21",
403
+ "last_name"=>"Isaak"},
404
+ {"birth_date"=>"1963-07-14",
405
+ "emp_no"=>1,
406
+ "first_name"=>"Katsuyuki",
407
+ "gender"=>"F",
408
+ "hire_date"=>"1989-12-28",
409
+ "last_name"=>"Weedon"},
410
+ {"birth_date"=>"1964-12-29",
411
+ "emp_no"=>7,
412
+ "first_name"=>"Mack",
413
+ "gender"=>"F",
414
+ "hire_date"=>"1988-02-25",
415
+ "last_name"=>"Hambrick"},
416
+ {"birth_date"=>"1955-04-26",
417
+ "emp_no"=>4,
418
+ "first_name"=>"Zine",
419
+ "gender"=>"M",
420
+ "last_name"=>"Butner"},
421
+ {"birth_date"=>"1957-09-16",
422
+ "emp_no"=>4,
423
+ "first_name"=>"Aemilian",
424
+ "gender"=>"M",
425
+ "last_name"=>"Roccetti"},
426
+ {"birth_date"=>"1959-07-01",
427
+ "emp_no"=>4,
428
+ "first_name"=>"Dayanand",
429
+ "gender"=>"M",
430
+ "last_name"=>"Waterhouse"},
431
+ {"birth_date"=>"1961-04-28",
432
+ "emp_no"=>4,
433
+ "first_name"=>"Selwyn",
434
+ "gender"=>"F",
435
+ "hire_date"=>"1994-08-12",
436
+ "last_name"=>"Parascandalo"},
437
+ {"birth_date"=>"1962-07-06",
438
+ "emp_no"=>4,
439
+ "first_name"=>"Tristan",
440
+ "gender"=>"M",
441
+ "last_name"=>"Biran"}]
442
+ )
443
+ end
444
+
445
+ it 'update true' do
446
+ ddbcli('update all employees set hire_date = true where gender = "M"')
447
+ out = ddbcli('select all * from employees')
448
+ out = JSON.parse(out)
449
+
450
+ expect(out).to eq(
451
+ [{"birth_date"=>"1956-05-15",
452
+ "emp_no"=>2,
453
+ "first_name"=>"Cathie",
454
+ "gender"=>"M",
455
+ "hire_date"=>true,
456
+ "last_name"=>"Keohane"},
457
+ {"birth_date"=>"1961-10-19",
458
+ "emp_no"=>2,
459
+ "first_name"=>"Collette",
460
+ "gender"=>"M",
461
+ "hire_date"=>true,
462
+ "last_name"=>"Ghemri"},
463
+ {"birth_date"=>"1964-04-30",
464
+ "emp_no"=>2,
465
+ "first_name"=>"Akhilish",
466
+ "gender"=>"F",
467
+ "hire_date"=>"1985-03-21",
468
+ "last_name"=>"Isaak"},
469
+ {"birth_date"=>"1963-07-14",
470
+ "emp_no"=>1,
471
+ "first_name"=>"Katsuyuki",
472
+ "gender"=>"F",
473
+ "hire_date"=>true,
474
+ "hire_date"=>"1989-12-28",
475
+ "last_name"=>"Weedon"},
476
+ {"birth_date"=>"1964-12-29",
477
+ "emp_no"=>7,
478
+ "first_name"=>"Mack",
479
+ "gender"=>"F",
480
+ "hire_date"=>"1988-02-25",
481
+ "last_name"=>"Hambrick"},
482
+ {"birth_date"=>"1955-04-26",
483
+ "emp_no"=>4,
484
+ "first_name"=>"Zine",
485
+ "gender"=>"M",
486
+ "hire_date"=>true,
487
+ "last_name"=>"Butner"},
488
+ {"birth_date"=>"1957-09-16",
489
+ "emp_no"=>4,
490
+ "first_name"=>"Aemilian",
491
+ "gender"=>"M",
492
+ "hire_date"=>true,
493
+ "last_name"=>"Roccetti"},
494
+ {"birth_date"=>"1959-07-01",
495
+ "emp_no"=>4,
496
+ "first_name"=>"Dayanand",
497
+ "gender"=>"M",
498
+ "hire_date"=>true,
499
+ "last_name"=>"Waterhouse"},
500
+ {"birth_date"=>"1961-04-28",
501
+ "emp_no"=>4,
502
+ "first_name"=>"Selwyn",
503
+ "gender"=>"F",
504
+ "hire_date"=>"1994-08-12",
505
+ "last_name"=>"Parascandalo"},
506
+ {"birth_date"=>"1962-07-06",
507
+ "emp_no"=>4,
508
+ "first_name"=>"Tristan",
509
+ "gender"=>"M",
510
+ "hire_date"=>true,
511
+ "last_name"=>"Biran"}]
512
+ )
513
+ end
514
+
515
+ it 'update false' do
516
+ ddbcli('update all employees set hire_date = false where gender = "M"')
517
+ out = ddbcli('select all * from employees')
518
+ out = JSON.parse(out)
519
+
520
+ expect(out).to eq(
521
+ [{"birth_date"=>"1956-05-15",
522
+ "emp_no"=>2,
523
+ "first_name"=>"Cathie",
524
+ "gender"=>"M",
525
+ "hire_date"=>false,
526
+ "last_name"=>"Keohane"},
527
+ {"birth_date"=>"1961-10-19",
528
+ "emp_no"=>2,
529
+ "first_name"=>"Collette",
530
+ "gender"=>"M",
531
+ "hire_date"=>false,
532
+ "last_name"=>"Ghemri"},
533
+ {"birth_date"=>"1964-04-30",
534
+ "emp_no"=>2,
535
+ "first_name"=>"Akhilish",
536
+ "gender"=>"F",
537
+ "hire_date"=>"1985-03-21",
538
+ "last_name"=>"Isaak"},
539
+ {"birth_date"=>"1963-07-14",
540
+ "emp_no"=>1,
541
+ "first_name"=>"Katsuyuki",
542
+ "gender"=>"F",
543
+ "hire_date"=>false,
544
+ "hire_date"=>"1989-12-28",
545
+ "last_name"=>"Weedon"},
546
+ {"birth_date"=>"1964-12-29",
547
+ "emp_no"=>7,
548
+ "first_name"=>"Mack",
549
+ "gender"=>"F",
550
+ "hire_date"=>"1988-02-25",
551
+ "last_name"=>"Hambrick"},
552
+ {"birth_date"=>"1955-04-26",
553
+ "emp_no"=>4,
554
+ "first_name"=>"Zine",
555
+ "gender"=>"M",
556
+ "hire_date"=>false,
557
+ "last_name"=>"Butner"},
558
+ {"birth_date"=>"1957-09-16",
559
+ "emp_no"=>4,
560
+ "first_name"=>"Aemilian",
561
+ "gender"=>"M",
562
+ "hire_date"=>false,
563
+ "last_name"=>"Roccetti"},
564
+ {"birth_date"=>"1959-07-01",
565
+ "emp_no"=>4,
566
+ "first_name"=>"Dayanand",
567
+ "gender"=>"M",
568
+ "hire_date"=>false,
569
+ "last_name"=>"Waterhouse"},
570
+ {"birth_date"=>"1961-04-28",
571
+ "emp_no"=>4,
572
+ "first_name"=>"Selwyn",
573
+ "gender"=>"F",
574
+ "hire_date"=>"1994-08-12",
575
+ "last_name"=>"Parascandalo"},
576
+ {"birth_date"=>"1962-07-06",
577
+ "emp_no"=>4,
578
+ "first_name"=>"Tristan",
579
+ "gender"=>"M",
580
+ "hire_date"=>false,
581
+ "last_name"=>"Biran"}]
582
+ )
583
+ end
584
+
585
+ it 'update list' do
586
+ ddbcli('update all employees set hire_date = [1, 2, ["foo", "bar"]] where gender = "M"')
587
+ out = ddbcli('select all * from employees')
588
+ out = JSON.parse(out)
589
+
590
+ expect(out).to eq(
591
+ [{"birth_date"=>"1956-05-15",
592
+ "emp_no"=>2,
593
+ "first_name"=>"Cathie",
594
+ "gender"=>"M",
595
+ "hire_date"=>[1, 2, ["foo", "bar"]],
596
+ "last_name"=>"Keohane"},
597
+ {"birth_date"=>"1961-10-19",
598
+ "emp_no"=>2,
599
+ "first_name"=>"Collette",
600
+ "gender"=>"M",
601
+ "hire_date"=>[1, 2, ["foo", "bar"]],
602
+ "last_name"=>"Ghemri"},
603
+ {"birth_date"=>"1964-04-30",
604
+ "emp_no"=>2,
605
+ "first_name"=>"Akhilish",
606
+ "gender"=>"F",
607
+ "hire_date"=>"1985-03-21",
608
+ "last_name"=>"Isaak"},
609
+ {"birth_date"=>"1963-07-14",
610
+ "emp_no"=>1,
611
+ "first_name"=>"Katsuyuki",
612
+ "gender"=>"F",
613
+ "hire_date"=>[1, 2, ["foo", "bar"]],
614
+ "hire_date"=>"1989-12-28",
615
+ "last_name"=>"Weedon"},
616
+ {"birth_date"=>"1964-12-29",
617
+ "emp_no"=>7,
618
+ "first_name"=>"Mack",
619
+ "gender"=>"F",
620
+ "hire_date"=>"1988-02-25",
621
+ "last_name"=>"Hambrick"},
622
+ {"birth_date"=>"1955-04-26",
623
+ "emp_no"=>4,
624
+ "first_name"=>"Zine",
625
+ "gender"=>"M",
626
+ "hire_date"=>[1, 2, ["foo", "bar"]],
627
+ "last_name"=>"Butner"},
628
+ {"birth_date"=>"1957-09-16",
629
+ "emp_no"=>4,
630
+ "first_name"=>"Aemilian",
631
+ "gender"=>"M",
632
+ "hire_date"=>[1, 2, ["foo", "bar"]],
633
+ "last_name"=>"Roccetti"},
634
+ {"birth_date"=>"1959-07-01",
635
+ "emp_no"=>4,
636
+ "first_name"=>"Dayanand",
637
+ "gender"=>"M",
638
+ "hire_date"=>[1, 2, ["foo", "bar"]],
639
+ "last_name"=>"Waterhouse"},
640
+ {"birth_date"=>"1961-04-28",
641
+ "emp_no"=>4,
642
+ "first_name"=>"Selwyn",
643
+ "gender"=>"F",
644
+ "hire_date"=>"1994-08-12",
645
+ "last_name"=>"Parascandalo"},
646
+ {"birth_date"=>"1962-07-06",
647
+ "emp_no"=>4,
648
+ "first_name"=>"Tristan",
649
+ "gender"=>"M",
650
+ "hire_date"=>[1, 2, ["foo", "bar"]],
651
+ "last_name"=>"Biran"}]
652
+ )
653
+ end
654
+
655
+ it 'update map' do
656
+ ddbcli('update all employees set hire_date = {foo:"bar", zoo:[1, 2, 3]} where gender = "M"')
657
+ out = ddbcli('select all * from employees')
658
+ out = JSON.parse(out)
659
+
660
+ expect(out).to eq(
661
+ [{"birth_date"=>"1956-05-15",
662
+ "emp_no"=>2,
663
+ "first_name"=>"Cathie",
664
+ "gender"=>"M",
665
+ "hire_date"=>{"foo"=>"bar", "zoo"=>[1, 2, 3]},
666
+ "last_name"=>"Keohane"},
667
+ {"birth_date"=>"1961-10-19",
668
+ "emp_no"=>2,
669
+ "first_name"=>"Collette",
670
+ "gender"=>"M",
671
+ "hire_date"=>{"foo"=>"bar", "zoo"=>[1, 2, 3]},
672
+ "last_name"=>"Ghemri"},
673
+ {"birth_date"=>"1964-04-30",
674
+ "emp_no"=>2,
675
+ "first_name"=>"Akhilish",
676
+ "gender"=>"F",
677
+ "hire_date"=>"1985-03-21",
678
+ "last_name"=>"Isaak"},
679
+ {"birth_date"=>"1963-07-14",
680
+ "emp_no"=>1,
681
+ "first_name"=>"Katsuyuki",
682
+ "gender"=>"F",
683
+ "hire_date"=>{"foo"=>"bar", "zoo"=>[1, 2, 3]},
684
+ "hire_date"=>"1989-12-28",
685
+ "last_name"=>"Weedon"},
686
+ {"birth_date"=>"1964-12-29",
687
+ "emp_no"=>7,
688
+ "first_name"=>"Mack",
689
+ "gender"=>"F",
690
+ "hire_date"=>"1988-02-25",
691
+ "last_name"=>"Hambrick"},
692
+ {"birth_date"=>"1955-04-26",
693
+ "emp_no"=>4,
694
+ "first_name"=>"Zine",
695
+ "gender"=>"M",
696
+ "hire_date"=>{"foo"=>"bar", "zoo"=>[1, 2, 3]},
697
+ "last_name"=>"Butner"},
698
+ {"birth_date"=>"1957-09-16",
699
+ "emp_no"=>4,
700
+ "first_name"=>"Aemilian",
701
+ "gender"=>"M",
702
+ "hire_date"=>{"foo"=>"bar", "zoo"=>[1, 2, 3]},
703
+ "last_name"=>"Roccetti"},
704
+ {"birth_date"=>"1959-07-01",
705
+ "emp_no"=>4,
706
+ "first_name"=>"Dayanand",
707
+ "gender"=>"M",
708
+ "hire_date"=>{"foo"=>"bar", "zoo"=>[1, 2, 3]},
709
+ "last_name"=>"Waterhouse"},
710
+ {"birth_date"=>"1961-04-28",
711
+ "emp_no"=>4,
712
+ "first_name"=>"Selwyn",
713
+ "gender"=>"F",
714
+ "hire_date"=>"1994-08-12",
715
+ "last_name"=>"Parascandalo"},
716
+ {"birth_date"=>"1962-07-06",
717
+ "emp_no"=>4,
718
+ "first_name"=>"Tristan",
719
+ "gender"=>"M",
720
+ "hire_date"=>{"foo"=>"bar", "zoo"=>[1, 2, 3]},
721
+ "last_name"=>"Biran"}]
722
+ )
723
+ end
312
724
  end
313
725
  end
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.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-11 00:00:00.000000000 Z
11
+ date: 2014-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -75,6 +75,7 @@ extra_rdoc_files: []
75
75
  files:
76
76
  - .gitignore
77
77
  - .rspec
78
+ - .travis.yml
78
79
  - Gemfile
79
80
  - LICENSE.txt
80
81
  - README.md