migrate to "export default"
also, set no-use-before-define in linter
This commit is contained in:
+11
-10
@@ -12,16 +12,6 @@ const shell = shellModule('database');
|
||||
|
||||
const _clear = clear;
|
||||
|
||||
export {
|
||||
initialize,
|
||||
uninitialize,
|
||||
query,
|
||||
transaction,
|
||||
runInTransaction,
|
||||
importFromFile,
|
||||
exportToFile,
|
||||
_clear,
|
||||
};
|
||||
|
||||
let gConnectionPool = null;
|
||||
|
||||
@@ -170,3 +160,14 @@ async function exportToFile(file) {
|
||||
const [error] = await safe(shell.bash(cmd, {}));
|
||||
if (error) throw new BoxError(BoxError.DATABASE_ERROR, error);
|
||||
}
|
||||
|
||||
export default {
|
||||
initialize,
|
||||
uninitialize,
|
||||
query,
|
||||
transaction,
|
||||
runInTransaction,
|
||||
importFromFile,
|
||||
exportToFile,
|
||||
_clear,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user