mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
used sqlite with prebuilds again
This commit is contained in:
parent
ed3666ca05
commit
0252091158
@ -5,7 +5,7 @@
|
||||
"author": "Jan Prochazka <jenasoft.database@gmail.com>",
|
||||
"description": "Opensource database administration tool",
|
||||
"dependencies": {
|
||||
"better-sqlite3": "^7.4.5",
|
||||
"better-sqlite3-with-prebuilds": "^7.4.3",
|
||||
"electron-log": "^4.4.1",
|
||||
"electron-store": "^8.0.1",
|
||||
"electron-updater": "^4.6.1",
|
||||
|
@ -5,7 +5,7 @@ let fillContent = '';
|
||||
if (process.platform == 'win32') {
|
||||
fillContent += `content.msnodesqlv8 = () => require('msnodesqlv8');`;
|
||||
}
|
||||
fillContent += `content['better-sqlite3'] = () => require('better-sqlite3');`;
|
||||
fillContent += `content['better-sqlite3-with-prebuilds'] = () => require('better-sqlite3-with-prebuilds');`;
|
||||
|
||||
const getContent = (empty) => `
|
||||
// this file is generated automatically by script fillNativeModules.js, do not edit it manually
|
||||
|
@ -19,7 +19,7 @@
|
||||
"dependencies": {
|
||||
"async-lock": "^1.2.4",
|
||||
"axios": "^0.21.1",
|
||||
"better-sqlite3": "^7.4.5",
|
||||
"better-sqlite3-with-prebuilds": "^7.4.3",
|
||||
"body-parser": "^1.19.0",
|
||||
"bufferutil": "^4.0.1",
|
||||
"byline": "^5.0.0",
|
||||
|
@ -175,8 +175,8 @@ const driver = {
|
||||
};
|
||||
|
||||
driver.initialize = (dbgateEnv) => {
|
||||
if (dbgateEnv.nativeModules && dbgateEnv.nativeModules['better-sqlite3']) {
|
||||
Database = dbgateEnv.nativeModules['better-sqlite3']();
|
||||
if (dbgateEnv.nativeModules && dbgateEnv.nativeModules['better-sqlite3-with-prebuilds']) {
|
||||
Database = dbgateEnv.nativeModules['better-sqlite3-with-prebuilds']();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user