@capgo/capacitor-data-storage-sqlite 6.0.59 → 7.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/CapgoCapacitorDataStorageSqlite.podspec +2 -2
- package/Package.swift +30 -0
- package/README.md +724 -0
- package/android/build.gradle +11 -11
- package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/CapgoCapacitorDataStorageSqlite.java +290 -320
- package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/CapgoCapacitorDataStorageSqlitePlugin.java +373 -388
- package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/RetHandler.java +97 -97
- package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/Data.java +3 -3
- package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/Global.java +2 -2
- package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/ImportExportJson/JsonStore.java +108 -110
- package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/ImportExportJson/JsonTable.java +78 -80
- package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/ImportExportJson/JsonValue.java +62 -64
- package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/StorageDatabaseHelper.java +557 -624
- package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/UtilsSQLCipher.java +103 -144
- package/dist/docs.json +0 -64
- package/dist/esm/definitions.d.ts +0 -19
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +5 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web-utils/StorageDatabaseHelper.d.ts +2 -2
- package/dist/esm/web-utils/StorageDatabaseHelper.js +8 -8
- package/dist/esm/web-utils/StorageDatabaseHelper.js.map +1 -1
- package/dist/esm/web-utils/json-utils.js +15 -18
- package/dist/esm/web-utils/json-utils.js.map +1 -1
- package/dist/esm/web.d.ts +2 -3
- package/dist/esm/web.js +37 -44
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +56 -67
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +56 -67
- package/dist/plugin.js.map +1 -1
- package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/CapgoCapacitorDataStorageSqlitePlugin.swift +27 -10
- package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/StorageDatabaseHelper.swift +1 -1
- package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Utils/UtilsFile.swift +1 -1
- package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Utils/UtilsSQLCipher.swift +3 -3
- package/ios/Tests/CapgoCapacitorDataStorageSqlitePluginTests/CapacitorDataStorageSqlitePluginTests.swift +13 -0
- package/package.json +34 -38
- package/electron/dist/plugin.js +0 -1044
- package/electron/dist/plugin.js.map +0 -1
- package/ios/Plugin/CapgoCapacitorDataStorageSqlitePlugin.h +0 -10
- package/ios/Plugin/CapgoCapacitorDataStorageSqlitePlugin.m +0 -29
- package/ios/Plugin/Info.plist +0 -24
- package/readme.md +0 -210
- /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/CapgoCapacitorDataStorageSqlite.swift +0 -0
- /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Data.swift +0 -0
- /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Global.swift +0 -0
- /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/ImportExportJson/JsonStore.swift +0 -0
- /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/ReturnHandler.swift +0 -0
- /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Utils/Blob.swift +0 -0
- /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Utils/UtilsBinding.swift +0 -0
- /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Utils/UtilsEncryption.swift +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
<a href="https://capgo.app/"><img src='https://raw.githubusercontent.com/Cap-go/capgo/main/assets/capgo_banner.png' alt='Capgo - Instant updates for capacitor'/></a>
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
<h2><a href="https://capgo.app/?ref=plugin"> ➡️ Get Instant updates for your App with Capgo 🚀</a></h2>
|
|
5
|
+
<h2><a href="https://capgo.app/consulting/?ref=plugin"> Fix your annoying bug now, Hire a Capacitor expert 💪</a></h2>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p>
|
|
9
|
+
<h3 align="center">DATA STORAGE SQLITE</h3>
|
|
10
|
+
<p align="center"><strong><code>@capgo/capacitor-data-storage-sqlite</code></strong></p>
|
|
11
|
+
<br>
|
|
12
|
+
<p align="center" style="font-size:50px;color:red"><strong>CAPACITOR 6</strong></p><br>
|
|
13
|
+
<br>
|
|
14
|
+
<!-- Note from the Owner - Start -->
|
|
15
|
+
<p align="center" style="font-size:50px;color:red"><strong>Note from the Owner</strong></p>
|
|
16
|
+
<!-- Note from the Owner - End -->
|
|
17
|
+
<br>
|
|
18
|
+
<!-- Message below Note from the Owner - Start -->
|
|
19
|
+
<p align="left" style="font-size:47px">This Plugin has been transfered to Capgo org after his original creator <a href="https://github.com/jepiqueau">@jepiqueau</a> decide to retire.
|
|
20
|
+
<br>We will forever be thankful for the work he did.</p>
|
|
21
|
+
<br>
|
|
22
|
+
<p align="center">
|
|
23
|
+
Capacitor Data Storage SQlite Plugin is a custom Native Capacitor plugin providing a key-value permanent store for simple data of <strong>type string only</strong> to SQLite on IOS, Android and Electron platforms and to IndexDB for the Web platform.</p>
|
|
24
|
+
|
|
25
|
+
<p align="center">
|
|
26
|
+
<img src="https://img.shields.io/maintenance/yes/2024?style=flat-square" />
|
|
27
|
+
<a href="https://github.com/Cap-go/capacitor-data-storage-sqlite/actions?query=workflow%3A%22CI%22"><img src="https://img.shields.io/github/workflow/status/Cap-go/capacitor-data-storage-sqlite/CI?style=flat-square" /></a>
|
|
28
|
+
<a href="https://www.npmjs.com/package/Cap-go/capacitor-data-storage-sqlite"><img src="https://img.shields.io/npm/l/capacitor-data-storage-sqlite.svg?style=flat-square" /></a>
|
|
29
|
+
<br>
|
|
30
|
+
<a href="https://www.npmjs.com/package/Cap-go/capacitor-data-storage-sqlite"><img src="https://img.shields.io/npm/dw/capacitor-data-storage-sqlite?style=flat-square" /></a>
|
|
31
|
+
<a href="https://www.npmjs.com/package/Cap-go/capacitor-data-storage-sqlite"><img src="https://img.shields.io/npm/v/capacitor-data-storage-sqlite?style=flat-square" /></a>
|
|
32
|
+
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
33
|
+
<a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-4-orange?style=flat-square" /></a>
|
|
34
|
+
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
## Maintainers
|
|
38
|
+
|
|
39
|
+
| Maintainer | GitHub | Social |
|
|
40
|
+
| ----------------- | ----------------------------------------- | ------ |
|
|
41
|
+
| Martin Donadieu | [riderx](https://github.com/riderx) | |
|
|
42
|
+
| Quéau Jean Pierre | [jepiqueau](https://github.com/jepiqueau) | |
|
|
43
|
+
|
|
44
|
+
## Browser Support
|
|
45
|
+
|
|
46
|
+
The plugin follows the guidelines from the `Capacitor Team`,
|
|
47
|
+
|
|
48
|
+
- [Capacitor Browser Support](https://capacitorjs.com/docs/v3/web#browser-support)
|
|
49
|
+
|
|
50
|
+
meaning that it will not work in IE11 without additional JavaScript transformations, e.g. with [Babel](https://babeljs.io/).
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm install --save @capgo/capacitor-data-storage-sqlite
|
|
56
|
+
npx cap sync
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- On iOS, no further steps are needed.
|
|
60
|
+
|
|
61
|
+
- On Android, no further steps are needed.
|
|
62
|
+
|
|
63
|
+
- On Web,
|
|
64
|
+
```bash
|
|
65
|
+
npm install --save localforage
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
- On Electron
|
|
69
|
+
```bash
|
|
70
|
+
npm install --save @capacitor-community/electron
|
|
71
|
+
npx cap add @capacitor-community/electron
|
|
72
|
+
```
|
|
73
|
+
Go to the Electron folder of your application
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
cd electron
|
|
77
|
+
npm install --save sqlite3
|
|
78
|
+
npm install --save-dev @types/sqlite3
|
|
79
|
+
npm run build
|
|
80
|
+
cd ..
|
|
81
|
+
npx cap sync @capacitor-community/electron
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Then build YOUR_APPLICATION
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
npm run build
|
|
88
|
+
npx cap copy
|
|
89
|
+
npx cap copy @capacitor-community/electron
|
|
90
|
+
npx cap open ios
|
|
91
|
+
npx cap open android
|
|
92
|
+
npx cap open @capacitor-community/electron
|
|
93
|
+
ionic serve
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Configuration
|
|
97
|
+
|
|
98
|
+
No configuration required for this plugin
|
|
99
|
+
|
|
100
|
+
## Supported methods
|
|
101
|
+
|
|
102
|
+
| Name | Android | iOS | Electron | Web |
|
|
103
|
+
| :--------------------------- | :------ | :-- | :------- | :-- |
|
|
104
|
+
| openStore (non-encrypted DB) | ✅ | ✅ | ✅ | ✅ |
|
|
105
|
+
| openStore (encrypted DB) | ✅ | ✅ | ❌ | ❌ |
|
|
106
|
+
| closeStore | ✅ | ✅ | ✅ | ❌ |
|
|
107
|
+
| isStoreOpen | ✅ | ✅ | ✅ | ❌ |
|
|
108
|
+
| isStoreExists | ✅ | ✅ | ✅ | ❌ |
|
|
109
|
+
| deleteStore | ✅ | ✅ | ✅ | ❌ |
|
|
110
|
+
| setTable | ✅ | ✅ | ✅ | ✅ |
|
|
111
|
+
| set | ✅ | ✅ | ✅ | ✅ |
|
|
112
|
+
| get | ✅ | ✅ | ✅ | ✅ |
|
|
113
|
+
| iskey | ✅ | ✅ | ✅ | ✅ |
|
|
114
|
+
| keys | ✅ | ✅ | ✅ | ✅ |
|
|
115
|
+
| values | ✅ | ✅ | ✅ | ✅ |
|
|
116
|
+
| filtervalues | ✅ | ✅ | ✅ | ✅ |
|
|
117
|
+
| keysvalues | ✅ | ✅ | ✅ | ✅ |
|
|
118
|
+
| remove | ✅ | ✅ | ✅ | ✅ |
|
|
119
|
+
| clear | ✅ | ✅ | ✅ | ✅ |
|
|
120
|
+
| isTable | ✅ | ✅ | ✅ | ✅ |
|
|
121
|
+
| tables | ✅ | ✅ | ✅ | ✅ |
|
|
122
|
+
| deleteTable | ✅ | ✅ | ✅ | ❌ |
|
|
123
|
+
| isJsonValid | ✅ | ✅ | ✅ | ✅ |
|
|
124
|
+
| importFromJson | ✅ | ✅ | ✅ | ✅ |
|
|
125
|
+
| exportToJson | ✅ | ✅ | ✅ | ✅ |
|
|
126
|
+
|
|
127
|
+
## Documentation
|
|
128
|
+
|
|
129
|
+
- [API_Documentation](docs/API.md)
|
|
130
|
+
|
|
131
|
+
- [USAGE_Documentation](docs/USAGE.md)
|
|
132
|
+
|
|
133
|
+
## Applications demonstrating the use of the plugin
|
|
134
|
+
|
|
135
|
+
### Ionic/Angular
|
|
136
|
+
|
|
137
|
+
- [angular-data-storage-sqlite-app-starter](https://github.com/Cap-go/angular-data-storage-sqlite-app-starter)
|
|
138
|
+
|
|
139
|
+
### Ionic/React
|
|
140
|
+
|
|
141
|
+
- [react-data-storage-sqlite-app-starter](https://github.com/Cap-go/react-data-storage-sqlite-app-starter)
|
|
142
|
+
|
|
143
|
+
### React
|
|
144
|
+
|
|
145
|
+
- [react-datastoragesqlite-app](https://github.com/Cap-go/react-datastoragesqlite-app)
|
|
146
|
+
|
|
147
|
+
### Ionic/Vue
|
|
148
|
+
|
|
149
|
+
- [vue-data-storage-sqlite-app-starter](https://github.com/Cap-go/vue-data-storage-sqlite-app-starter)
|
|
150
|
+
|
|
151
|
+
### Vue
|
|
152
|
+
|
|
153
|
+
- [vue-datastoragesqlite-app](https://github.com/Cap-go/vue-datastoragesqlite-app)
|
|
154
|
+
|
|
155
|
+
## Usage
|
|
156
|
+
|
|
157
|
+
- [see capacitor documentation](https://capacitor.ionicframework.com/docs/getting-started/with-ionic)
|
|
158
|
+
|
|
159
|
+
- [see USAGE_Documentation](https://github.com/Cap-go/capacitor-data-storage-sqlite/blob/master/docs/USAGE.md)
|
|
160
|
+
|
|
161
|
+
## Dependencies
|
|
162
|
+
|
|
163
|
+
The IOS & Android code use SQLCipher allowing for database encryption.
|
|
164
|
+
The Android code is now based on `androidx.sqlite`. The database is not closed anymore after each transaction for performance improvement.
|
|
165
|
+
You must manage the `close` of the database before opening a new database.
|
|
166
|
+
The Web code use `localforage` package to store the datastore in the Browser.
|
|
167
|
+
The Electron code use `sqlite3`package
|
|
168
|
+
|
|
169
|
+
## Contributors ✨
|
|
170
|
+
|
|
171
|
+
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
172
|
+
|
|
173
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
174
|
+
<!-- prettier-ignore-start -->
|
|
175
|
+
<!-- markdownlint-disable -->
|
|
176
|
+
<table>
|
|
177
|
+
<tr>
|
|
178
|
+
<td align="center"><a href="https://github.com/jepiqueau"><img src="https://avatars3.githubusercontent.com/u/16580653?v=4" width="100px;" alt=""/><br /><sub><b>Jean Pierre Quéau</b></sub></a><br /><a href="https://github.com/capacitor-data-storage-sqlite/commits?author=jepiqueau" title="Code">💻</a></td>
|
|
179
|
+
<td align="center"><a href="https://github.com/mwpb"><img src="https://avatars.githubusercontent.com/u/12957941?v=4" width="100px;" alt=""/><br /><sub><b>Matthew Burke</b></sub></a><br /><a href="https://github.com/capacitor-data-storage-sqlite/commits?author=jepiqueau" title="Documentation">📖</a></td>
|
|
180
|
+
<td align="center"><a href="https://github.com/mwpb"><img src="https://avatars.githubusercontent.com/u/1745820?v=4" width="100px;" alt=""/><br /><sub><b>Kevin van Schaijk</b></sub></a><br /><a href="https://github.com/capacitor-data-storage-sqlite/commits?author=jepiqueau" title="Code">💻</a></td>
|
|
181
|
+
<td align="center"><a href="https://github.com/garbit"><img src="https://avatars.githubusercontent.com/u/555396?v=4" width="100px;" alt=""/><br /><sub><b>Andy Garbett</b></sub></a><br /><a href="https://github.com/capacitor-data-storage-sqlite/commits?author=jepiqueau" title="Documentation">📖</a></td>
|
|
182
|
+
|
|
183
|
+
</tr>
|
|
184
|
+
</table>
|
|
185
|
+
|
|
186
|
+
<!-- markdownlint-enable -->
|
|
187
|
+
<!-- prettier-ignore-end -->
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
<docgen-index>
|
|
191
|
+
|
|
192
|
+
* [`openStore(...)`](#openstore)
|
|
193
|
+
* [`closeStore(...)`](#closestore)
|
|
194
|
+
* [`isStoreOpen(...)`](#isstoreopen)
|
|
195
|
+
* [`isStoreExists(...)`](#isstoreexists)
|
|
196
|
+
* [`deleteStore(...)`](#deletestore)
|
|
197
|
+
* [`setTable(...)`](#settable)
|
|
198
|
+
* [`set(...)`](#set)
|
|
199
|
+
* [`get(...)`](#get)
|
|
200
|
+
* [`remove(...)`](#remove)
|
|
201
|
+
* [`clear()`](#clear)
|
|
202
|
+
* [`iskey(...)`](#iskey)
|
|
203
|
+
* [`keys()`](#keys)
|
|
204
|
+
* [`values()`](#values)
|
|
205
|
+
* [`filtervalues(...)`](#filtervalues)
|
|
206
|
+
* [`keysvalues()`](#keysvalues)
|
|
207
|
+
* [`isTable(...)`](#istable)
|
|
208
|
+
* [`tables()`](#tables)
|
|
209
|
+
* [`deleteTable(...)`](#deletetable)
|
|
210
|
+
* [`importFromJson(...)`](#importfromjson)
|
|
211
|
+
* [`isJsonValid(...)`](#isjsonvalid)
|
|
212
|
+
* [`exportToJson()`](#exporttojson)
|
|
213
|
+
* [Interfaces](#interfaces)
|
|
214
|
+
|
|
215
|
+
</docgen-index>
|
|
216
|
+
|
|
217
|
+
<docgen-api>
|
|
218
|
+
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
219
|
+
|
|
220
|
+
### openStore(...)
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
openStore(options: capOpenStorageOptions) => Promise<void>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Open a store
|
|
227
|
+
|
|
228
|
+
| Param | Type | Description |
|
|
229
|
+
| ------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
230
|
+
| **`options`** | <code><a href="#capopenstorageoptions">capOpenStorageOptions</a></code> | : <a href="#capopenstorageoptions">capOpenStorageOptions</a> |
|
|
231
|
+
|
|
232
|
+
**Since:** 0.0.1
|
|
233
|
+
|
|
234
|
+
--------------------
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
### closeStore(...)
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
closeStore(options: capStorageOptions) => Promise<void>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Close the Store
|
|
244
|
+
|
|
245
|
+
| Param | Type | Description |
|
|
246
|
+
| ------------- | --------------------------------------------------------------- | ---------------------------------------------------- |
|
|
247
|
+
| **`options`** | <code><a href="#capstorageoptions">capStorageOptions</a></code> | : <a href="#capstorageoptions">capStorageOptions</a> |
|
|
248
|
+
|
|
249
|
+
**Since:** 3.0.0
|
|
250
|
+
|
|
251
|
+
--------------------
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
### isStoreOpen(...)
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
isStoreOpen(options: capStorageOptions) => Promise<capDataStorageResult>
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Check if the Store is opened
|
|
261
|
+
|
|
262
|
+
| Param | Type | Description |
|
|
263
|
+
| ------------- | --------------------------------------------------------------- | ---------------------------------------------------- |
|
|
264
|
+
| **`options`** | <code><a href="#capstorageoptions">capStorageOptions</a></code> | : <a href="#capstorageoptions">capStorageOptions</a> |
|
|
265
|
+
|
|
266
|
+
**Returns:** <code>Promise<<a href="#capdatastorageresult">capDataStorageResult</a>></code>
|
|
267
|
+
|
|
268
|
+
**Since:** 3.0.0
|
|
269
|
+
|
|
270
|
+
--------------------
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
### isStoreExists(...)
|
|
274
|
+
|
|
275
|
+
```typescript
|
|
276
|
+
isStoreExists(options: capStorageOptions) => Promise<capDataStorageResult>
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Check if the Store exists
|
|
280
|
+
|
|
281
|
+
| Param | Type | Description |
|
|
282
|
+
| ------------- | --------------------------------------------------------------- | ---------------------------------------------------- |
|
|
283
|
+
| **`options`** | <code><a href="#capstorageoptions">capStorageOptions</a></code> | : <a href="#capstorageoptions">capStorageOptions</a> |
|
|
284
|
+
|
|
285
|
+
**Returns:** <code>Promise<<a href="#capdatastorageresult">capDataStorageResult</a>></code>
|
|
286
|
+
|
|
287
|
+
**Since:** 3.0.0
|
|
288
|
+
|
|
289
|
+
--------------------
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
### deleteStore(...)
|
|
293
|
+
|
|
294
|
+
```typescript
|
|
295
|
+
deleteStore(options: capOpenStorageOptions) => Promise<void>
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Delete a store
|
|
299
|
+
|
|
300
|
+
| Param | Type | Description |
|
|
301
|
+
| ------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
302
|
+
| **`options`** | <code><a href="#capopenstorageoptions">capOpenStorageOptions</a></code> | : <a href="#capopenstorageoptions">capOpenStorageOptions</a> |
|
|
303
|
+
|
|
304
|
+
**Since:** 0.0.1
|
|
305
|
+
|
|
306
|
+
--------------------
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
### setTable(...)
|
|
310
|
+
|
|
311
|
+
```typescript
|
|
312
|
+
setTable(options: capTableStorageOptions) => Promise<void>
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Set or Add a table to an existing store
|
|
316
|
+
|
|
317
|
+
| Param | Type | Description |
|
|
318
|
+
| ------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
319
|
+
| **`options`** | <code><a href="#captablestorageoptions">capTableStorageOptions</a></code> | : <a href="#captablestorageoptions">capTableStorageOptions</a> |
|
|
320
|
+
|
|
321
|
+
**Since:** 0.0.1
|
|
322
|
+
|
|
323
|
+
--------------------
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
### set(...)
|
|
327
|
+
|
|
328
|
+
```typescript
|
|
329
|
+
set(options: capDataStorageOptions) => Promise<void>
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Store a data with given key and value
|
|
333
|
+
|
|
334
|
+
| Param | Type | Description |
|
|
335
|
+
| ------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
336
|
+
| **`options`** | <code><a href="#capdatastorageoptions">capDataStorageOptions</a></code> | : <a href="#capdatastorageoptions">capDataStorageOptions</a> |
|
|
337
|
+
|
|
338
|
+
**Since:** 0.0.1
|
|
339
|
+
|
|
340
|
+
--------------------
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
### get(...)
|
|
344
|
+
|
|
345
|
+
```typescript
|
|
346
|
+
get(options: capDataStorageOptions) => Promise<capValueResult>
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Retrieve a data value for a given data key
|
|
350
|
+
|
|
351
|
+
| Param | Type | Description |
|
|
352
|
+
| ------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
353
|
+
| **`options`** | <code><a href="#capdatastorageoptions">capDataStorageOptions</a></code> | : <a href="#capdatastorageoptions">capDataStorageOptions</a> |
|
|
354
|
+
|
|
355
|
+
**Returns:** <code>Promise<<a href="#capvalueresult">capValueResult</a>></code>
|
|
356
|
+
|
|
357
|
+
**Since:** 0.0.1
|
|
358
|
+
|
|
359
|
+
--------------------
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
### remove(...)
|
|
363
|
+
|
|
364
|
+
```typescript
|
|
365
|
+
remove(options: capDataStorageOptions) => Promise<void>
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Remove a data with given key
|
|
369
|
+
|
|
370
|
+
| Param | Type | Description |
|
|
371
|
+
| ------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
372
|
+
| **`options`** | <code><a href="#capdatastorageoptions">capDataStorageOptions</a></code> | : <a href="#capdatastorageoptions">capDataStorageOptions</a> |
|
|
373
|
+
|
|
374
|
+
**Since:** 0.0.1
|
|
375
|
+
|
|
376
|
+
--------------------
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
### clear()
|
|
380
|
+
|
|
381
|
+
```typescript
|
|
382
|
+
clear() => Promise<void>
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
Clear the Data Store (delete all keys)
|
|
386
|
+
|
|
387
|
+
**Since:** 0.0.1
|
|
388
|
+
|
|
389
|
+
--------------------
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
### iskey(...)
|
|
393
|
+
|
|
394
|
+
```typescript
|
|
395
|
+
iskey(options: capDataStorageOptions) => Promise<capDataStorageResult>
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
Check if a data key exists
|
|
399
|
+
|
|
400
|
+
| Param | Type | Description |
|
|
401
|
+
| ------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
402
|
+
| **`options`** | <code><a href="#capdatastorageoptions">capDataStorageOptions</a></code> | : <a href="#capdatastorageoptions">capDataStorageOptions</a> |
|
|
403
|
+
|
|
404
|
+
**Returns:** <code>Promise<<a href="#capdatastorageresult">capDataStorageResult</a>></code>
|
|
405
|
+
|
|
406
|
+
**Since:** 0.0.1
|
|
407
|
+
|
|
408
|
+
--------------------
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
### keys()
|
|
412
|
+
|
|
413
|
+
```typescript
|
|
414
|
+
keys() => Promise<capKeysResult>
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
Get the data key list
|
|
418
|
+
|
|
419
|
+
**Returns:** <code>Promise<<a href="#capkeysresult">capKeysResult</a>></code>
|
|
420
|
+
|
|
421
|
+
**Since:** 0.0.1
|
|
422
|
+
|
|
423
|
+
--------------------
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
### values()
|
|
427
|
+
|
|
428
|
+
```typescript
|
|
429
|
+
values() => Promise<capValuesResult>
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
Get the data value list
|
|
433
|
+
|
|
434
|
+
**Returns:** <code>Promise<<a href="#capvaluesresult">capValuesResult</a>></code>
|
|
435
|
+
|
|
436
|
+
**Since:** 0.0.1
|
|
437
|
+
|
|
438
|
+
--------------------
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
### filtervalues(...)
|
|
442
|
+
|
|
443
|
+
```typescript
|
|
444
|
+
filtervalues(options: capFilterStorageOptions) => Promise<capValuesResult>
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Get the data value list for filter keys
|
|
448
|
+
|
|
449
|
+
| Param | Type | Description |
|
|
450
|
+
| ------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------- |
|
|
451
|
+
| **`options`** | <code><a href="#capfilterstorageoptions">capFilterStorageOptions</a></code> | : <a href="#capfilterstorageoptions">capFilterStorageOptions</a> |
|
|
452
|
+
|
|
453
|
+
**Returns:** <code>Promise<<a href="#capvaluesresult">capValuesResult</a>></code>
|
|
454
|
+
|
|
455
|
+
**Since:** 2.4.2
|
|
456
|
+
|
|
457
|
+
--------------------
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
### keysvalues()
|
|
461
|
+
|
|
462
|
+
```typescript
|
|
463
|
+
keysvalues() => Promise<capKeysValuesResult>
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
Get the data key/value pair list
|
|
467
|
+
|
|
468
|
+
**Returns:** <code>Promise<<a href="#capkeysvaluesresult">capKeysValuesResult</a>></code>
|
|
469
|
+
|
|
470
|
+
**Since:** 0.0.1
|
|
471
|
+
|
|
472
|
+
--------------------
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
### isTable(...)
|
|
476
|
+
|
|
477
|
+
```typescript
|
|
478
|
+
isTable(options: capTableStorageOptions) => Promise<capDataStorageResult>
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
Check if a table exists
|
|
482
|
+
|
|
483
|
+
| Param | Type | Description |
|
|
484
|
+
| ------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
485
|
+
| **`options`** | <code><a href="#captablestorageoptions">capTableStorageOptions</a></code> | : <a href="#captablestorageoptions">capTableStorageOptions</a> |
|
|
486
|
+
|
|
487
|
+
**Returns:** <code>Promise<<a href="#capdatastorageresult">capDataStorageResult</a>></code>
|
|
488
|
+
|
|
489
|
+
**Since:** 3.0.0
|
|
490
|
+
|
|
491
|
+
--------------------
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
### tables()
|
|
495
|
+
|
|
496
|
+
```typescript
|
|
497
|
+
tables() => Promise<capTablesResult>
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
Get the table list for the current store
|
|
501
|
+
|
|
502
|
+
**Returns:** <code>Promise<<a href="#captablesresult">capTablesResult</a>></code>
|
|
503
|
+
|
|
504
|
+
**Since:** 3.0.0
|
|
505
|
+
|
|
506
|
+
--------------------
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
### deleteTable(...)
|
|
510
|
+
|
|
511
|
+
```typescript
|
|
512
|
+
deleteTable(options: capTableStorageOptions) => Promise<void>
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
Delete a table
|
|
516
|
+
|
|
517
|
+
| Param | Type | Description |
|
|
518
|
+
| ------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
519
|
+
| **`options`** | <code><a href="#captablestorageoptions">capTableStorageOptions</a></code> | : <a href="#captablestorageoptions">capTableStorageOptions</a> |
|
|
520
|
+
|
|
521
|
+
**Since:** 3.0.0
|
|
522
|
+
|
|
523
|
+
--------------------
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
### importFromJson(...)
|
|
527
|
+
|
|
528
|
+
```typescript
|
|
529
|
+
importFromJson(options: capStoreImportOptions) => Promise<capDataStorageChanges>
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
Import a database From a JSON
|
|
533
|
+
|
|
534
|
+
| Param | Type |
|
|
535
|
+
| ------------- | ----------------------------------------------------------------------- |
|
|
536
|
+
| **`options`** | <code><a href="#capstoreimportoptions">capStoreImportOptions</a></code> |
|
|
537
|
+
|
|
538
|
+
**Returns:** <code>Promise<<a href="#capdatastoragechanges">capDataStorageChanges</a>></code>
|
|
539
|
+
|
|
540
|
+
**Since:** 3.2.0
|
|
541
|
+
|
|
542
|
+
--------------------
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
### isJsonValid(...)
|
|
546
|
+
|
|
547
|
+
```typescript
|
|
548
|
+
isJsonValid(options: capStoreImportOptions) => Promise<capDataStorageResult>
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
Check the validity of a JSON Object
|
|
552
|
+
|
|
553
|
+
| Param | Type |
|
|
554
|
+
| ------------- | ----------------------------------------------------------------------- |
|
|
555
|
+
| **`options`** | <code><a href="#capstoreimportoptions">capStoreImportOptions</a></code> |
|
|
556
|
+
|
|
557
|
+
**Returns:** <code>Promise<<a href="#capdatastorageresult">capDataStorageResult</a>></code>
|
|
558
|
+
|
|
559
|
+
**Since:** 3.2.0
|
|
560
|
+
|
|
561
|
+
--------------------
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
### exportToJson()
|
|
565
|
+
|
|
566
|
+
```typescript
|
|
567
|
+
exportToJson() => Promise<capStoreJson>
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
Export the given database to a JSON Object
|
|
571
|
+
|
|
572
|
+
**Returns:** <code>Promise<<a href="#capstorejson">capStoreJson</a>></code>
|
|
573
|
+
|
|
574
|
+
**Since:** 3.2.0
|
|
575
|
+
|
|
576
|
+
--------------------
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
### Interfaces
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
#### capOpenStorageOptions
|
|
583
|
+
|
|
584
|
+
| Prop | Type | Description |
|
|
585
|
+
| --------------- | -------------------- | --------------------------------------------------------------------------- |
|
|
586
|
+
| **`database`** | <code>string</code> | The storage database name |
|
|
587
|
+
| **`table`** | <code>string</code> | The storage table name |
|
|
588
|
+
| **`encrypted`** | <code>boolean</code> | Set to true for database encryption |
|
|
589
|
+
| **`mode`** | <code>string</code> | * Set the mode for database encryption ["encryption", "secret","newsecret"] |
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
#### capStorageOptions
|
|
593
|
+
|
|
594
|
+
| Prop | Type | Description |
|
|
595
|
+
| -------------- | ------------------- | ---------------- |
|
|
596
|
+
| **`database`** | <code>string</code> | The storage name |
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
#### capDataStorageResult
|
|
600
|
+
|
|
601
|
+
| Prop | Type | Description |
|
|
602
|
+
| ------------- | -------------------- | --------------------------------------------- |
|
|
603
|
+
| **`result`** | <code>boolean</code> | result set to true when successful else false |
|
|
604
|
+
| **`message`** | <code>string</code> | a returned message |
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
#### capTableStorageOptions
|
|
608
|
+
|
|
609
|
+
| Prop | Type | Description |
|
|
610
|
+
| ----------- | ------------------- | ---------------------- |
|
|
611
|
+
| **`table`** | <code>string</code> | The storage table name |
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
#### capDataStorageOptions
|
|
615
|
+
|
|
616
|
+
| Prop | Type | Description |
|
|
617
|
+
| ----------- | ------------------- | ---------------------------- |
|
|
618
|
+
| **`key`** | <code>string</code> | The data name |
|
|
619
|
+
| **`value`** | <code>string</code> | The data value when required |
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
#### capValueResult
|
|
623
|
+
|
|
624
|
+
| Prop | Type | Description |
|
|
625
|
+
| ----------- | ------------------- | ----------------------------------- |
|
|
626
|
+
| **`value`** | <code>string</code> | the data value for a given data key |
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
#### capKeysResult
|
|
630
|
+
|
|
631
|
+
| Prop | Type | Description |
|
|
632
|
+
| ---------- | --------------------- | ----------------------------- |
|
|
633
|
+
| **`keys`** | <code>string[]</code> | the data key list as an Array |
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
#### capValuesResult
|
|
637
|
+
|
|
638
|
+
| Prop | Type | Description |
|
|
639
|
+
| ------------ | --------------------- | -------------------------------- |
|
|
640
|
+
| **`values`** | <code>string[]</code> | the data values list as an Array |
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
#### capFilterStorageOptions
|
|
644
|
+
|
|
645
|
+
| Prop | Type | Description |
|
|
646
|
+
| ------------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
647
|
+
| **`filter`** | <code>string</code> | The filter data for filtering keys ['%filter', 'filter', 'filter%'] for [starts with filter, contains filter, ends with filter] |
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
#### capKeysValuesResult
|
|
651
|
+
|
|
652
|
+
| Prop | Type | Description |
|
|
653
|
+
| ---------------- | ------------------ | ------------------------------------------------------------------ |
|
|
654
|
+
| **`keysvalues`** | <code>any[]</code> | the data keys/values list as an Array of {key:string,value:string} |
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
#### capTablesResult
|
|
658
|
+
|
|
659
|
+
| Prop | Type | Description |
|
|
660
|
+
| ------------ | --------------------- | --------------------------- |
|
|
661
|
+
| **`tables`** | <code>string[]</code> | the tables list as an Array |
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
#### capDataStorageChanges
|
|
665
|
+
|
|
666
|
+
| Prop | Type | Description |
|
|
667
|
+
| ------------- | ------------------- | ---------------------------------------------------- |
|
|
668
|
+
| **`changes`** | <code>number</code> | the number of changes from an importFromJson command |
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
#### capStoreImportOptions
|
|
672
|
+
|
|
673
|
+
| Prop | Type | Description |
|
|
674
|
+
| ---------------- | ------------------- | ----------------------------- |
|
|
675
|
+
| **`jsonstring`** | <code>string</code> | Set the JSON object to import |
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
#### capStoreJson
|
|
679
|
+
|
|
680
|
+
| Prop | Type | Description |
|
|
681
|
+
| ------------ | ----------------------------------------------- | --------------------- |
|
|
682
|
+
| **`export`** | <code><a href="#jsonstore">JsonStore</a></code> | an export JSON object |
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
#### JsonStore
|
|
686
|
+
|
|
687
|
+
| Prop | Type | Description |
|
|
688
|
+
| --------------- | ------------------------ | ------------------------------------------------------------ |
|
|
689
|
+
| **`database`** | <code>string</code> | The database name |
|
|
690
|
+
| **`encrypted`** | <code>boolean</code> | Set to true (database encryption) / false iOS & Android only |
|
|
691
|
+
| **`tables`** | <code>JsonTable[]</code> | * Array of Table (<a href="#jsontable">JsonTable</a>) |
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
#### JsonTable
|
|
695
|
+
|
|
696
|
+
| Prop | Type | Description |
|
|
697
|
+
| ------------ | ------------------------------------ | ------------------------------------------------------------------------------ |
|
|
698
|
+
| **`name`** | <code>string</code> | The database name |
|
|
699
|
+
| **`values`** | <code>capDataStorageOptions[]</code> | * Array of Values (<a href="#capdatastorageoptions">capDataStorageOptions</a>) |
|
|
700
|
+
|
|
701
|
+
</docgen-api>
|
|
702
|
+
|
|
703
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
704
|
+
|
|
705
|
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
|
706
|
+
|
|
707
|
+
<p align="left" style="font-size:47px">Retirement message of @jepiqueau --></p>
|
|
708
|
+
<br>
|
|
709
|
+
<p align="left">
|
|
710
|
+
I have been dedicated to developing and maintaining this plugin for many years since the inception of Ionic Capacitor. Now, at 73+ years old, and with my MacBook Pro becoming obsolete for running Capacitor 6 for iOS, I have made the decision to cease maintenance of the plugin. If anyone wishes to take ownership of this plugin, they are welcome to do so.
|
|
711
|
+
</p>
|
|
712
|
+
<br>
|
|
713
|
+
<p align="left">
|
|
714
|
+
It has been a great honor to be part of this development journey alongside the developer community. I am grateful to see many of you following me on this path and incorporating the plugin into your applications. Your comments and suggestions have motivated me to continuously improve it.
|
|
715
|
+
</p>
|
|
716
|
+
<br>
|
|
717
|
+
<p align="left">
|
|
718
|
+
I have made this decision due to several family-related troubles that require my full attention and time. Therefore, I will not be stepping back. Thank you to all of you for your support.
|
|
719
|
+
</p>
|
|
720
|
+
<br>
|
|
721
|
+
<p align="left" style="font-size:47px">End <--</p>
|
|
722
|
+
<!-- Message below Note from the Owner - End -->
|
|
723
|
+
<br>
|
|
724
|
+
|