refactor(SQLite):
This commit is contained in:
parent
499e89e254
commit
9c25244bc6
@ -1,5 +1,8 @@
|
||||
import {CordovaInstance, Plugin, Cordova} from './plugin';
|
||||
import { Cordova, CordovaInstance, Plugin } from './plugin';
|
||||
|
||||
|
||||
declare var sqlitePlugin;
|
||||
|
||||
/**
|
||||
* @name SQLite
|
||||
*
|
||||
@ -39,7 +42,7 @@ export class SQLite {
|
||||
return this._objectInstance.databaseFeatures;
|
||||
}
|
||||
|
||||
constructor () {}
|
||||
constructor() { }
|
||||
|
||||
/**
|
||||
* Open or create a SQLite database file.
|
||||
@ -67,7 +70,7 @@ export class SQLite {
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
openDatabase (config: any): Promise<any> {
|
||||
openDatabase(config: any): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
sqlitePlugin.openDatabase(config, db => {
|
||||
this._objectInstance = db;
|
||||
@ -82,26 +85,26 @@ export class SQLite {
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
addTransaction (transaction: any): void {}
|
||||
addTransaction(transaction: any): void { }
|
||||
|
||||
@CordovaInstance()
|
||||
transaction (fn: any): Promise<any> {return; }
|
||||
transaction(fn: any): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance()
|
||||
readTransaction (fn: any): Promise<any> {return; }
|
||||
readTransaction(fn: any): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
startNextTransaction (): void {}
|
||||
startNextTransaction(): void { }
|
||||
|
||||
@CordovaInstance()
|
||||
close (): Promise<any> {return; }
|
||||
close(): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
start (): void {}
|
||||
start(): void { }
|
||||
|
||||
/**
|
||||
* Execute SQL on the opened database. Note, you must call `openDatabase` first, and
|
||||
@ -117,59 +120,59 @@ export class SQLite {
|
||||
* ```
|
||||
*/
|
||||
@CordovaInstance()
|
||||
executeSql (statement: string, params: any): Promise<any> {return; }
|
||||
executeSql(statement: string, params: any): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance()
|
||||
addSatement (sql, values): Promise<any> {return; }
|
||||
addSatement(sql, values): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance()
|
||||
sqlBatch (sqlStatements: any): Promise<any> {return; }
|
||||
sqlBatch(sqlStatements: any): Promise<any> { return; }
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
abortallPendingTransactions (): void {}
|
||||
abortallPendingTransactions(): void { }
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
handleStatementSuccess (handler, response): void {}
|
||||
handleStatementSuccess(handler, response): void { }
|
||||
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
handleStatementFailure (handler, response): void {}
|
||||
handleStatementFailure(handler, response): void { }
|
||||
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
run (): void {}
|
||||
run(): void { }
|
||||
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
abort (txFailure): void {}
|
||||
abort(txFailure): void { }
|
||||
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
finish (): void {}
|
||||
finish(): void { }
|
||||
|
||||
|
||||
@CordovaInstance({
|
||||
sync: true
|
||||
})
|
||||
abortFromQ (sqlerror): void {}
|
||||
abortFromQ(sqlerror): void { }
|
||||
|
||||
|
||||
@Cordova()
|
||||
static echoTest (): Promise<any> {return; }
|
||||
static echoTest(): Promise<any> { return; }
|
||||
|
||||
@Cordova()
|
||||
static deleteDatabase (first): Promise<any> {return; }
|
||||
static deleteDatabase(first): Promise<any> { return; }
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user