mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
separate DB connection for each transaction (just for the record, will be reverted probably)
This commit is contained in:
@@ -10,9 +10,11 @@ let allSourceIds = [];
|
||||
|
||||
sql.dbReady.then(async () => {
|
||||
try {
|
||||
sql.insert("source_ids", {
|
||||
source_id: currentSourceId,
|
||||
date_created: utils.nowTimestamp()
|
||||
await sql.doInTransaction(async db => {
|
||||
await sql.insert(db, "source_ids", {
|
||||
source_id: currentSourceId,
|
||||
date_created: utils.nowTimestamp()
|
||||
});
|
||||
});
|
||||
|
||||
allSourceIds = await sql.getFlattenedResults("source_id", "SELECT source_id FROM source_ids");
|
||||
|
||||
Reference in New Issue
Block a user