Skip to content

Commit

Permalink
feat(sqlite): add SQLiteDatabaseConfig interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Mar 28, 2017
1 parent 01aece1 commit 544e7ef
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/@ionic-native/plugins/sqlite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ import { Cordova, CordovaInstance, Plugin, CordovaCheck, InstanceProperty } from

declare var sqlitePlugin;

export interface SQLiteDatabaseConfig {
/**
* Name of the database
*/
name: string;
/**
* Location of the database
*/
location: string;
}

/**
* @hidden
*/
Expand Down Expand Up @@ -160,6 +171,8 @@ export class SQLiteObject {
*
* @classes
* SQLiteObject
* @interfaces
* SQLiteDatabaseConfig
*/
@Plugin({
pluginName: 'SQLite',
Expand All @@ -179,7 +192,7 @@ export class SQLite {
* @return Promise<SQLiteObject>
*/
@CordovaCheck()
create(config: any): Promise<SQLiteObject> {
create(config: SQLiteDatabaseConfig): Promise<SQLiteObject> {
return new Promise((resolve, reject) => {
sqlitePlugin.openDatabase(config, db => resolve(new SQLiteObject(db)), reject);
});
Expand Down

0 comments on commit 544e7ef

Please sign in to comment.