appfuel 0.6.4 → 0.6.5

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: 291bad00d1de9144841e6a765ac34115a6839246
4
- data.tar.gz: b5d4dd8aec1cf1fdaf3dfc6f788d3e3924eb168b
3
+ metadata.gz: f74bbf3635efafded1ca260d1281ba756b1eee15
4
+ data.tar.gz: 25ed32bc0ddaf5b13338a600433bbb916cf3fcfd
5
5
  SHA512:
6
- metadata.gz: 5669227bdc10b862bca2a77dfe1066776951b141f531fbd7a3596b41e886004158036fe0b2a57087b38e91e49b47e92c36def39cbfbe44f67824bd8f5f67d883
7
- data.tar.gz: 6de05a3a86a18f201ee4326a137e147ef2c1ddb60086fd73920f0ca1d2b62a365517f38ea8e1bdf13e53ca1e9c2de9c6cefdcceff5f2d27eafd64b009216d783
6
+ metadata.gz: 2ee094890d79beb03dca5b6c4e1d6876d658424386d1afd190729bdf3e836f97306505a0d04f3eff9fcc08ab1fa59e7a83bb865c7cf33a963ca30c6a6befceb3
7
+ data.tar.gz: 0363de28ffd4385cc8cd490f35f9567d972ca1cc945a139d7bd6895d26b69e4425ff1a4b877c9914bfe4a21eb60f2c6536b0ecd3f364c5b84c9bde0695ada289
data/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. (Pending ap
5
5
 
6
6
 
7
7
  # Releases
8
+ ## [[0.6.5]](https://github.com/rsb/appfuel/releases/tag/0.6.5) 2017-08-21
9
+ ### Added
10
+ - basic table query interface for dynamodb nosql adapter
11
+
8
12
  ## [[0.6.4]](https://github.com/rsb/appfuel/releases/tag/0.6.4) 2017-08-18
9
13
  ### Fixed
10
14
  - invalid reference to `feature_name` in action's `dispatch`
@@ -131,6 +131,24 @@ module Appfuel
131
131
 
132
132
  def select_index(key, select, key_expr, values = {})
133
133
  params = select_index_params(key, select, key_expr, values)
134
+ manual_query(params)
135
+ end
136
+
137
+ def basic_table_query_params(attrs_returned, key_expr, values = {})
138
+ create_table_hash(
139
+ table_name: table_name,
140
+ select: query_select_map(attrs_returned),
141
+ key_condition_expression: key_expr,
142
+ expression_attribute_values: values
143
+ )
144
+ end
145
+
146
+ def basic_table_query(attrs_returned, key_expr, values = {})
147
+ params = basic_table_query_params(attrs_returned, key_expr, values)
148
+ manual_query(params)
149
+ end
150
+
151
+ def manual_query(params)
134
152
  client.query(params)
135
153
  end
136
154
 
@@ -139,6 +157,18 @@ module Appfuel
139
157
  client.put_item(params)
140
158
  end
141
159
 
160
+ def batch_put(list)
161
+ cards = list.map do |card|
162
+ { put_request: { item: card } }
163
+ end
164
+
165
+ payload = {
166
+ request_items: { table_name => cards }
167
+ }
168
+
169
+ client.batch_write_item(payload)
170
+ end
171
+
142
172
  def get(hash_value, range_value = nil)
143
173
  result = get_item(hash_value, range_value)
144
174
  return false if result.item.nil?
@@ -1,3 +1,3 @@
1
1
  module Appfuel
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appfuel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Scott-Buccleuch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-18 00:00:00.000000000 Z
11
+ date: 2017-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord