Skip to content

Commit 7547a94

Browse files
committed
fix(sqlite): remove trailing whitespaces
1 parent f607a03 commit 7547a94

File tree

1 file changed

+59
-24
lines changed
  • src/@ionic-native/plugins/sqlite

1 file changed

+59
-24
lines changed

src/@ionic-native/plugins/sqlite/index.ts

Lines changed: 59 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import { Injectable } from '@angular/core';
2-
import { Cordova, CordovaInstance, Plugin, CordovaCheck, InstanceProperty, IonicNativePlugin } from '@ionic-native/core';
2+
import {
3+
Cordova,
4+
CordovaCheck,
5+
CordovaInstance,
6+
InstanceProperty,
7+
IonicNativePlugin,
8+
Plugin
9+
} from '@ionic-native/core';
310

411
declare const sqlitePlugin: any;
512

@@ -17,8 +24,8 @@ export interface SQLiteDatabaseConfig {
1724
*/
1825
iosDatabaseLocation?: string;
1926
/**
20-
* support opening pre-filled databases with https://github.com/litehelpers/cordova-sqlite-ext
21-
*/
27+
* support opening pre-filled databases with https://github.com/litehelpers/cordova-sqlite-ext
28+
*/
2229
createFromLocation?: number;
2330
/**
2431
* support encrypted databases with https://github.com/litehelpers/Cordova-sqlcipher-adapter
@@ -31,8 +38,18 @@ export interface SQLiteDatabaseConfig {
3138
*/
3239
export interface SQLiteTransaction {
3340
start: () => void;
34-
executeSql: (sql: any, values: any, success: Function, error: Function) => void;
35-
addStatement: (sql: any, values: any, success: Function, error: Function) => void;
41+
executeSql: (
42+
sql: any,
43+
values: any,
44+
success: Function,
45+
error: Function
46+
) => void;
47+
addStatement: (
48+
sql: any,
49+
values: any,
50+
success: Function,
51+
error: Function
52+
) => void;
3653
handleStatementSuccess: (handler: Function, response: any) => void;
3754
handleStatementFailure: (handler: Function, response: any) => void;
3855
run: () => void;
@@ -45,8 +62,7 @@ export interface SQLiteTransaction {
4562
* @hidden
4663
*/
4764
export class SQLiteObject {
48-
49-
constructor(public _objectInstance: any) { }
65+
constructor(public _objectInstance: any) {}
5066

5167
@InstanceProperty databaseFeatures: { isSQLitePluginDatabase: boolean };
5268

@@ -55,7 +71,7 @@ export class SQLiteObject {
5571
@CordovaInstance({
5672
sync: true
5773
})
58-
addTransaction(transaction: (tx: SQLiteTransaction) => void): void { }
74+
addTransaction(transaction: (tx: SQLiteTransaction) => void): void {}
5975

6076
/**
6177
* @param fn {any}
@@ -65,51 +81,62 @@ export class SQLiteObject {
6581
successIndex: 2,
6682
errorIndex: 1
6783
})
68-
transaction(fn: any): Promise<any> { return; }
84+
transaction(fn: any): Promise<any> {
85+
return;
86+
}
6987

7088
/**
7189
* @param fn {Function}
7290
* @returns {Promise<any>}
7391
*/
7492
@CordovaInstance()
75-
readTransaction(fn: (tx: SQLiteTransaction) => void): Promise<any> { return; }
93+
readTransaction(fn: (tx: SQLiteTransaction) => void): Promise<any> {
94+
return;
95+
}
7696

7797
@CordovaInstance({
7898
sync: true
7999
})
80-
startNextTransaction(): void { }
100+
startNextTransaction(): void {}
81101

82102
/**
83103
* @returns {Promise<any>}
84104
*/
85105
@CordovaInstance()
86-
open(): Promise<any> { return; }
106+
open(): Promise<any> {
107+
return;
108+
}
87109

88110
/**
89111
* @returns {Promise<any>}
90112
*/
91113
@CordovaInstance()
92-
close(): Promise<any> { return; }
114+
close(): Promise<any> {
115+
return;
116+
}
93117

94118
/**
95119
* Execute SQL on the opened database. Note, you must call `create` first, and
96120
* ensure it resolved and successfully opened the database.
97121
*/
98122
@CordovaInstance()
99-
executeSql(statement: string, params: any): Promise<any> { return; }
123+
executeSql(statement: string, params: any): Promise<any> {
124+
return;
125+
}
100126

101127
/**
102128
* @param sqlStatements {Array<string | string[] | any>}
103129
* @returns {Promise<any>}
104130
*/
105131
@CordovaInstance()
106-
sqlBatch(sqlStatements: Array<string | string[] | any>): Promise<any> { return; }
132+
sqlBatch(sqlStatements: Array<string | string[] | any>): Promise<any> {
133+
return;
134+
}
107135

108136
@CordovaInstance({
109137
sync: true
110138
})
111-
abortallPendingTransactions(): void { }
112-
139+
abortallPendingTransactions(): void {}
113140
}
114141

115142
/**
@@ -159,7 +186,6 @@ export class SQLiteObject {
159186
})
160187
@Injectable()
161188
export class SQLite extends IonicNativePlugin {
162-
163189
/**
164190
* Open or create a SQLite database file.
165191
*
@@ -171,7 +197,11 @@ export class SQLite extends IonicNativePlugin {
171197
@CordovaCheck()
172198
create(config: SQLiteDatabaseConfig): Promise<SQLiteObject> {
173199
return new Promise((resolve, reject) => {
174-
sqlitePlugin.openDatabase(config, (db: any) => resolve(new SQLiteObject(db)), reject);
200+
sqlitePlugin.openDatabase(
201+
config,
202+
(db: any) => resolve(new SQLiteObject(db)),
203+
reject
204+
);
175205
});
176206
}
177207

@@ -180,21 +210,26 @@ export class SQLite extends IonicNativePlugin {
180210
* @returns {Promise<any>}
181211
*/
182212
@Cordova()
183-
echoTest(): Promise<any> { return; }
184-
213+
echoTest(): Promise<any> {
214+
return;
215+
}
216+
185217
/**
186218
* Automatically verify basic database access operations including opening a database
187219
* @returns {Promise<any>}
188220
*/
189221
@Cordova()
190-
selfTest(): Promise<any> { return; }
222+
selfTest(): Promise<any> {
223+
return;
224+
}
191225

192226
/**
193227
* Deletes a database
194228
* @param config {SQLiteDatabaseConfig} database configuration
195229
* @returns {Promise<any>}
196230
*/
197231
@Cordova()
198-
deleteDatabase(config: SQLiteDatabaseConfig): Promise<any> { return; }
199-
232+
deleteDatabase(config: SQLiteDatabaseConfig): Promise<any> {
233+
return;
234+
}
200235
}

0 commit comments

Comments
 (0)