Secure Storage API
Index
Classes
Interfaces
Classes
SQLite
SQLite:
name: SQLite
description: Access SQLite databases on the device.
usage:
import { SQLite, SQLiteObject } from '@ionic-enterprise/secure-storage/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));
classes: SQLiteObject
interfaces: SQLiteDatabaseConfig SQLiteTransaction
create
▸ create(config: SQLiteDatabaseConfig): Promise
<SQLiteObject
>
Open or create a SQLite database file.
See the plugin docs for an explanation of all options: https://github.com/litehelpers/Cordova-sqlite-storage#opening-a-database
Parameters:
Name | Type | Description |
---|---|---|
config | SQLiteDatabaseConfig | database configuration |
Returns: Promise
<SQLiteObject
>
Promise<SQLiteObject>
deleteDatabase
▸ deleteDatabase(config: SQLiteDatabaseConfig): Promise
<any
>
Deletes a database
Parameters:
Name | Type | Description |
---|---|---|
config | SQLiteDatabaseConfig | database configuration |
Returns: Promise
<any
>
echoTest
▸ echoTest(): Promise
<any
>
Verify that both the Javascript and native part of this plugin are installed in your application
Returns: Promise
<any
>
selfTest
▸ selfTest(): Promise
<any
>
Automatically verify basic database access operations including opening a database
Returns: Promise
<any
>
Interfaces
SQLiteDatabaseConfig
SQLiteDatabaseConfig:
<Optional>
createFromLocation
● createFromLocation: number
support opening pre-filled databases with https://github.com/litehelpers/cordova-sqlite-ext
<Optional>
iosDatabaseLocation
● iosDatabaseLocation: string
iOS Database Location. Example: 'Library'
<Optional>
key
● key: string
support encrypted databases with https://github.com/litehelpers/Cordova-sqlcipher-adapter
<Optional>
location
● location: string
Location of the database. Example: 'default'
name
● name: string
Name of the database. Example: 'my.db'