1.0.6 • Published 1 year ago

localforage-cordova-sq-lite-driver-ts v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

localforage-cordovaq-sq-lite-driver-ts

npm version npm bundle size

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,
            ],
        }),
        ...
    ]
})

Authors