From 7547a94c80b712d335e0c090047f1b8139179532 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 16 Mar 2018 20:48:02 +0100 Subject: [PATCH] fix(sqlite): remove trailing whitespaces --- src/@ionic-native/plugins/sqlite/index.ts | 83 ++++++++++++++++------- 1 file changed, 59 insertions(+), 24 deletions(-) diff --git a/src/@ionic-native/plugins/sqlite/index.ts b/src/@ionic-native/plugins/sqlite/index.ts index dbbb93f1fb..36bba60a5d 100644 --- a/src/@ionic-native/plugins/sqlite/index.ts +++ b/src/@ionic-native/plugins/sqlite/index.ts @@ -1,5 +1,12 @@ 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; @@ -17,8 +24,8 @@ export interface SQLiteDatabaseConfig { */ iosDatabaseLocation?: string; /** - * support opening pre-filled databases with https://github.com/litehelpers/cordova-sqlite-ext - */ + * support opening pre-filled databases with https://github.com/litehelpers/cordova-sqlite-ext + */ createFromLocation?: number; /** * support encrypted databases with https://github.com/litehelpers/Cordova-sqlcipher-adapter @@ -31,8 +38,18 @@ export interface SQLiteDatabaseConfig { */ export interface SQLiteTransaction { start: () => void; - executeSql: (sql: any, values: any, success: Function, error: Function) => void; - addStatement: (sql: any, values: any, success: Function, error: Function) => void; + executeSql: ( + 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; handleStatementFailure: (handler: Function, response: any) => void; run: () => void; @@ -45,8 +62,7 @@ export interface SQLiteTransaction { * @hidden */ export class SQLiteObject { - - constructor(public _objectInstance: any) { } + constructor(public _objectInstance: any) {} @InstanceProperty databaseFeatures: { isSQLitePluginDatabase: boolean }; @@ -55,7 +71,7 @@ export class SQLiteObject { @CordovaInstance({ sync: true }) - addTransaction(transaction: (tx: SQLiteTransaction) => void): void { } + addTransaction(transaction: (tx: SQLiteTransaction) => void): void {} /** * @param fn {any} @@ -65,51 +81,62 @@ export class SQLiteObject { successIndex: 2, errorIndex: 1 }) - transaction(fn: any): Promise { return; } + transaction(fn: any): Promise { + return; + } /** * @param fn {Function} * @returns {Promise} */ @CordovaInstance() - readTransaction(fn: (tx: SQLiteTransaction) => void): Promise { return; } + readTransaction(fn: (tx: SQLiteTransaction) => void): Promise { + return; + } @CordovaInstance({ sync: true }) - startNextTransaction(): void { } + startNextTransaction(): void {} /** * @returns {Promise} */ @CordovaInstance() - open(): Promise { return; } + open(): Promise { + return; + } /** * @returns {Promise} */ @CordovaInstance() - close(): Promise { return; } + close(): Promise { + return; + } /** * Execute SQL on the opened database. Note, you must call `create` first, and * ensure it resolved and successfully opened the database. */ @CordovaInstance() - executeSql(statement: string, params: any): Promise { return; } + executeSql(statement: string, params: any): Promise { + return; + } /** * @param sqlStatements {Array} * @returns {Promise} */ @CordovaInstance() - sqlBatch(sqlStatements: Array): Promise { return; } + sqlBatch(sqlStatements: Array): Promise { + return; + } @CordovaInstance({ sync: true }) - abortallPendingTransactions(): void { } - + abortallPendingTransactions(): void {} } /** @@ -159,7 +186,6 @@ export class SQLiteObject { }) @Injectable() export class SQLite extends IonicNativePlugin { - /** * Open or create a SQLite database file. * @@ -171,7 +197,11 @@ export class SQLite extends IonicNativePlugin { @CordovaCheck() create(config: SQLiteDatabaseConfig): Promise { 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} */ @Cordova() - echoTest(): Promise { return; } - + echoTest(): Promise { + return; + } + /** * Automatically verify basic database access operations including opening a database * @returns {Promise} */ @Cordova() - selfTest(): Promise { return; } + selfTest(): Promise { + return; + } /** * Deletes a database @@ -195,6 +229,7 @@ export class SQLite extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - deleteDatabase(config: SQLiteDatabaseConfig): Promise { return; } - + deleteDatabase(config: SQLiteDatabaseConfig): Promise { + return; + } }