@aws-amplify/datastore-storage-adapter 2.0.71 → 2.0.73
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/.rollup.cache/Volumes/workplace/amplify-js/packages/datastore-storage-adapter/dist/meta/cjs.tsbuildinfo +1 -0
- package/CHANGELOG.md +12 -0
- package/coverage-ts/assets/source-file.css +21 -0
- package/coverage-ts/assets/source-file.js +40 -0
- package/coverage-ts/files/lib/ExpoSQLiteAdapter/ExpoSQLiteAdapter.d.ts.html +21 -0
- package/coverage-ts/files/lib/ExpoSQLiteAdapter/ExpoSQLiteDatabase.d.ts.html +35 -0
- package/coverage-ts/files/lib/SQLiteAdapter/SQLiteAdapter.d.ts.html +21 -0
- package/coverage-ts/files/lib/SQLiteAdapter/SQLiteDatabase.d.ts.html +35 -0
- package/coverage-ts/files/lib/common/CommonSQLiteAdapter.d.ts.html +41 -0
- package/coverage-ts/files/lib/common/SQLiteUtils.d.ts.html +39 -0
- package/coverage-ts/files/lib/common/constants.d.ts.html +19 -0
- package/coverage-ts/files/lib/common/types.d.ts.html +34 -0
- package/coverage-ts/files/lib/index.d.ts.html +20 -0
- package/coverage-ts/files/lib-esm/ExpoSQLiteAdapter/ExpoSQLiteAdapter.d.ts.html +21 -0
- package/coverage-ts/files/lib-esm/ExpoSQLiteAdapter/ExpoSQLiteDatabase.d.ts.html +35 -0
- package/coverage-ts/files/lib-esm/SQLiteAdapter/SQLiteAdapter.d.ts.html +21 -0
- package/coverage-ts/files/lib-esm/SQLiteAdapter/SQLiteDatabase.d.ts.html +35 -0
- package/coverage-ts/files/lib-esm/common/CommonSQLiteAdapter.d.ts.html +41 -0
- package/coverage-ts/files/lib-esm/common/SQLiteUtils.d.ts.html +39 -0
- package/coverage-ts/files/lib-esm/common/constants.d.ts.html +19 -0
- package/coverage-ts/files/lib-esm/common/types.d.ts.html +34 -0
- package/coverage-ts/files/lib-esm/index.d.ts.html +20 -0
- package/coverage-ts/files/src/ExpoSQLiteAdapter/ExpoSQLiteAdapter.ts.html +28 -0
- package/coverage-ts/files/src/ExpoSQLiteAdapter/ExpoSQLiteDatabase.ts.html +302 -0
- package/coverage-ts/files/src/SQLiteAdapter/SQLiteAdapter.ts.html +28 -0
- package/coverage-ts/files/src/SQLiteAdapter/SQLiteDatabase.ts.html +183 -0
- package/coverage-ts/files/src/common/CommonSQLiteAdapter.ts.html +460 -0
- package/coverage-ts/files/src/common/SQLiteUtils.ts.html +520 -0
- package/coverage-ts/files/src/common/constants.ts.html +21 -0
- package/coverage-ts/files/src/common/types.ts.html +54 -0
- package/coverage-ts/files/src/index.ts.html +22 -0
- package/coverage-ts/index.html +15 -0
- package/coverage-ts/typescript-coverage.json +772 -0
- package/dist/aws-amplify-datastore-storage-adapter.js +5 -0
- package/dist/aws-amplify-datastore-storage-adapter.js.map +1 -1
- package/dist/aws-amplify-datastore-storage-adapter.min.js.map +1 -1
- package/lib/SQLiteAdapter/SQLiteAdapter.d.ts +5 -0
- package/lib/SQLiteAdapter/SQLiteAdapter.js +5 -0
- package/lib/SQLiteAdapter/SQLiteAdapter.js.map +1 -1
- package/lib-esm/SQLiteAdapter/SQLiteAdapter.d.ts +5 -0
- package/lib-esm/SQLiteAdapter/SQLiteAdapter.js +5 -0
- package/lib-esm/SQLiteAdapter/SQLiteAdapter.js.map +1 -1
- package/package.json +7 -4
- package/src/SQLiteAdapter/SQLiteAdapter.ts +5 -0
- package/.rollup.cache/home/runner/work/amplify-js/amplify-js/amplify-js/packages/datastore-storage-adapter/dist/meta/cjs.tsbuildinfo +0 -1
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/cjs/ExpoSQLiteAdapter/ExpoSQLiteAdapter.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/cjs/ExpoSQLiteAdapter/ExpoSQLiteDatabase.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/cjs/SQLiteAdapter/SQLiteAdapter.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/cjs/SQLiteAdapter/SQLiteDatabase.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/cjs/common/CommonSQLiteAdapter.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/cjs/common/SQLiteUtils.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/cjs/common/constants.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/cjs/common/types.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/cjs/index.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/ExpoSQLiteAdapter/ExpoSQLiteAdapter.d.ts +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/ExpoSQLiteAdapter/ExpoSQLiteAdapter.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/ExpoSQLiteAdapter/ExpoSQLiteDatabase.d.ts +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/ExpoSQLiteAdapter/ExpoSQLiteDatabase.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/SQLiteAdapter/SQLiteAdapter.d.ts +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/SQLiteAdapter/SQLiteAdapter.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/SQLiteAdapter/SQLiteDatabase.d.ts +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/SQLiteAdapter/SQLiteDatabase.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/common/CommonSQLiteAdapter.d.ts +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/common/CommonSQLiteAdapter.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/common/SQLiteUtils.d.ts +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/common/SQLiteUtils.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/common/constants.d.ts +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/common/constants.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/common/types.d.ts +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/common/types.js +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/index.d.ts +0 -0
- /package/.rollup.cache/{home/runner/work/amplify-js/amplify-js → Volumes/workplace}/amplify-js/packages/datastore-storage-adapter/dist/esm/index.js +0 -0
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<title>SQLiteUtils.ts</title>
|
|
6
|
+
<link href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css" type="text/css" rel="stylesheet">
|
|
7
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.js" type="text/javascript" charset="utf-8"></script>
|
|
8
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/mode/javascript/javascript.min.js" type="text/javascript" charset="utf-8"></script>
|
|
9
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.css" type="text/css" rel="stylesheet">
|
|
10
|
+
<script src="../../../assets/source-file.js" type="text/javascript" charset="utf-8"></script>
|
|
11
|
+
<link href="../../../assets/source-file.css" type="text/css" rel="stylesheet">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<div style="margin-top:3em" class="ui container"><h1 class="ui header"><a href="../../../index.html">TypeScript coverage report</a></h1><table style="margin-top:2em" class="ui celled table"><thead class=""><tr class=""><th class="">Filename</th><th class="">Percent</th><th class="">Threshold</th><th class="">Total</th><th class="">Covered</th><th class="">Uncovered</th></tr></thead><tbody class=""><tr class="positive"><td class="">src/common/SQLiteUtils.ts</td><td class="">95.59%</td><td class="">94.16%</td><td class="">589</td><td class="">563</td><td class="">26</td></tr></tbody></table><textarea id="editor" readonly="" style="margin-top:3em">// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
import {
|
|
17
|
+
InternalSchema,
|
|
18
|
+
SchemaModel,
|
|
19
|
+
ModelField,
|
|
20
|
+
PersistentModel,
|
|
21
|
+
isGraphQLScalarType,
|
|
22
|
+
QueryOne,
|
|
23
|
+
PredicatesGroup,
|
|
24
|
+
isPredicateObj,
|
|
25
|
+
SortPredicatesGroup,
|
|
26
|
+
PredicateObject,
|
|
27
|
+
isPredicateGroup,
|
|
28
|
+
isModelFieldType,
|
|
29
|
+
isTargetNameAssociation,
|
|
30
|
+
isModelAttributeAuth,
|
|
31
|
+
ModelAttributeAuth,
|
|
32
|
+
ModelAuthRule,
|
|
33
|
+
utils,
|
|
34
|
+
GraphQLScalarType,
|
|
35
|
+
} from '@aws-amplify/datastore';
|
|
36
|
+
|
|
37
|
+
import { ParameterizedStatement } from './types';
|
|
38
|
+
|
|
39
|
+
const { USER, isNonModelConstructor, isModelConstructor } = utils;
|
|
40
|
+
|
|
41
|
+
const keysFromModel = model =>
|
|
42
|
+
Object.keys(model)
|
|
43
|
+
.map(k => `"${k}"`)
|
|
44
|
+
.join(', ');
|
|
45
|
+
|
|
46
|
+
const valuesFromModel = (model): [string, any[]] => {
|
|
47
|
+
const values = Object.values(model).map(prepareValueForDML);
|
|
48
|
+
const paramaterized = values.map(() => '?').join(', ');
|
|
49
|
+
|
|
50
|
+
return [paramaterized, values];
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const updateSet: (model: any) => [any, any] = model => {
|
|
54
|
+
const values = [];
|
|
55
|
+
const paramaterized = Object.entries(model)
|
|
56
|
+
.filter(([k]) => k !== 'id')
|
|
57
|
+
.map(([k, v]) => {
|
|
58
|
+
values.push(prepareValueForDML(v));
|
|
59
|
+
return `"${k}"=?`;
|
|
60
|
+
})
|
|
61
|
+
.join(', ');
|
|
62
|
+
|
|
63
|
+
return [paramaterized, values];
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
function prepareValueForDML(value: unknown): any {
|
|
67
|
+
const scalarTypes = ['string', 'number', 'boolean'];
|
|
68
|
+
|
|
69
|
+
const isScalarType =
|
|
70
|
+
value === null || value === undefined || scalarTypes.includes(typeof value);
|
|
71
|
+
|
|
72
|
+
if (isScalarType) {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const isObjectType =
|
|
77
|
+
typeof value === 'object' &&
|
|
78
|
+
(Object.getPrototypeOf(value).constructor === Object ||
|
|
79
|
+
isNonModelConstructor(Object.getPrototypeOf(value).constructor) ||
|
|
80
|
+
isModelConstructor(Object.getPrototypeOf(value).constructor));
|
|
81
|
+
|
|
82
|
+
if (Array.isArray(value) || isObjectType) {
|
|
83
|
+
return JSON.stringify(value);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return `${value}`;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function getSQLiteType(
|
|
90
|
+
scalar: keyof Omit<
|
|
91
|
+
typeof GraphQLScalarType,
|
|
92
|
+
'getJSType' | 'getValidationFunction' | 'getSQLiteType'
|
|
93
|
+
>
|
|
94
|
+
): 'TEXT' | 'INTEGER' | 'REAL' | 'BLOB' {
|
|
95
|
+
switch (scalar) {
|
|
96
|
+
case 'Boolean':
|
|
97
|
+
case 'Int':
|
|
98
|
+
case 'AWSTimestamp':
|
|
99
|
+
return 'INTEGER';
|
|
100
|
+
case 'ID':
|
|
101
|
+
case 'String':
|
|
102
|
+
case 'AWSDate':
|
|
103
|
+
case 'AWSTime':
|
|
104
|
+
case 'AWSDateTime':
|
|
105
|
+
case 'AWSEmail':
|
|
106
|
+
case 'AWSJSON':
|
|
107
|
+
case 'AWSURL':
|
|
108
|
+
case 'AWSPhone':
|
|
109
|
+
case 'AWSIPAddress':
|
|
110
|
+
return 'TEXT';
|
|
111
|
+
case 'Float':
|
|
112
|
+
return 'REAL';
|
|
113
|
+
default:
|
|
114
|
+
const _: never = scalar as never;
|
|
115
|
+
throw new Error(`unknown type ${scalar as string}`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function generateSchemaStatements(schema: InternalSchema): string[] {
|
|
120
|
+
return Object.keys(schema.namespaces).flatMap(namespaceName => {
|
|
121
|
+
const namespace = schema.namespaces[namespaceName];
|
|
122
|
+
const isUserModel = namespaceName === USER;
|
|
123
|
+
|
|
124
|
+
return Object.values(namespace.models).map(model =>
|
|
125
|
+
modelCreateTableStatement(model, isUserModel)
|
|
126
|
+
);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export const implicitAuthFieldsForModel: (model: SchemaModel) => string[] = (
|
|
131
|
+
model: SchemaModel
|
|
132
|
+
) => {
|
|
133
|
+
if (!model.attributes || !model.attributes.length) {
|
|
134
|
+
return [];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const authRules: ModelAttributeAuth =
|
|
138
|
+
model.attributes.find(isModelAttributeAuth);
|
|
139
|
+
|
|
140
|
+
if (!authRules) {
|
|
141
|
+
return [];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const authFieldsForModel = authRules.properties.rules
|
|
145
|
+
.filter((rule: ModelAuthRule) => rule.ownerField || rule.groupsField)
|
|
146
|
+
.map((rule: ModelAuthRule) => rule.ownerField || rule.groupsField);
|
|
147
|
+
|
|
148
|
+
return authFieldsForModel.filter((authField: string) => {
|
|
149
|
+
const authFieldExplicitlyDefined = Object.values(model.fields).find(
|
|
150
|
+
(f: ModelField) => f.name === authField
|
|
151
|
+
);
|
|
152
|
+
return !authFieldExplicitlyDefined;
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export function modelCreateTableStatement(
|
|
157
|
+
model: SchemaModel,
|
|
158
|
+
userModel: boolean = false
|
|
159
|
+
): string {
|
|
160
|
+
// implicitly defined auth fields, e.g., `owner`, `groupsField`, etc.
|
|
161
|
+
const implicitAuthFields = implicitAuthFieldsForModel(model);
|
|
162
|
+
|
|
163
|
+
let fields = Object.values(model.fields).reduce((acc, field: ModelField) => {
|
|
164
|
+
if (isGraphQLScalarType(field.type)) {
|
|
165
|
+
if (field.name === 'id') {
|
|
166
|
+
return [...acc, '"id" PRIMARY KEY NOT NULL'];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
let columnParam = `"${field.name}" ${getSQLiteType(field.type)}`;
|
|
170
|
+
|
|
171
|
+
if (field.isRequired) {
|
|
172
|
+
columnParam += ' NOT NULL';
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return [...acc, `${columnParam}`];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (isModelFieldType(field.type)) {
|
|
179
|
+
let columnParam = `"${field.name}" TEXT`;
|
|
180
|
+
|
|
181
|
+
// add targetName as well as field name for BELONGS_TO relations
|
|
182
|
+
if (isTargetNameAssociation(field.association)) {
|
|
183
|
+
// check if this field has been explicitly defined in the model
|
|
184
|
+
const fkDefinedInModel = Object.values(model.fields).find(
|
|
185
|
+
(f: ModelField) => f.name === field?.association?.targetName
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
// if the FK is not explicitly defined in the model, we have to add it here
|
|
189
|
+
if (!fkDefinedInModel) {
|
|
190
|
+
const required = field.isRequired ? ' NOT NULL' : '';
|
|
191
|
+
columnParam += `, "${field.association.targetName}" TEXT${required}`;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// ignore isRequired param for model fields, since they will not contain
|
|
196
|
+
// the related data locally
|
|
197
|
+
return [...acc, `${columnParam}`];
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// default to TEXT
|
|
201
|
+
let columnParam = `"${field.name}" TEXT`;
|
|
202
|
+
|
|
203
|
+
if (field.isRequired) {
|
|
204
|
+
columnParam += ' NOT NULL';
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return [...acc, `${columnParam}`];
|
|
208
|
+
}, [] as string[]);
|
|
209
|
+
|
|
210
|
+
implicitAuthFields.forEach((authField: string) => {
|
|
211
|
+
fields.push(`${authField} TEXT`);
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
if (userModel) {
|
|
215
|
+
fields = [
|
|
216
|
+
...fields,
|
|
217
|
+
`"_version" INTEGER`,
|
|
218
|
+
`"_lastChangedAt" INTEGER`,
|
|
219
|
+
`"_deleted" INTEGER`,
|
|
220
|
+
];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const createTableStatement = `CREATE TABLE IF NOT EXISTS "${
|
|
224
|
+
model.name
|
|
225
|
+
}" (${fields.join(', ')});`;
|
|
226
|
+
return createTableStatement;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function modelInsertStatement(
|
|
230
|
+
model: PersistentModel,
|
|
231
|
+
tableName: string
|
|
232
|
+
): ParameterizedStatement {
|
|
233
|
+
const keys = keysFromModel(model);
|
|
234
|
+
const [paramaterized, values] = valuesFromModel(model);
|
|
235
|
+
|
|
236
|
+
const insertStatement = `INSERT INTO "${tableName}" (${keys}) VALUES (${paramaterized})`;
|
|
237
|
+
|
|
238
|
+
return [insertStatement, values];
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export function modelUpdateStatement(
|
|
242
|
+
model: PersistentModel,
|
|
243
|
+
tableName: string
|
|
244
|
+
): ParameterizedStatement {
|
|
245
|
+
const [paramaterized, values] = updateSet(model);
|
|
246
|
+
|
|
247
|
+
const updateStatement = `UPDATE "${tableName}" SET ${paramaterized} WHERE id=?`;
|
|
248
|
+
|
|
249
|
+
return [updateStatement, [...values, model.id]];
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export function queryByIdStatement(
|
|
253
|
+
id: string,
|
|
254
|
+
tableName: string
|
|
255
|
+
): ParameterizedStatement {
|
|
256
|
+
return [`SELECT * FROM "${tableName}" WHERE "id" = ?`, [id]];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/*
|
|
260
|
+
Predicates supported by DataStore:
|
|
261
|
+
|
|
262
|
+
Strings: eq | ne | le | lt | ge | gt | contains | notContains | beginsWith | between
|
|
263
|
+
Numbers: eq | ne | le | lt | ge | gt | between
|
|
264
|
+
Lists: contains | notContains
|
|
265
|
+
*/
|
|
266
|
+
|
|
267
|
+
const comparisonOperatorMap = {
|
|
268
|
+
eq: '=',
|
|
269
|
+
ne: '!=',
|
|
270
|
+
le: '<=',
|
|
271
|
+
lt: '<',
|
|
272
|
+
ge: '>=',
|
|
273
|
+
gt: '>',
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
const logicalOperatorMap = {
|
|
277
|
+
beginsWith: '= 1',
|
|
278
|
+
contains: '> 0',
|
|
279
|
+
notContains: '= 0',
|
|
280
|
+
between: 'BETWEEN',
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* If the given (operator, operand) indicate the need for a special `NULL` comparison,
|
|
285
|
+
* that `WHERE` clause condition will be returned. If not special `NULL` handling is
|
|
286
|
+
* needed, `null` will be returned, and the caller should construct the `WHERE`
|
|
287
|
+
* clause component using the normal operator map(s) and parameterization.
|
|
288
|
+
*
|
|
289
|
+
* @param operator "beginsWith" | "contains" | "notContains" | "between"
|
|
290
|
+
* | "eq" | "ne" | "le" | "lt" | "ge" | "gt"
|
|
291
|
+
* @param operand any
|
|
292
|
+
* @returns (string | null) The `WHERE` clause component or `null` if N/A.
|
|
293
|
+
*/
|
|
294
|
+
function buildSpecialNullComparison(field, operator, operand) {
|
|
295
|
+
if (operand === null || operand === undefined) {
|
|
296
|
+
if (operator === 'eq') {
|
|
297
|
+
return `"${field}" IS NULL`;
|
|
298
|
+
} else if (operator === 'ne') {
|
|
299
|
+
return `"${field}" IS NOT NULL`;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// no special null handling required
|
|
304
|
+
return null;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export const whereConditionFromPredicateObject = ({
|
|
308
|
+
field,
|
|
309
|
+
operator,
|
|
310
|
+
operand,
|
|
311
|
+
}: {
|
|
312
|
+
field: string;
|
|
313
|
+
operator:
|
|
314
|
+
| keyof typeof logicalOperatorMap
|
|
315
|
+
| keyof typeof comparisonOperatorMap;
|
|
316
|
+
operand: any;
|
|
317
|
+
}): ParameterizedStatement => {
|
|
318
|
+
const specialNullClause = buildSpecialNullComparison(
|
|
319
|
+
field,
|
|
320
|
+
operator,
|
|
321
|
+
operand
|
|
322
|
+
);
|
|
323
|
+
if (specialNullClause) {
|
|
324
|
+
return [specialNullClause, []];
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const comparisonOperator = comparisonOperatorMap[operator];
|
|
328
|
+
if (comparisonOperator) {
|
|
329
|
+
return [`"${field}" ${comparisonOperator} ?`, [operand]];
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const logicalOperatorKey = <keyof typeof logicalOperatorMap>operator;
|
|
333
|
+
|
|
334
|
+
const logicalOperator = logicalOperatorMap[logicalOperatorKey];
|
|
335
|
+
|
|
336
|
+
let statement: ParameterizedStatement;
|
|
337
|
+
|
|
338
|
+
if (logicalOperator) {
|
|
339
|
+
let rightExp = [];
|
|
340
|
+
switch (logicalOperatorKey) {
|
|
341
|
+
case 'between':
|
|
342
|
+
rightExp = operand; // operand is a 2-tuple
|
|
343
|
+
statement = [
|
|
344
|
+
`"${field}" ${logicalOperator} ${rightExp
|
|
345
|
+
.map(_ => '?')
|
|
346
|
+
.join(' AND ')}`,
|
|
347
|
+
rightExp,
|
|
348
|
+
];
|
|
349
|
+
break;
|
|
350
|
+
case 'beginsWith':
|
|
351
|
+
case 'contains':
|
|
352
|
+
case 'notContains':
|
|
353
|
+
statement = [`instr("${field}", ?) ${logicalOperator}`, [operand]];
|
|
354
|
+
break;
|
|
355
|
+
default:
|
|
356
|
+
const _: never = logicalOperatorKey;
|
|
357
|
+
// Incorrect WHERE clause can result in data loss
|
|
358
|
+
throw new Error('Cannot map predicate to a valid WHERE clause');
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
return statement;
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
export function whereClauseFromPredicate<T extends PersistentModel>(
|
|
366
|
+
predicate: PredicatesGroup<T>
|
|
367
|
+
): ParameterizedStatement {
|
|
368
|
+
const result = [];
|
|
369
|
+
const params = [];
|
|
370
|
+
|
|
371
|
+
recurse(predicate, result, params);
|
|
372
|
+
const whereClause = `WHERE ${result.join(' ')}`;
|
|
373
|
+
|
|
374
|
+
return [whereClause, params];
|
|
375
|
+
|
|
376
|
+
function recurse(
|
|
377
|
+
predicate: PredicatesGroup<T> | PredicateObject<T>,
|
|
378
|
+
result = [],
|
|
379
|
+
params = []
|
|
380
|
+
): void {
|
|
381
|
+
if (isPredicateGroup(predicate)) {
|
|
382
|
+
const { type: groupType, predicates: groupPredicates } = predicate;
|
|
383
|
+
let filterType: string = '';
|
|
384
|
+
let isNegation = false;
|
|
385
|
+
switch (groupType) {
|
|
386
|
+
case 'not':
|
|
387
|
+
isNegation = true;
|
|
388
|
+
break;
|
|
389
|
+
case 'and':
|
|
390
|
+
filterType = 'AND';
|
|
391
|
+
break;
|
|
392
|
+
case 'or':
|
|
393
|
+
filterType = 'OR';
|
|
394
|
+
break;
|
|
395
|
+
default:
|
|
396
|
+
const _: never = groupType as never;
|
|
397
|
+
throw new Error(`Invalid ${groupType}`);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
const groupResult = [];
|
|
401
|
+
for (const p of groupPredicates) {
|
|
402
|
+
recurse(p, groupResult, params);
|
|
403
|
+
}
|
|
404
|
+
result.push(
|
|
405
|
+
`${isNegation ? 'NOT' : ''}(${groupResult.join(` ${filterType} `)})`
|
|
406
|
+
);
|
|
407
|
+
} else if (isPredicateObj(predicate)) {
|
|
408
|
+
const [condition, conditionParams] =
|
|
409
|
+
whereConditionFromPredicateObject(predicate);
|
|
410
|
+
|
|
411
|
+
result.push(condition);
|
|
412
|
+
|
|
413
|
+
params.push(...conditionParams);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
const sortDirectionMap = {
|
|
419
|
+
ASCENDING: 'ASC',
|
|
420
|
+
DESCENDING: 'DESC',
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
export function orderByClauseFromSort<T extends PersistentModel>(
|
|
424
|
+
sortPredicate: SortPredicatesGroup<T> = []
|
|
425
|
+
): string {
|
|
426
|
+
const orderByParts = sortPredicate.map(
|
|
427
|
+
({ field, sortDirection }) =>
|
|
428
|
+
`"${field}" ${sortDirectionMap[sortDirection]}`
|
|
429
|
+
);
|
|
430
|
+
|
|
431
|
+
// We always sort by _rowid_ last
|
|
432
|
+
orderByParts.push(`_rowid_ ${sortDirectionMap.ASCENDING}`);
|
|
433
|
+
|
|
434
|
+
return `ORDER BY ${orderByParts.join(', ')}`;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export function limitClauseFromPagination(
|
|
438
|
+
limit: number,
|
|
439
|
+
page: number = 0
|
|
440
|
+
): ParameterizedStatement {
|
|
441
|
+
const params = [limit];
|
|
442
|
+
let clause = 'LIMIT ?';
|
|
443
|
+
if (page) {
|
|
444
|
+
const offset = limit * page;
|
|
445
|
+
params.push(offset);
|
|
446
|
+
clause += ' OFFSET ?';
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
return [clause, params];
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export function queryAllStatement<T extends PersistentModel>(
|
|
453
|
+
tableName: string,
|
|
454
|
+
predicate?: PredicatesGroup<T>,
|
|
455
|
+
sort?: SortPredicatesGroup<T>,
|
|
456
|
+
limit?: number,
|
|
457
|
+
page?: number
|
|
458
|
+
): ParameterizedStatement {
|
|
459
|
+
let statement = `SELECT * FROM "${tableName}"`;
|
|
460
|
+
const params = [];
|
|
461
|
+
|
|
462
|
+
if (predicate && predicate.predicates.length) {
|
|
463
|
+
const [whereClause, whereParams] = whereClauseFromPredicate(predicate);
|
|
464
|
+
statement += ` ${whereClause}`;
|
|
465
|
+
params.push(...whereParams);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
const orderByClause = orderByClauseFromSort(sort);
|
|
469
|
+
statement += ` ${orderByClause}`;
|
|
470
|
+
|
|
471
|
+
if (limit) {
|
|
472
|
+
const [limitClause, limitParams] = limitClauseFromPagination(limit, page);
|
|
473
|
+
statement += ` ${limitClause}`;
|
|
474
|
+
params.push(...limitParams);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
return [statement, params];
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export function queryOneStatement(
|
|
481
|
+
firstOrLast,
|
|
482
|
+
tableName: string
|
|
483
|
+
): ParameterizedStatement {
|
|
484
|
+
if (firstOrLast === QueryOne.FIRST) {
|
|
485
|
+
// ORDER BY rowid will no longer work as expected if a customer has
|
|
486
|
+
// a field by that name in their schema. We may want to enforce it
|
|
487
|
+
// as a reserved keyword in Codegen
|
|
488
|
+
return [`SELECT * FROM ${tableName} ORDER BY _rowid_ LIMIT 1`, []];
|
|
489
|
+
} else {
|
|
490
|
+
return [`SELECT * FROM ${tableName} ORDER BY _rowid_ DESC LIMIT 1`, []];
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export function deleteByIdStatement(
|
|
495
|
+
id: string,
|
|
496
|
+
tableName: string
|
|
497
|
+
): ParameterizedStatement {
|
|
498
|
+
const deleteStatement = `DELETE FROM "${tableName}" WHERE "id"=?`;
|
|
499
|
+
return [deleteStatement, [id]];
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export function deleteByPredicateStatement<T extends PersistentModel>(
|
|
503
|
+
tableName: string,
|
|
504
|
+
predicate?: PredicatesGroup<T>
|
|
505
|
+
): ParameterizedStatement {
|
|
506
|
+
let statement = `DELETE FROM "${tableName}"`;
|
|
507
|
+
const params = [];
|
|
508
|
+
|
|
509
|
+
if (predicate && predicate.predicates.length) {
|
|
510
|
+
const [whereClause, whereParams] = whereClauseFromPredicate(predicate);
|
|
511
|
+
statement += ` ${whereClause}`;
|
|
512
|
+
params.push(...whereParams);
|
|
513
|
+
}
|
|
514
|
+
return [statement, params];
|
|
515
|
+
}
|
|
516
|
+
</textarea><pre id="annotations" style="display:none">[{"file":"src/common/SQLiteUtils.ts","line":27,"character":22,"text":"model","kind":1},{"file":"src/common/SQLiteUtils.ts","line":32,"character":25,"text":"model","kind":1},{"file":"src/common/SQLiteUtils.ts","line":39,"character":18,"text":"model","kind":1},{"file":"src/common/SQLiteUtils.ts","line":39,"character":46,"text":"model","kind":1},{"file":"src/common/SQLiteUtils.ts","line":231,"character":8,"text":"paramaterized","kind":1},{"file":"src/common/SQLiteUtils.ts","line":231,"character":23,"text":"values","kind":1},{"file":"src/common/SQLiteUtils.ts","line":233,"character":54,"text":"paramaterized","kind":1},{"file":"src/common/SQLiteUtils.ts","line":235,"character":30,"text":"values","kind":1},{"file":"src/common/SQLiteUtils.ts","line":235,"character":44,"text":"id","kind":1},{"file":"src/common/SQLiteUtils.ts","line":280,"character":36,"text":"field","kind":1},{"file":"src/common/SQLiteUtils.ts","line":280,"character":43,"text":"operator","kind":1},{"file":"src/common/SQLiteUtils.ts","line":280,"character":53,"text":"operand","kind":1},{"file":"src/common/SQLiteUtils.ts","line":281,"character":5,"text":"operand","kind":1},{"file":"src/common/SQLiteUtils.ts","line":281,"character":25,"text":"operand","kind":1},{"file":"src/common/SQLiteUtils.ts","line":282,"character":6,"text":"operator","kind":1},{"file":"src/common/SQLiteUtils.ts","line":283,"character":14,"text":"field","kind":1},{"file":"src/common/SQLiteUtils.ts","line":284,"character":13,"text":"operator","kind":1},{"file":"src/common/SQLiteUtils.ts","line":285,"character":14,"text":"field","kind":1},{"file":"src/common/SQLiteUtils.ts","line":296,"character":1,"text":"operand","kind":1},{"file":"src/common/SQLiteUtils.ts","line":302,"character":1,"text":"operand","kind":1},{"file":"src/common/SQLiteUtils.ts","line":307,"character":2,"text":"operand","kind":1},{"file":"src/common/SQLiteUtils.ts","line":315,"character":49,"text":"operand","kind":1},{"file":"src/common/SQLiteUtils.ts","line":331,"character":11,"text":"_","kind":1},{"file":"src/common/SQLiteUtils.ts","line":339,"character":61,"text":"operand","kind":1},{"file":"src/common/SQLiteUtils.ts","line":467,"character":1,"text":"firstOrLast","kind":1},{"file":"src/common/SQLiteUtils.ts","line":470,"character":5,"text":"firstOrLast","kind":1}]</pre></div>
|
|
517
|
+
<p class="footer-text">TypeScript Coverage Report generated by <a href="https://github.com/plantain-00/type-coverage">type-coverage</a> and <a href="https://github.com/alexcanessa/typescript-coverage-report">typescript-coverage-report</a> at Mon, 20 Apr 2026 10:42:30 GMT</p>
|
|
518
|
+
</body>
|
|
519
|
+
</html>
|
|
520
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<title>constants.ts</title>
|
|
6
|
+
<link href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css" type="text/css" rel="stylesheet">
|
|
7
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.js" type="text/javascript" charset="utf-8"></script>
|
|
8
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/mode/javascript/javascript.min.js" type="text/javascript" charset="utf-8"></script>
|
|
9
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.css" type="text/css" rel="stylesheet">
|
|
10
|
+
<script src="../../../assets/source-file.js" type="text/javascript" charset="utf-8"></script>
|
|
11
|
+
<link href="../../../assets/source-file.css" type="text/css" rel="stylesheet">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<div style="margin-top:3em" class="ui container"><h1 class="ui header"><a href="../../../index.html">TypeScript coverage report</a></h1><table style="margin-top:2em" class="ui celled table"><thead class=""><tr class=""><th class="">Filename</th><th class="">Percent</th><th class="">Threshold</th><th class="">Total</th><th class="">Covered</th><th class="">Uncovered</th></tr></thead><tbody class=""><tr class="positive"><td class="">src/common/constants.ts</td><td class="">100.00%</td><td class="">94.16%</td><td class="">1</td><td class="">1</td><td class="">0</td></tr></tbody></table><textarea id="editor" readonly="" style="margin-top:3em">// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
export const DB_NAME = 'AmplifyDatastore';
|
|
17
|
+
</textarea><pre id="annotations" style="display:none">[]</pre></div>
|
|
18
|
+
<p class="footer-text">TypeScript Coverage Report generated by <a href="https://github.com/plantain-00/type-coverage">type-coverage</a> and <a href="https://github.com/alexcanessa/typescript-coverage-report">typescript-coverage-report</a> at Mon, 20 Apr 2026 10:42:30 GMT</p>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
21
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<title>types.ts</title>
|
|
6
|
+
<link href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css" type="text/css" rel="stylesheet">
|
|
7
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.js" type="text/javascript" charset="utf-8"></script>
|
|
8
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/mode/javascript/javascript.min.js" type="text/javascript" charset="utf-8"></script>
|
|
9
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.css" type="text/css" rel="stylesheet">
|
|
10
|
+
<script src="../../../assets/source-file.js" type="text/javascript" charset="utf-8"></script>
|
|
11
|
+
<link href="../../../assets/source-file.css" type="text/css" rel="stylesheet">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<div style="margin-top:3em" class="ui container"><h1 class="ui header"><a href="../../../index.html">TypeScript coverage report</a></h1><table style="margin-top:2em" class="ui celled table"><thead class=""><tr class=""><th class="">Filename</th><th class="">Percent</th><th class="">Threshold</th><th class="">Total</th><th class="">Covered</th><th class="">Uncovered</th></tr></thead><tbody class=""><tr class="positive"><td class="">src/common/types.ts</td><td class="">100.00%</td><td class="">94.16%</td><td class="">55</td><td class="">55</td><td class="">0</td></tr></tbody></table><textarea id="editor" readonly="" style="margin-top:3em">// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
import { PersistentModel, ModelInstanceMetadata } from '@aws-amplify/datastore';
|
|
17
|
+
|
|
18
|
+
export interface CommonSQLiteDatabase {
|
|
19
|
+
init(): Promise<void>;
|
|
20
|
+
createSchema(statements: string[]): Promise<void>;
|
|
21
|
+
clear(): Promise<void>;
|
|
22
|
+
get<T extends PersistentModel>(
|
|
23
|
+
statement: string,
|
|
24
|
+
params: (string | number)[]
|
|
25
|
+
): Promise<T>;
|
|
26
|
+
getAll<T extends PersistentModel>(
|
|
27
|
+
statement: string,
|
|
28
|
+
params: (string | number)[]
|
|
29
|
+
): Promise<T[]>;
|
|
30
|
+
save(statement: string, params: (string | number)[]): Promise<void>;
|
|
31
|
+
batchQuery<T = any>(
|
|
32
|
+
queryParameterizedStatement: Set<ParameterizedStatement>
|
|
33
|
+
): Promise<T[]>;
|
|
34
|
+
batchSave(
|
|
35
|
+
saveParameterizedStatements: Set<ParameterizedStatement>,
|
|
36
|
+
deleteParameterizedStatements?: Set<ParameterizedStatement>
|
|
37
|
+
): Promise<void>;
|
|
38
|
+
selectAndDelete<T = any>(
|
|
39
|
+
queryParameterizedStatement: ParameterizedStatement,
|
|
40
|
+
deleteParameterizedStatement: ParameterizedStatement
|
|
41
|
+
): Promise<T[]>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type ParameterizedStatement = [string, any[]];
|
|
45
|
+
|
|
46
|
+
// TODO: remove once we implement CPK for this adapter
|
|
47
|
+
export type ModelInstanceMetadataWithId = ModelInstanceMetadata & {
|
|
48
|
+
id: string;
|
|
49
|
+
};
|
|
50
|
+
</textarea><pre id="annotations" style="display:none">[]</pre></div>
|
|
51
|
+
<p class="footer-text">TypeScript Coverage Report generated by <a href="https://github.com/plantain-00/type-coverage">type-coverage</a> and <a href="https://github.com/alexcanessa/typescript-coverage-report">typescript-coverage-report</a> at Mon, 20 Apr 2026 10:42:30 GMT</p>
|
|
52
|
+
</body>
|
|
53
|
+
</html>
|
|
54
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<title>index.ts</title>
|
|
6
|
+
<link href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css" type="text/css" rel="stylesheet">
|
|
7
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.js" type="text/javascript" charset="utf-8"></script>
|
|
8
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/mode/javascript/javascript.min.js" type="text/javascript" charset="utf-8"></script>
|
|
9
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.58.2/codemirror.min.css" type="text/css" rel="stylesheet">
|
|
10
|
+
<script src="../../assets/source-file.js" type="text/javascript" charset="utf-8"></script>
|
|
11
|
+
<link href="../../assets/source-file.css" type="text/css" rel="stylesheet">
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<div style="margin-top:3em" class="ui container"><h1 class="ui header"><a href="../../index.html">TypeScript coverage report</a></h1><table style="margin-top:2em" class="ui celled table"><thead class=""><tr class=""><th class="">Filename</th><th class="">Percent</th><th class="">Threshold</th><th class="">Total</th><th class="">Covered</th><th class="">Uncovered</th></tr></thead><tbody class=""><tr class="positive"><td class="">src/index.ts</td><td class="">100.00%</td><td class="">94.16%</td><td class="">2</td><td class="">2</td><td class="">0</td></tr></tbody></table><textarea id="editor" readonly="" style="margin-top:3em">// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
15
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
import SQLiteAdapter from './SQLiteAdapter/SQLiteAdapter';
|
|
17
|
+
export { SQLiteAdapter };
|
|
18
|
+
</textarea><pre id="annotations" style="display:none">[]</pre></div>
|
|
19
|
+
<p class="footer-text">TypeScript Coverage Report generated by <a href="https://github.com/plantain-00/type-coverage">type-coverage</a> and <a href="https://github.com/alexcanessa/typescript-coverage-report">typescript-coverage-report</a> at Mon, 20 Apr 2026 10:42:30 GMT</p>
|
|
20
|
+
</body>
|
|
21
|
+
</html>
|
|
22
|
+
|