Search docs/
Getting StartedPlugins

SQLite

Access SQLite databases on the device.

https://github.com/litehelpers/Cordova-sqlite-storage

Stuck on a Cordova issue?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Contact Us Today!

Installation

npm install cordova-sqlite-storagenpm install @ionic-native/sqliteionic cap syncionic cordova plugin add cordova-sqlite-storagenpm install @ionic-native/sqlite
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us

Supported Platforms

  • Android
  • iOS
  • macOS
  • Windows

Usage

React

See here.

Angular

import { SQLite, SQLiteObject } from '@ionic-native/sqlite/ngx';

constructor(private sqlite: SQLite) { }

...

this.sqlite.create({
  name: 'data.db',
  location: 'default'
})
  .then((db: SQLiteObject) => {


    db.executeSql('create table danceMoves(name VARCHAR(32))', [])
      .then(() => console.log('Executed SQL'))
      .catch(e => console.log(e));


  })
  .catch(e => console.log(e));