mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
downgrade sqlite3 library which has issues with electron build
This commit is contained in:
@@ -83,8 +83,8 @@ const defaultOptions = [
|
||||
{ name: 'rightPaneVisible', value: 'true', isSynced: false },
|
||||
{ name: 'nativeTitleBarVisible', value: 'false', isSynced: false },
|
||||
{ name: 'eraseNotesAfterTimeInSeconds', value: '604800', isSynced: true }, // default is 7 days
|
||||
{ name: 'hideArchivedNotes_main', value: 'false', isSynced: false }, // default is 7 days
|
||||
{ name: 'hideIncludedImages_main', value: 'true', isSynced: false } // default is 7 days
|
||||
{ name: 'hideArchivedNotes_main', value: 'false', isSynced: false },
|
||||
{ name: 'hideIncludedImages_main', value: 'true', isSynced: false }
|
||||
];
|
||||
|
||||
async function initStartupOptions() {
|
||||
|
||||
@@ -163,6 +163,10 @@ async function executeScript(query) {
|
||||
}
|
||||
|
||||
async function wrap(func, query) {
|
||||
if (!dbConnection) {
|
||||
throw new Error("DB connection not initialized yet");
|
||||
}
|
||||
|
||||
const thisError = new Error();
|
||||
|
||||
try {
|
||||
|
||||
@@ -13,16 +13,11 @@ const port = require('./port');
|
||||
const Option = require('../entities/option');
|
||||
const TaskContext = require('./task_context.js');
|
||||
|
||||
async function createConnection() {
|
||||
return await sqlite.open({
|
||||
const dbConnection = new Promise(async (resolve, reject) => {
|
||||
const db = await sqlite.open({
|
||||
filename: dataDir.DOCUMENT_PATH,
|
||||
driver: sqlite3.Database
|
||||
});
|
||||
}
|
||||
|
||||
const dbConnection = new Promise(async (resolve, reject) => {
|
||||
// no need to create new connection now since DB stays the same all the time
|
||||
const db = await createConnection();
|
||||
|
||||
db.run('PRAGMA journal_mode = WAL;');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user