fix(sqlite): remove trailing whitespaces
This commit is contained in:
parent
f607a03c9b
commit
7547a94c80
@ -1,5 +1,12 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, CordovaInstance, Plugin, CordovaCheck, InstanceProperty, IonicNativePlugin } from '@ionic-native/core';
|
import {
|
||||||
|
Cordova,
|
||||||
|
CordovaCheck,
|
||||||
|
CordovaInstance,
|
||||||
|
InstanceProperty,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
|
||||||
declare const sqlitePlugin: any;
|
declare const sqlitePlugin: any;
|
||||||
|
|
||||||
@ -31,8 +38,18 @@ export interface SQLiteDatabaseConfig {
|
|||||||
*/
|
*/
|
||||||
export interface SQLiteTransaction {
|
export interface SQLiteTransaction {
|
||||||
start: () => void;
|
start: () => void;
|
||||||
executeSql: (sql: any, values: any, success: Function, error: Function) => void;
|
executeSql: (
|
||||||
addStatement: (sql: any, values: any, success: Function, error: Function) => void;
|
sql: any,
|
||||||
|
values: any,
|
||||||
|
success: Function,
|
||||||
|
error: Function
|
||||||
|
) => void;
|
||||||
|
addStatement: (
|
||||||
|
sql: any,
|
||||||
|
values: any,
|
||||||
|
success: Function,
|
||||||
|
error: Function
|
||||||
|
) => void;
|
||||||
handleStatementSuccess: (handler: Function, response: any) => void;
|
handleStatementSuccess: (handler: Function, response: any) => void;
|
||||||
handleStatementFailure: (handler: Function, response: any) => void;
|
handleStatementFailure: (handler: Function, response: any) => void;
|
||||||
run: () => void;
|
run: () => void;
|
||||||
@ -45,8 +62,7 @@ export interface SQLiteTransaction {
|
|||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
export class SQLiteObject {
|
export class SQLiteObject {
|
||||||
|
constructor(public _objectInstance: any) {}
|
||||||
constructor(public _objectInstance: any) { }
|
|
||||||
|
|
||||||
@InstanceProperty databaseFeatures: { isSQLitePluginDatabase: boolean };
|
@InstanceProperty databaseFeatures: { isSQLitePluginDatabase: boolean };
|
||||||
|
|
||||||
@ -55,7 +71,7 @@ export class SQLiteObject {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
addTransaction(transaction: (tx: SQLiteTransaction) => void): void { }
|
addTransaction(transaction: (tx: SQLiteTransaction) => void): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param fn {any}
|
* @param fn {any}
|
||||||
@ -65,51 +81,62 @@ export class SQLiteObject {
|
|||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
errorIndex: 1
|
errorIndex: 1
|
||||||
})
|
})
|
||||||
transaction(fn: any): Promise<any> { return; }
|
transaction(fn: any): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param fn {Function}
|
* @param fn {Function}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
readTransaction(fn: (tx: SQLiteTransaction) => void): Promise<any> { return; }
|
readTransaction(fn: (tx: SQLiteTransaction) => void): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
startNextTransaction(): void { }
|
startNextTransaction(): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
open(): Promise<any> { return; }
|
open(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
close(): Promise<any> { return; }
|
close(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute SQL on the opened database. Note, you must call `create` first, and
|
* Execute SQL on the opened database. Note, you must call `create` first, and
|
||||||
* ensure it resolved and successfully opened the database.
|
* ensure it resolved and successfully opened the database.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
executeSql(statement: string, params: any): Promise<any> { return; }
|
executeSql(statement: string, params: any): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param sqlStatements {Array<string | string[] | any>}
|
* @param sqlStatements {Array<string | string[] | any>}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
sqlBatch(sqlStatements: Array<string | string[] | any>): Promise<any> { return; }
|
sqlBatch(sqlStatements: Array<string | string[] | any>): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
abortallPendingTransactions(): void { }
|
abortallPendingTransactions(): void {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -159,7 +186,6 @@ export class SQLiteObject {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SQLite extends IonicNativePlugin {
|
export class SQLite extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open or create a SQLite database file.
|
* Open or create a SQLite database file.
|
||||||
*
|
*
|
||||||
@ -171,7 +197,11 @@ export class SQLite extends IonicNativePlugin {
|
|||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
create(config: SQLiteDatabaseConfig): Promise<SQLiteObject> {
|
create(config: SQLiteDatabaseConfig): Promise<SQLiteObject> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
sqlitePlugin.openDatabase(config, (db: any) => resolve(new SQLiteObject(db)), reject);
|
sqlitePlugin.openDatabase(
|
||||||
|
config,
|
||||||
|
(db: any) => resolve(new SQLiteObject(db)),
|
||||||
|
reject
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,14 +210,18 @@ export class SQLite extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
echoTest(): Promise<any> { return; }
|
echoTest(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Automatically verify basic database access operations including opening a database
|
* Automatically verify basic database access operations including opening a database
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
selfTest(): Promise<any> { return; }
|
selfTest(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a database
|
* Deletes a database
|
||||||
@ -195,6 +229,7 @@ export class SQLite extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
deleteDatabase(config: SQLiteDatabaseConfig): Promise<any> { return; }
|
deleteDatabase(config: SQLiteDatabaseConfig): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user