localforage-cordova-sq-lite-driver-ts
v1.0.6
Published
SQLite driver for cordova apps using localforage
Downloads
72
Maintainers
Readme
localforage-cordovaq-sq-lite-driver-ts
SQLite driver for Cordova or Capacitor apps using localForage.
It's heavily inspired by localForage-cordovaSQLiteDriver which isn't actively maintained.
Setup with ionic
Install all required packages:
npm i @ionic/storage-angular localforage-cordova-sq-lite-driver-ts cordova-sqlite-storage
Next have to define the driverOrder
for the IonicStorageModule
:
import { IonicStorageModule } from '@ionic/storage-angular';
import { CordovaSQLiteDriver } from 'localforage-cordova-sq-lite-driver-ts';
@NgModule({
...
imports: [
...
IonicStorageModule.forRoot({
driverOrder: [
CordovaSQLiteDriver._driver,
Drivers.IndexedDB,
Drivers.LocalStorage,
],
}),
...
]
})