@aws-amplify/datastore-storage-adapter 1.2.12-unstable.5 → 1.2.13-beta.8
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/CHANGELOG.md +8 -0
- package/dist/aws-amplify-datastore-storage-adapter.js +215 -198
- package/dist/aws-amplify-datastore-storage-adapter.js.map +1 -1
- package/dist/aws-amplify-datastore-storage-adapter.min.js +1 -1
- package/dist/aws-amplify-datastore-storage-adapter.min.js.map +1 -1
- package/lib/SQLiteAdapter/SQLiteAdapter.js +4 -2
- package/lib/SQLiteAdapter/SQLiteAdapter.js.map +1 -1
- package/lib/SQLiteAdapter/SQLiteDatabase.js +1 -1
- package/lib/SQLiteAdapter/SQLiteDatabase.js.map +1 -1
- package/lib/SQLiteAdapter/SQLiteUtils.js +27 -0
- package/lib/SQLiteAdapter/SQLiteUtils.js.map +1 -1
- package/lib-esm/SQLiteAdapter/SQLiteAdapter.js +4 -2
- package/lib-esm/SQLiteAdapter/SQLiteAdapter.js.map +1 -1
- package/lib-esm/SQLiteAdapter/SQLiteDatabase.js +1 -1
- package/lib-esm/SQLiteAdapter/SQLiteDatabase.js.map +1 -1
- package/lib-esm/SQLiteAdapter/SQLiteUtils.js +27 -0
- package/lib-esm/SQLiteAdapter/SQLiteUtils.js.map +1 -1
- package/package.json +6 -5
- package/src/SQLiteAdapter/SQLiteAdapter.ts +5 -5
- package/src/SQLiteAdapter/SQLiteDatabase.ts +7 -7
- package/src/SQLiteAdapter/SQLiteUtils.ts +33 -1
|
@@ -1,111 +1,28 @@
|
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(require("@aws-amplify/core"), require("
|
|
3
|
+
module.exports = factory(require("@aws-amplify/core"), require("react-native-sqlite-storage"), require("@aws-amplify/datastore"));
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define("aws-amplify-datastore-storage-adapter", ["@aws-amplify/core", "
|
|
5
|
+
define("aws-amplify-datastore-storage-adapter", ["@aws-amplify/core", "react-native-sqlite-storage", "@aws-amplify/datastore"], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["aws-amplify-datastore-storage-adapter"] = factory(require("@aws-amplify/core"), require("
|
|
7
|
+
exports["aws-amplify-datastore-storage-adapter"] = factory(require("@aws-amplify/core"), require("react-native-sqlite-storage"), require("@aws-amplify/datastore"));
|
|
8
8
|
else
|
|
9
|
-
root["aws-amplify-datastore-storage-adapter"] = factory(root["@aws-amplify/core"], root["
|
|
10
|
-
})(
|
|
11
|
-
return /******/ (
|
|
12
|
-
/******/
|
|
13
|
-
/******/ var
|
|
14
|
-
/******/
|
|
15
|
-
/******/ // The require function
|
|
16
|
-
/******/ function __webpack_require__(moduleId) {
|
|
17
|
-
/******/
|
|
18
|
-
/******/ // Check if module is in cache
|
|
19
|
-
/******/ if(installedModules[moduleId]) {
|
|
20
|
-
/******/ return installedModules[moduleId].exports;
|
|
21
|
-
/******/ }
|
|
22
|
-
/******/ // Create a new module (and put it into the cache)
|
|
23
|
-
/******/ var module = installedModules[moduleId] = {
|
|
24
|
-
/******/ i: moduleId,
|
|
25
|
-
/******/ l: false,
|
|
26
|
-
/******/ exports: {}
|
|
27
|
-
/******/ };
|
|
28
|
-
/******/
|
|
29
|
-
/******/ // Execute the module function
|
|
30
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
31
|
-
/******/
|
|
32
|
-
/******/ // Flag the module as loaded
|
|
33
|
-
/******/ module.l = true;
|
|
34
|
-
/******/
|
|
35
|
-
/******/ // Return the exports of the module
|
|
36
|
-
/******/ return module.exports;
|
|
37
|
-
/******/ }
|
|
38
|
-
/******/
|
|
39
|
-
/******/
|
|
40
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
41
|
-
/******/ __webpack_require__.m = modules;
|
|
42
|
-
/******/
|
|
43
|
-
/******/ // expose the module cache
|
|
44
|
-
/******/ __webpack_require__.c = installedModules;
|
|
45
|
-
/******/
|
|
46
|
-
/******/ // define getter function for harmony exports
|
|
47
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
48
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
49
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
50
|
-
/******/ }
|
|
51
|
-
/******/ };
|
|
52
|
-
/******/
|
|
53
|
-
/******/ // define __esModule on exports
|
|
54
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
55
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
56
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
57
|
-
/******/ }
|
|
58
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
59
|
-
/******/ };
|
|
60
|
-
/******/
|
|
61
|
-
/******/ // create a fake namespace object
|
|
62
|
-
/******/ // mode & 1: value is a module id, require it
|
|
63
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
64
|
-
/******/ // mode & 4: return value when already ns object
|
|
65
|
-
/******/ // mode & 8|1: behave like require
|
|
66
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
67
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
68
|
-
/******/ if(mode & 8) return value;
|
|
69
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
70
|
-
/******/ var ns = Object.create(null);
|
|
71
|
-
/******/ __webpack_require__.r(ns);
|
|
72
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
73
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
74
|
-
/******/ return ns;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
78
|
-
/******/ __webpack_require__.n = function(module) {
|
|
79
|
-
/******/ var getter = module && module.__esModule ?
|
|
80
|
-
/******/ function getDefault() { return module['default']; } :
|
|
81
|
-
/******/ function getModuleExports() { return module; };
|
|
82
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
83
|
-
/******/ return getter;
|
|
84
|
-
/******/ };
|
|
85
|
-
/******/
|
|
86
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
87
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // __webpack_public_path__
|
|
90
|
-
/******/ __webpack_require__.p = "";
|
|
91
|
-
/******/
|
|
92
|
-
/******/
|
|
93
|
-
/******/ // Load entry module and return exports
|
|
94
|
-
/******/ return __webpack_require__(__webpack_require__.s = "./lib-esm/index.js");
|
|
95
|
-
/******/ })
|
|
96
|
-
/************************************************************************/
|
|
97
|
-
/******/ ({
|
|
9
|
+
root["aws-amplify-datastore-storage-adapter"] = factory(root["@aws-amplify/core"], root["react-native-sqlite-storage"], root["@aws-amplify/datastore"]);
|
|
10
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE__aws_amplify_core__, __WEBPACK_EXTERNAL_MODULE_react_native_sqlite_storage__, __WEBPACK_EXTERNAL_MODULE__aws_amplify_datastore__) => {
|
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
|
12
|
+
/******/ "use strict";
|
|
13
|
+
/******/ var __webpack_modules__ = ({
|
|
98
14
|
|
|
99
15
|
/***/ "./lib-esm/SQLiteAdapter/SQLiteAdapter.js":
|
|
100
16
|
/*!************************************************!*\
|
|
101
17
|
!*** ./lib-esm/SQLiteAdapter/SQLiteAdapter.js ***!
|
|
102
18
|
\************************************************/
|
|
103
|
-
|
|
104
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
19
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
105
20
|
|
|
106
|
-
"use strict";
|
|
107
21
|
__webpack_require__.r(__webpack_exports__);
|
|
108
|
-
/* harmony export
|
|
22
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23
|
+
/* harmony export */ "SQLiteAdapter": () => (/* binding */ SQLiteAdapter),
|
|
24
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
25
|
+
/* harmony export */ });
|
|
109
26
|
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
|
|
110
27
|
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
111
28
|
/* harmony import */ var _SQLiteDatabase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SQLiteDatabase */ "./lib-esm/SQLiteAdapter/SQLiteDatabase.js");
|
|
@@ -329,10 +246,10 @@ var __values = undefined && undefined.__values || function (o) {
|
|
|
329
246
|
|
|
330
247
|
|
|
331
248
|
|
|
332
|
-
var traverseModel = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
333
|
-
validatePredicate = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
334
|
-
isModelConstructor = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
335
|
-
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__
|
|
249
|
+
var traverseModel = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.utils.traverseModel,
|
|
250
|
+
validatePredicate = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.utils.validatePredicate,
|
|
251
|
+
isModelConstructor = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.utils.isModelConstructor;
|
|
252
|
+
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__.ConsoleLogger('DataStore');
|
|
336
253
|
|
|
337
254
|
var SQLiteAdapter =
|
|
338
255
|
/** @class */
|
|
@@ -392,7 +309,7 @@ function () {
|
|
|
392
309
|
case 5:
|
|
393
310
|
_a.sent();
|
|
394
311
|
|
|
395
|
-
statements =
|
|
312
|
+
statements = (0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.generateSchemaStatements)(this.schema);
|
|
396
313
|
return [4
|
|
397
314
|
/*yield*/
|
|
398
315
|
, this.db.createSchema(statements)];
|
|
@@ -468,7 +385,7 @@ function () {
|
|
|
468
385
|
instance: instance
|
|
469
386
|
};
|
|
470
387
|
});
|
|
471
|
-
_b = __read(
|
|
388
|
+
_b = __read((0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.queryByIdStatement)(model.id, tableName), 2), queryStatement = _b[0], params = _b[1];
|
|
472
389
|
return [4
|
|
473
390
|
/*yield*/
|
|
474
391
|
, this.db.get(queryStatement, params)];
|
|
@@ -477,7 +394,7 @@ function () {
|
|
|
477
394
|
fromDB = _d.sent();
|
|
478
395
|
|
|
479
396
|
if (condition && fromDB) {
|
|
480
|
-
predicates = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
397
|
+
predicates = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.ModelPredicateCreator.getPredicates(condition);
|
|
481
398
|
predicateObjs = predicates.predicates, type = predicates.type;
|
|
482
399
|
isValid = validatePredicate(fromDB, type, predicateObjs);
|
|
483
400
|
|
|
@@ -513,17 +430,21 @@ function () {
|
|
|
513
430
|
resItem = connectionStoreNames_1_1.value;
|
|
514
431
|
modelName = resItem.modelName, item = resItem.item, instance = resItem.instance;
|
|
515
432
|
id = item.id;
|
|
516
|
-
_c = __read(
|
|
433
|
+
_c = __read((0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.queryByIdStatement)(id, modelName), 2), queryStatement_1 = _c[0], params_1 = _c[1];
|
|
517
434
|
return [4
|
|
518
435
|
/*yield*/
|
|
519
436
|
, this.db.get(queryStatement_1, params_1)];
|
|
520
437
|
|
|
521
438
|
case 5:
|
|
522
439
|
fromDB_1 = _d.sent();
|
|
523
|
-
opType = fromDB_1 === undefined ? _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
524
|
-
saveStatement = fromDB_1 ?
|
|
525
|
-
|
|
526
|
-
|
|
440
|
+
opType = fromDB_1 === undefined ? _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.OpType.INSERT : _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.OpType.UPDATE;
|
|
441
|
+
saveStatement = fromDB_1 ? (0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.modelUpdateStatement)(instance, modelName) : (0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.modelInsertStatement)(instance, modelName);
|
|
442
|
+
|
|
443
|
+
if (id === model.id || opType === _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.OpType.INSERT) {
|
|
444
|
+
saveStatements.add(saveStatement);
|
|
445
|
+
result.push([instance, opType]);
|
|
446
|
+
}
|
|
447
|
+
|
|
527
448
|
_d.label = 6;
|
|
528
449
|
|
|
529
450
|
case 6:
|
|
@@ -684,7 +605,7 @@ function () {
|
|
|
684
605
|
if (!recordItem[getByfield]) return [3
|
|
685
606
|
/*break*/
|
|
686
607
|
, 9];
|
|
687
|
-
_e = __read(
|
|
608
|
+
_e = __read((0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.queryByIdStatement)(recordItem[getByfield], tableName), 2), queryStatement = _e[0], params = _e[1];
|
|
688
609
|
return [4
|
|
689
610
|
/*yield*/
|
|
690
611
|
, this.db.get(queryStatement, params)];
|
|
@@ -768,7 +689,7 @@ function () {
|
|
|
768
689
|
if (!recordItem[targetName]) return [3
|
|
769
690
|
/*break*/
|
|
770
691
|
, 21];
|
|
771
|
-
_f = __read(
|
|
692
|
+
_f = __read((0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.queryByIdStatement)(recordItem[targetName], tableName), 2), queryStatement = _f[0], params = _f[1];
|
|
772
693
|
return [4
|
|
773
694
|
/*yield*/
|
|
774
695
|
, this.db.get(queryStatement, params)];
|
|
@@ -916,8 +837,8 @@ function () {
|
|
|
916
837
|
case 0:
|
|
917
838
|
tableName = modelConstructor.name;
|
|
918
839
|
namespaceName = this.namespaceResolver(modelConstructor);
|
|
919
|
-
predicates = predicate && _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
920
|
-
sortPredicates = pagination && pagination.sort && _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
840
|
+
predicates = predicate && _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.ModelPredicateCreator.getPredicates(predicate);
|
|
841
|
+
sortPredicates = pagination && pagination.sort && _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.ModelSortPredicateCreator.getPredicates(pagination.sort);
|
|
921
842
|
limit = pagination && pagination.limit;
|
|
922
843
|
page = limit && pagination.page;
|
|
923
844
|
queryById = predicates && this.idFromPredicate(predicates);
|
|
@@ -944,7 +865,7 @@ function () {
|
|
|
944
865
|
, record ? [record] : []];
|
|
945
866
|
|
|
946
867
|
case 2:
|
|
947
|
-
_a = __read(
|
|
868
|
+
_a = __read((0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.queryAllStatement)(tableName, predicates, sortPredicates, limit, page), 2), queryStatement = _a[0], params = _a[1];
|
|
948
869
|
return [4
|
|
949
870
|
/*yield*/
|
|
950
871
|
, this.db.getAll(queryStatement, params)];
|
|
@@ -980,7 +901,7 @@ function () {
|
|
|
980
901
|
return __generator(this, function (_b) {
|
|
981
902
|
switch (_b.label) {
|
|
982
903
|
case 0:
|
|
983
|
-
_a = __read(
|
|
904
|
+
_a = __read((0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.queryByIdStatement)(id, tableName), 2), queryStatement = _a[0], params = _a[1];
|
|
984
905
|
return [4
|
|
985
906
|
/*yield*/
|
|
986
907
|
, this.db.get(queryStatement, params)];
|
|
@@ -998,14 +919,14 @@ function () {
|
|
|
998
919
|
SQLiteAdapter.prototype.idFromPredicate = function (predicates) {
|
|
999
920
|
var predicateObjs = predicates.predicates;
|
|
1000
921
|
var idPredicate = predicateObjs.length === 1 && predicateObjs.find(function (p) {
|
|
1001
|
-
return
|
|
922
|
+
return (0,_aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.isPredicateObj)(p) && p.field === 'id' && p.operator === 'eq';
|
|
1002
923
|
});
|
|
1003
924
|
return idPredicate && idPredicate.operand;
|
|
1004
925
|
};
|
|
1005
926
|
|
|
1006
927
|
SQLiteAdapter.prototype.queryOne = function (modelConstructor, firstOrLast) {
|
|
1007
928
|
if (firstOrLast === void 0) {
|
|
1008
|
-
firstOrLast = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
929
|
+
firstOrLast = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.QueryOne.FIRST;
|
|
1009
930
|
}
|
|
1010
931
|
|
|
1011
932
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1015,7 +936,7 @@ function () {
|
|
|
1015
936
|
switch (_b.label) {
|
|
1016
937
|
case 0:
|
|
1017
938
|
tableName = modelConstructor.name;
|
|
1018
|
-
_a = __read(
|
|
939
|
+
_a = __read((0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.queryOneStatement)(firstOrLast, tableName), 2), queryStatement = _a[0], params = _a[1];
|
|
1019
940
|
return [4
|
|
1020
941
|
/*yield*/
|
|
1021
942
|
, this.db.get(queryStatement, params)];
|
|
@@ -1047,9 +968,9 @@ function () {
|
|
|
1047
968
|
modelConstructor = modelOrModelConstructor;
|
|
1048
969
|
namespaceName = this.namespaceResolver(modelConstructor);
|
|
1049
970
|
tableName = modelConstructor.name;
|
|
1050
|
-
predicates = condition && _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
1051
|
-
queryStatement =
|
|
1052
|
-
deleteStatement =
|
|
971
|
+
predicates = condition && _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.ModelPredicateCreator.getPredicates(condition);
|
|
972
|
+
queryStatement = (0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.queryAllStatement)(tableName, predicates);
|
|
973
|
+
deleteStatement = (0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.deleteByPredicateStatement)(tableName, predicates);
|
|
1053
974
|
return [4
|
|
1054
975
|
/*yield*/
|
|
1055
976
|
, this.db.selectAndDelete(queryStatement, deleteStatement)];
|
|
@@ -1073,7 +994,7 @@ function () {
|
|
|
1073
994
|
if (!condition) return [3
|
|
1074
995
|
/*break*/
|
|
1075
996
|
, 6];
|
|
1076
|
-
_a = __read(
|
|
997
|
+
_a = __read((0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.queryByIdStatement)(model.id, tableName), 2), queryStatement = _a[0], params = _a[1];
|
|
1077
998
|
return [4
|
|
1078
999
|
/*yield*/
|
|
1079
1000
|
, this.db.get(queryStatement, params)];
|
|
@@ -1091,7 +1012,7 @@ function () {
|
|
|
1091
1012
|
, [[model], []]];
|
|
1092
1013
|
}
|
|
1093
1014
|
|
|
1094
|
-
predicates = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
1015
|
+
predicates = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.ModelPredicateCreator.getPredicates(condition);
|
|
1095
1016
|
predicateObjs = predicates.predicates, type = predicates.type;
|
|
1096
1017
|
isValid = validatePredicate(fromDB, type, predicateObjs);
|
|
1097
1018
|
|
|
@@ -1104,7 +1025,7 @@ function () {
|
|
|
1104
1025
|
throw new Error(msg);
|
|
1105
1026
|
}
|
|
1106
1027
|
|
|
1107
|
-
_b = __read(
|
|
1028
|
+
_b = __read((0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.deleteByIdStatement)(model.id, tableName), 2), deleteStatement = _b[0], deleteParams = _b[1];
|
|
1108
1029
|
return [4
|
|
1109
1030
|
/*yield*/
|
|
1110
1031
|
, this.db.save(deleteStatement, deleteParams)];
|
|
@@ -1117,7 +1038,7 @@ function () {
|
|
|
1117
1038
|
, [[model], [model]]];
|
|
1118
1039
|
|
|
1119
1040
|
case 6:
|
|
1120
|
-
_c = __read(
|
|
1041
|
+
_c = __read((0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.deleteByIdStatement)(model.id, tableName), 2), deleteStatement = _c[0], params = _c[1];
|
|
1121
1042
|
return [4
|
|
1122
1043
|
/*yield*/
|
|
1123
1044
|
, this.db.save(deleteStatement, params)];
|
|
@@ -1160,12 +1081,12 @@ function () {
|
|
|
1160
1081
|
|
|
1161
1082
|
if (_deleted) {
|
|
1162
1083
|
// create the delete statements right away
|
|
1163
|
-
var deleteStatement =
|
|
1084
|
+
var deleteStatement = (0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.deleteByIdStatement)(instance.id, tableName);
|
|
1164
1085
|
deleteStatements.add(deleteStatement);
|
|
1165
|
-
result.push([item, _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
1086
|
+
result.push([item, _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.OpType.DELETE]);
|
|
1166
1087
|
} else {
|
|
1167
1088
|
// query statements for the saves at first
|
|
1168
|
-
var queryStatement =
|
|
1089
|
+
var queryStatement = (0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.queryByIdStatement)(id, tableName);
|
|
1169
1090
|
queryStatements.add(queryStatement); // combination of insert and update items
|
|
1170
1091
|
|
|
1171
1092
|
itemsToSave.push(instance);
|
|
@@ -1200,13 +1121,13 @@ function () {
|
|
|
1200
1121
|
queryResponses = _b.sent();
|
|
1201
1122
|
queryResponses.forEach(function (response, idx) {
|
|
1202
1123
|
if (response === undefined) {
|
|
1203
|
-
var insertStatement =
|
|
1124
|
+
var insertStatement = (0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.modelInsertStatement)(itemsToSave[idx], tableName);
|
|
1204
1125
|
saveStatements.add(insertStatement);
|
|
1205
|
-
result.push([itemsToSave[idx], _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
1126
|
+
result.push([itemsToSave[idx], _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.OpType.INSERT]);
|
|
1206
1127
|
} else {
|
|
1207
|
-
var updateStatement =
|
|
1128
|
+
var updateStatement = (0,_SQLiteUtils__WEBPACK_IMPORTED_MODULE_2__.modelUpdateStatement)(itemsToSave[idx], tableName);
|
|
1208
1129
|
saveStatements.add(updateStatement);
|
|
1209
|
-
result.push([itemsToSave[idx], _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__
|
|
1130
|
+
result.push([itemsToSave[idx], _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_3__.OpType.UPDATE]);
|
|
1210
1131
|
}
|
|
1211
1132
|
}); // perform all of the insert/update/delete operations in a single transaction
|
|
1212
1133
|
|
|
@@ -1230,7 +1151,7 @@ function () {
|
|
|
1230
1151
|
}();
|
|
1231
1152
|
|
|
1232
1153
|
|
|
1233
|
-
/* harmony default export */
|
|
1154
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (new SQLiteAdapter());
|
|
1234
1155
|
|
|
1235
1156
|
/***/ }),
|
|
1236
1157
|
|
|
@@ -1238,11 +1159,12 @@ function () {
|
|
|
1238
1159
|
/*!*************************************************!*\
|
|
1239
1160
|
!*** ./lib-esm/SQLiteAdapter/SQLiteDatabase.js ***!
|
|
1240
1161
|
\*************************************************/
|
|
1241
|
-
|
|
1242
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1162
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1243
1163
|
|
|
1244
|
-
"use strict";
|
|
1245
1164
|
__webpack_require__.r(__webpack_exports__);
|
|
1165
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1166
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1167
|
+
/* harmony export */ });
|
|
1246
1168
|
/* harmony import */ var react_native_sqlite_storage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-native-sqlite-storage */ "react-native-sqlite-storage");
|
|
1247
1169
|
/* harmony import */ var react_native_sqlite_storage__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_native_sqlite_storage__WEBPACK_IMPORTED_MODULE_0__);
|
|
1248
1170
|
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
|
|
@@ -1436,11 +1358,11 @@ var __values = undefined && undefined.__values || function (o) {
|
|
|
1436
1358
|
|
|
1437
1359
|
|
|
1438
1360
|
|
|
1439
|
-
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__
|
|
1440
|
-
react_native_sqlite_storage__WEBPACK_IMPORTED_MODULE_0___default.
|
|
1361
|
+
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__.ConsoleLogger('SQLiteDatabase');
|
|
1362
|
+
react_native_sqlite_storage__WEBPACK_IMPORTED_MODULE_0___default().enablePromise(true);
|
|
1441
1363
|
|
|
1442
|
-
if (_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__
|
|
1443
|
-
react_native_sqlite_storage__WEBPACK_IMPORTED_MODULE_0___default.
|
|
1364
|
+
if (_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__.ConsoleLogger.LOG_LEVEL === 'DEBUG') {
|
|
1365
|
+
react_native_sqlite_storage__WEBPACK_IMPORTED_MODULE_0___default().DEBUG(true);
|
|
1444
1366
|
}
|
|
1445
1367
|
|
|
1446
1368
|
var DB_NAME = 'AmplifyDatastore';
|
|
@@ -1476,7 +1398,7 @@ function () {
|
|
|
1476
1398
|
_a = this;
|
|
1477
1399
|
return [4
|
|
1478
1400
|
/*yield*/
|
|
1479
|
-
, react_native_sqlite_storage__WEBPACK_IMPORTED_MODULE_0___default.
|
|
1401
|
+
, react_native_sqlite_storage__WEBPACK_IMPORTED_MODULE_0___default().openDatabase(DB_NAME, DB_VERSION, DB_DISPLAYNAME, DB_SIZE)];
|
|
1480
1402
|
|
|
1481
1403
|
case 1:
|
|
1482
1404
|
_a.db = _b.sent();
|
|
@@ -1521,7 +1443,7 @@ function () {
|
|
|
1521
1443
|
logger.debug('Deleting database');
|
|
1522
1444
|
return [4
|
|
1523
1445
|
/*yield*/
|
|
1524
|
-
, react_native_sqlite_storage__WEBPACK_IMPORTED_MODULE_0___default.
|
|
1446
|
+
, react_native_sqlite_storage__WEBPACK_IMPORTED_MODULE_0___default().deleteDatabase(DB_NAME)];
|
|
1525
1447
|
|
|
1526
1448
|
case 2:
|
|
1527
1449
|
_a.sent();
|
|
@@ -1551,7 +1473,7 @@ function () {
|
|
|
1551
1473
|
result = resultSet && resultSet.rows && resultSet.rows.length && resultSet.rows.raw && resultSet.rows.raw();
|
|
1552
1474
|
return [2
|
|
1553
1475
|
/*return*/
|
|
1554
|
-
, result[0] || undefined];
|
|
1476
|
+
, (result === null || result === void 0 ? void 0 : result[0]) || undefined];
|
|
1555
1477
|
}
|
|
1556
1478
|
});
|
|
1557
1479
|
});
|
|
@@ -1807,7 +1729,7 @@ function () {
|
|
|
1807
1729
|
return SQLiteDatabase;
|
|
1808
1730
|
}();
|
|
1809
1731
|
|
|
1810
|
-
/* harmony default export */
|
|
1732
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SQLiteDatabase);
|
|
1811
1733
|
|
|
1812
1734
|
/***/ }),
|
|
1813
1735
|
|
|
@@ -1815,24 +1737,24 @@ function () {
|
|
|
1815
1737
|
/*!**********************************************!*\
|
|
1816
1738
|
!*** ./lib-esm/SQLiteAdapter/SQLiteUtils.js ***!
|
|
1817
1739
|
\**********************************************/
|
|
1818
|
-
|
|
1819
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1740
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1820
1741
|
|
|
1821
|
-
"use strict";
|
|
1822
1742
|
__webpack_require__.r(__webpack_exports__);
|
|
1823
|
-
/* harmony export
|
|
1824
|
-
/* harmony export
|
|
1825
|
-
/* harmony export
|
|
1826
|
-
/* harmony export
|
|
1827
|
-
/* harmony export
|
|
1828
|
-
/* harmony export
|
|
1829
|
-
/* harmony export
|
|
1830
|
-
/* harmony export
|
|
1831
|
-
/* harmony export
|
|
1832
|
-
/* harmony export
|
|
1833
|
-
/* harmony export
|
|
1834
|
-
/* harmony export
|
|
1835
|
-
/* harmony export
|
|
1743
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1744
|
+
/* harmony export */ "deleteByIdStatement": () => (/* binding */ deleteByIdStatement),
|
|
1745
|
+
/* harmony export */ "deleteByPredicateStatement": () => (/* binding */ deleteByPredicateStatement),
|
|
1746
|
+
/* harmony export */ "generateSchemaStatements": () => (/* binding */ generateSchemaStatements),
|
|
1747
|
+
/* harmony export */ "implicitAuthFieldsForModel": () => (/* binding */ implicitAuthFieldsForModel),
|
|
1748
|
+
/* harmony export */ "limitClauseFromPagination": () => (/* binding */ limitClauseFromPagination),
|
|
1749
|
+
/* harmony export */ "modelCreateTableStatement": () => (/* binding */ modelCreateTableStatement),
|
|
1750
|
+
/* harmony export */ "modelInsertStatement": () => (/* binding */ modelInsertStatement),
|
|
1751
|
+
/* harmony export */ "modelUpdateStatement": () => (/* binding */ modelUpdateStatement),
|
|
1752
|
+
/* harmony export */ "orderByClauseFromSort": () => (/* binding */ orderByClauseFromSort),
|
|
1753
|
+
/* harmony export */ "queryAllStatement": () => (/* binding */ queryAllStatement),
|
|
1754
|
+
/* harmony export */ "queryByIdStatement": () => (/* binding */ queryByIdStatement),
|
|
1755
|
+
/* harmony export */ "queryOneStatement": () => (/* binding */ queryOneStatement),
|
|
1756
|
+
/* harmony export */ "whereClauseFromPredicate": () => (/* binding */ whereClauseFromPredicate)
|
|
1757
|
+
/* harmony export */ });
|
|
1836
1758
|
/* harmony import */ var _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/datastore */ "@aws-amplify/datastore");
|
|
1837
1759
|
/* harmony import */ var _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__);
|
|
1838
1760
|
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./types */ "./lib-esm/SQLiteAdapter/types.js");
|
|
@@ -1900,9 +1822,9 @@ var __values = undefined && undefined.__values || function (o) {
|
|
|
1900
1822
|
|
|
1901
1823
|
|
|
1902
1824
|
|
|
1903
|
-
var USER = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__
|
|
1904
|
-
isNonModelConstructor = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__
|
|
1905
|
-
isModelConstructor = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__
|
|
1825
|
+
var USER = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__.utils.USER,
|
|
1826
|
+
isNonModelConstructor = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__.utils.isNonModelConstructor,
|
|
1827
|
+
isModelConstructor = _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__.utils.isModelConstructor;
|
|
1906
1828
|
|
|
1907
1829
|
var keysFromModel = function keysFromModel(model) {
|
|
1908
1830
|
return Object.keys(model).map(function (k) {
|
|
@@ -1967,7 +1889,7 @@ var implicitAuthFieldsForModel = function implicitAuthFieldsForModel(model) {
|
|
|
1967
1889
|
return [];
|
|
1968
1890
|
}
|
|
1969
1891
|
|
|
1970
|
-
var authRules = model.attributes.find(_aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__
|
|
1892
|
+
var authRules = model.attributes.find(_aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__.isModelAttributeAuth);
|
|
1971
1893
|
|
|
1972
1894
|
if (!authRules) {
|
|
1973
1895
|
return [];
|
|
@@ -1993,12 +1915,12 @@ function modelCreateTableStatement(model, userModel) {
|
|
|
1993
1915
|
|
|
1994
1916
|
var implicitAuthFields = implicitAuthFieldsForModel(model);
|
|
1995
1917
|
var fields = Object.values(model.fields).reduce(function (acc, field) {
|
|
1996
|
-
if (
|
|
1918
|
+
if ((0,_aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__.isGraphQLScalarType)(field.type)) {
|
|
1997
1919
|
if (field.name === 'id') {
|
|
1998
1920
|
return acc + '"id" PRIMARY KEY NOT NULL';
|
|
1999
1921
|
}
|
|
2000
1922
|
|
|
2001
|
-
var columnParam_1 = "\"" + field.name + "\" " +
|
|
1923
|
+
var columnParam_1 = "\"" + field.name + "\" " + (0,_types__WEBPACK_IMPORTED_MODULE_1__.getSQLiteType)(field.type);
|
|
2002
1924
|
|
|
2003
1925
|
if (field.isRequired) {
|
|
2004
1926
|
columnParam_1 += ' NOT NULL';
|
|
@@ -2007,10 +1929,10 @@ function modelCreateTableStatement(model, userModel) {
|
|
|
2007
1929
|
return acc + (", " + columnParam_1);
|
|
2008
1930
|
}
|
|
2009
1931
|
|
|
2010
|
-
if (
|
|
1932
|
+
if ((0,_aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__.isModelFieldType)(field.type)) {
|
|
2011
1933
|
var columnParam_2 = "\"" + field.name + "\" TEXT"; // add targetName as well as field name for BELONGS_TO relations
|
|
2012
1934
|
|
|
2013
|
-
if (
|
|
1935
|
+
if ((0,_aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__.isTargetNameAssociation)(field.association)) {
|
|
2014
1936
|
// check if this field has been explicitly defined in the model
|
|
2015
1937
|
var fkDefinedInModel = Object.values(model.fields).find(function (f) {
|
|
2016
1938
|
return f.name === field.association.targetName;
|
|
@@ -2090,11 +2012,41 @@ var logicalOperatorMap = {
|
|
|
2090
2012
|
notContains: 'NOT LIKE',
|
|
2091
2013
|
between: 'BETWEEN'
|
|
2092
2014
|
};
|
|
2015
|
+
/**
|
|
2016
|
+
* If the given (operator, operand) indicate the need for a special `NULL` comparison,
|
|
2017
|
+
* that `WHERE` clause condition will be returned. If not special `NULL` handling is
|
|
2018
|
+
* needed, `null` will be returned, and the caller should construct the `WHERE`
|
|
2019
|
+
* clause component using the normal operator map(s) and parameterization.
|
|
2020
|
+
*
|
|
2021
|
+
* @param operator "beginsWith" | "contains" | "notContains" | "between"
|
|
2022
|
+
* | "eq" | "ne" | "le" | "lt" | "ge" | "gt"
|
|
2023
|
+
* @param operand any
|
|
2024
|
+
* @returns (string | null) The `WHERE` clause component or `null` if N/A.
|
|
2025
|
+
*/
|
|
2026
|
+
|
|
2027
|
+
function buildSpecialNullComparison(field, operator, operand) {
|
|
2028
|
+
if (operand === null || operand === undefined) {
|
|
2029
|
+
if (operator === 'eq') {
|
|
2030
|
+
return "\"" + field + "\" IS NULL";
|
|
2031
|
+
} else if (operator === 'ne') {
|
|
2032
|
+
return "\"" + field + "\" IS NOT NULL";
|
|
2033
|
+
}
|
|
2034
|
+
} // no special null handling required
|
|
2035
|
+
|
|
2036
|
+
|
|
2037
|
+
return null;
|
|
2038
|
+
}
|
|
2093
2039
|
|
|
2094
2040
|
var whereConditionFromPredicateObject = function whereConditionFromPredicateObject(_a) {
|
|
2095
2041
|
var field = _a.field,
|
|
2096
2042
|
operator = _a.operator,
|
|
2097
2043
|
operand = _a.operand;
|
|
2044
|
+
var specialNullClause = buildSpecialNullComparison(field, operator, operand);
|
|
2045
|
+
|
|
2046
|
+
if (specialNullClause) {
|
|
2047
|
+
return [specialNullClause, []];
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2098
2050
|
var comparisonOperator = comparisonOperatorMap[operator];
|
|
2099
2051
|
|
|
2100
2052
|
if (comparisonOperator) {
|
|
@@ -2152,7 +2104,7 @@ function whereClauseFromPredicate(predicate) {
|
|
|
2152
2104
|
params = [];
|
|
2153
2105
|
}
|
|
2154
2106
|
|
|
2155
|
-
if (
|
|
2107
|
+
if ((0,_aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__.isPredicateGroup)(predicate)) {
|
|
2156
2108
|
var groupType = predicate.type,
|
|
2157
2109
|
groupPredicates = predicate.predicates;
|
|
2158
2110
|
var filterType = '';
|
|
@@ -2196,7 +2148,7 @@ function whereClauseFromPredicate(predicate) {
|
|
|
2196
2148
|
}
|
|
2197
2149
|
|
|
2198
2150
|
result.push((isNegation ? 'NOT' : '') + "(" + groupResult.join(" " + filterType + " ") + ")");
|
|
2199
|
-
} else if (
|
|
2151
|
+
} else if ((0,_aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__.isPredicateObj)(predicate)) {
|
|
2200
2152
|
var _b = __read(whereConditionFromPredicateObject(predicate), 2),
|
|
2201
2153
|
condition = _b[0],
|
|
2202
2154
|
conditionParams = _b[1];
|
|
@@ -2268,7 +2220,7 @@ function queryAllStatement(tableName, predicate, sort, limit, page) {
|
|
|
2268
2220
|
return [statement, params];
|
|
2269
2221
|
}
|
|
2270
2222
|
function queryOneStatement(firstOrLast, tableName) {
|
|
2271
|
-
if (firstOrLast === _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__
|
|
2223
|
+
if (firstOrLast === _aws_amplify_datastore__WEBPACK_IMPORTED_MODULE_0__.QueryOne.FIRST) {
|
|
2272
2224
|
// ORDER BY rowid will no longer work as expected if a customer has
|
|
2273
2225
|
// a field by that name in their schema. We may want to enforce it
|
|
2274
2226
|
// as a reserved keyword in Codegen
|
|
@@ -2303,12 +2255,12 @@ function deleteByPredicateStatement(tableName, predicate) {
|
|
|
2303
2255
|
/*!****************************************!*\
|
|
2304
2256
|
!*** ./lib-esm/SQLiteAdapter/types.js ***!
|
|
2305
2257
|
\****************************************/
|
|
2306
|
-
|
|
2307
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2258
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2308
2259
|
|
|
2309
|
-
"use strict";
|
|
2310
2260
|
__webpack_require__.r(__webpack_exports__);
|
|
2311
|
-
/* harmony export
|
|
2261
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2262
|
+
/* harmony export */ "getSQLiteType": () => (/* binding */ getSQLiteType)
|
|
2263
|
+
/* harmony export */ });
|
|
2312
2264
|
function getSQLiteType(scalar) {
|
|
2313
2265
|
switch (scalar) {
|
|
2314
2266
|
case 'Boolean':
|
|
@@ -2337,31 +2289,13 @@ function getSQLiteType(scalar) {
|
|
|
2337
2289
|
}
|
|
2338
2290
|
}
|
|
2339
2291
|
|
|
2340
|
-
/***/ }),
|
|
2341
|
-
|
|
2342
|
-
/***/ "./lib-esm/index.js":
|
|
2343
|
-
/*!**************************!*\
|
|
2344
|
-
!*** ./lib-esm/index.js ***!
|
|
2345
|
-
\**************************/
|
|
2346
|
-
/*! exports provided: SQLiteAdapter */
|
|
2347
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2348
|
-
|
|
2349
|
-
"use strict";
|
|
2350
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2351
|
-
/* harmony import */ var _SQLiteAdapter_SQLiteAdapter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SQLiteAdapter/SQLiteAdapter */ "./lib-esm/SQLiteAdapter/SQLiteAdapter.js");
|
|
2352
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SQLiteAdapter", function() { return _SQLiteAdapter_SQLiteAdapter__WEBPACK_IMPORTED_MODULE_0__["default"]; });
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
2292
|
/***/ }),
|
|
2358
2293
|
|
|
2359
2294
|
/***/ "@aws-amplify/core":
|
|
2360
2295
|
/*!************************************!*\
|
|
2361
2296
|
!*** external "@aws-amplify/core" ***!
|
|
2362
2297
|
\************************************/
|
|
2363
|
-
|
|
2364
|
-
/***/ (function(module, exports) {
|
|
2298
|
+
/***/ ((module) => {
|
|
2365
2299
|
|
|
2366
2300
|
module.exports = __WEBPACK_EXTERNAL_MODULE__aws_amplify_core__;
|
|
2367
2301
|
|
|
@@ -2371,8 +2305,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__aws_amplify_core__;
|
|
|
2371
2305
|
/*!*****************************************!*\
|
|
2372
2306
|
!*** external "@aws-amplify/datastore" ***!
|
|
2373
2307
|
\*****************************************/
|
|
2374
|
-
|
|
2375
|
-
/***/ (function(module, exports) {
|
|
2308
|
+
/***/ ((module) => {
|
|
2376
2309
|
|
|
2377
2310
|
module.exports = __WEBPACK_EXTERNAL_MODULE__aws_amplify_datastore__;
|
|
2378
2311
|
|
|
@@ -2382,13 +2315,97 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__aws_amplify_datastore__;
|
|
|
2382
2315
|
/*!**********************************************!*\
|
|
2383
2316
|
!*** external "react-native-sqlite-storage" ***!
|
|
2384
2317
|
\**********************************************/
|
|
2385
|
-
|
|
2386
|
-
/***/ (function(module, exports) {
|
|
2318
|
+
/***/ ((module) => {
|
|
2387
2319
|
|
|
2388
2320
|
module.exports = __WEBPACK_EXTERNAL_MODULE_react_native_sqlite_storage__;
|
|
2389
2321
|
|
|
2390
2322
|
/***/ })
|
|
2391
2323
|
|
|
2392
|
-
/******/
|
|
2324
|
+
/******/ });
|
|
2325
|
+
/************************************************************************/
|
|
2326
|
+
/******/ // The module cache
|
|
2327
|
+
/******/ var __webpack_module_cache__ = {};
|
|
2328
|
+
/******/
|
|
2329
|
+
/******/ // The require function
|
|
2330
|
+
/******/ function __webpack_require__(moduleId) {
|
|
2331
|
+
/******/ // Check if module is in cache
|
|
2332
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
2333
|
+
/******/ if (cachedModule !== undefined) {
|
|
2334
|
+
/******/ return cachedModule.exports;
|
|
2335
|
+
/******/ }
|
|
2336
|
+
/******/ // Create a new module (and put it into the cache)
|
|
2337
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
2338
|
+
/******/ // no module.id needed
|
|
2339
|
+
/******/ // no module.loaded needed
|
|
2340
|
+
/******/ exports: {}
|
|
2341
|
+
/******/ };
|
|
2342
|
+
/******/
|
|
2343
|
+
/******/ // Execute the module function
|
|
2344
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
2345
|
+
/******/
|
|
2346
|
+
/******/ // Return the exports of the module
|
|
2347
|
+
/******/ return module.exports;
|
|
2348
|
+
/******/ }
|
|
2349
|
+
/******/
|
|
2350
|
+
/************************************************************************/
|
|
2351
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
2352
|
+
/******/ (() => {
|
|
2353
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
2354
|
+
/******/ __webpack_require__.n = (module) => {
|
|
2355
|
+
/******/ var getter = module && module.__esModule ?
|
|
2356
|
+
/******/ () => (module['default']) :
|
|
2357
|
+
/******/ () => (module);
|
|
2358
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
2359
|
+
/******/ return getter;
|
|
2360
|
+
/******/ };
|
|
2361
|
+
/******/ })();
|
|
2362
|
+
/******/
|
|
2363
|
+
/******/ /* webpack/runtime/define property getters */
|
|
2364
|
+
/******/ (() => {
|
|
2365
|
+
/******/ // define getter functions for harmony exports
|
|
2366
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
2367
|
+
/******/ for(var key in definition) {
|
|
2368
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
2369
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
2370
|
+
/******/ }
|
|
2371
|
+
/******/ }
|
|
2372
|
+
/******/ };
|
|
2373
|
+
/******/ })();
|
|
2374
|
+
/******/
|
|
2375
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2376
|
+
/******/ (() => {
|
|
2377
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2378
|
+
/******/ })();
|
|
2379
|
+
/******/
|
|
2380
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
2381
|
+
/******/ (() => {
|
|
2382
|
+
/******/ // define __esModule on exports
|
|
2383
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
2384
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2385
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2386
|
+
/******/ }
|
|
2387
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
2388
|
+
/******/ };
|
|
2389
|
+
/******/ })();
|
|
2390
|
+
/******/
|
|
2391
|
+
/************************************************************************/
|
|
2392
|
+
var __webpack_exports__ = {};
|
|
2393
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
2394
|
+
(() => {
|
|
2395
|
+
/*!**************************!*\
|
|
2396
|
+
!*** ./lib-esm/index.js ***!
|
|
2397
|
+
\**************************/
|
|
2398
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2399
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2400
|
+
/* harmony export */ "SQLiteAdapter": () => (/* reexport safe */ _SQLiteAdapter_SQLiteAdapter__WEBPACK_IMPORTED_MODULE_0__["default"])
|
|
2401
|
+
/* harmony export */ });
|
|
2402
|
+
/* harmony import */ var _SQLiteAdapter_SQLiteAdapter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SQLiteAdapter/SQLiteAdapter */ "./lib-esm/SQLiteAdapter/SQLiteAdapter.js");
|
|
2403
|
+
|
|
2404
|
+
|
|
2405
|
+
})();
|
|
2406
|
+
|
|
2407
|
+
/******/ return __webpack_exports__;
|
|
2408
|
+
/******/ })()
|
|
2409
|
+
;
|
|
2393
2410
|
});
|
|
2394
2411
|
//# sourceMappingURL=aws-amplify-datastore-storage-adapter.js.map
|