Capacitor Data Storage SQLite Plugin for IOS and Android
Branch: master
Clone or download
Quéau Jean Pierre Quéau Jean Pierre
Quéau Jean Pierre and Quéau Jean Pierre change plugin definitions
Latest commit 56386fb Dec 8, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android change plugin definitions Dec 8, 2018
dist/esm change plugin definitions Dec 8, 2018
ios/Plugin change plugin definitions Dec 8, 2018
node_modules
src change plugin definitions Dec 8, 2018
.gitignore first commit May 2, 2018
CapacitorDataStorageSqlite.podspec change plugin definitions Dec 8, 2018
package-lock.json change plugin definitions Dec 8, 2018
package.json change plugin definitions Dec 8, 2018
readme.md change plugin definitions Dec 8, 2018
rollup.config.js second full commit May 2, 2018
tsconfig.json second full commit May 2, 2018

readme.md

Capacitor Data Storage SQLite Plugin

Capacitor Data Storage SQlite Plugin is a custom Native Capacitor plugin to store permanently data to SQLite on IOS and Android platforms and to IndexDB for the Web and Electron platforms. As capacitor provides fisrt-class Progressive Web App support so you can use this plugin in your app which will later be deployed to the app stores and the mobile web.

Capacitor Data Storage SQlite Plugin provides a key-value store for simple data of type string only, so JSON object can be stored, you should manage conversion through JSON.stringify before storing and JSON.parse when retrieving the data, use the same procedure for number through number.toString() and Number().

View Me

capacitor-data-storage-sqlite

Methods available

clear()                             clear the store
get({key:"foo"})                    get a value given the key           
iskey({key:"foo"})                  test key exists
keys()                              get all keys
keysvalues()                        get all key/value pairs
remove({key:"foo"})                 remove a key
set({key:"foo",value:"foovalue"})   set key and its value
values()                            get all values

To use the Plugin in your Project

npm install --save capacitor-data-storage-sqlite@latest

Ionic App showing an integration of capacitor-data-storage-sqlite plugin

Vue App showing an integration of capacitor-data-storage-sqlite plugin

PWA App showing an integration of capacitor-data-storage-sqlite plugin

Remarks

This release of the plugin includes the Native IOS code (Objective-C/Swift),the Native Android code (Java) and the Web code (Typescript) using Capacitor v1.0.0-beta.11

Dependencies

The IOS code is based on SQLite.swift as wrapper for SQLite, the Web code has been implemented with localforage as wrapper for indexDB.