Skip to content

NLueg/localforage-cordova-sq-lite-driver

Repository files navigation

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

About

SQLite driver for cordova apps using localforage

Resources

Stars

Watchers

Forks

Packages

No packages published