@hapiboo/dynamo-flux 1.0.2 → 1.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.
- package/dist/provider.js +7 -7
- package/package.json +1 -1
package/dist/provider.js
CHANGED
|
@@ -113,22 +113,22 @@ var dynamoHelper;
|
|
|
113
113
|
attributes.definition = definition;
|
|
114
114
|
function value(data) {
|
|
115
115
|
if (typeof data === 'number') {
|
|
116
|
-
return { [flux_1.
|
|
116
|
+
return { [flux_1.FluxDBColumn.Number]: data.toString() };
|
|
117
117
|
}
|
|
118
118
|
else if (typeof data === 'string') {
|
|
119
|
-
return { [flux_1.
|
|
119
|
+
return { [flux_1.FluxDBColumn.String]: data };
|
|
120
120
|
}
|
|
121
121
|
else if (typeof data === 'boolean') {
|
|
122
|
-
return { [flux_1.
|
|
122
|
+
return { [flux_1.FluxDBColumn.Boolean]: data };
|
|
123
123
|
}
|
|
124
124
|
else if (Buffer.isBuffer(data)) {
|
|
125
|
-
return { [flux_1.
|
|
125
|
+
return { [flux_1.FluxDBColumn.Binary]: data };
|
|
126
126
|
}
|
|
127
127
|
else if (Array.isArray(data)) {
|
|
128
|
-
return { [flux_1.
|
|
128
|
+
return { [flux_1.FluxDBColumn.List]: data.map((item) => { return value(item); }) };
|
|
129
129
|
}
|
|
130
130
|
else {
|
|
131
|
-
return { [flux_1.
|
|
131
|
+
return { [flux_1.FluxDBColumn.Object]: objectValue(data) };
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
attributes.value = value;
|
|
@@ -202,7 +202,7 @@ var dynamoHelper;
|
|
|
202
202
|
const idx = Array();
|
|
203
203
|
const attrs = Array();
|
|
204
204
|
const addedAttributes = Array();
|
|
205
|
-
attrs.push({ AttributeName: 'id', AttributeType: flux_1.
|
|
205
|
+
attrs.push({ AttributeName: 'id', AttributeType: flux_1.FluxDBColumn.String });
|
|
206
206
|
addedAttributes.push('id');
|
|
207
207
|
if (definition.indexes.length > 0) {
|
|
208
208
|
definition.indexes.forEach((item) => {
|