diff --git a/packages/loot-core/src/server/main.ts b/packages/loot-core/src/server/main.ts index d0ecf74a040..2d3320bc52a 100644 --- a/packages/loot-core/src/server/main.ts +++ b/packages/loot-core/src/server/main.ts @@ -2352,10 +2352,12 @@ export async function initApp(isDev, socketName) { }); } + // Allow running DB queries locally + global.$query = aqlQuery; + global.$q = q; + if (isDev) { global.$send = (name, args) => runHandler(app.handlers[name], args); - global.$query = aqlQuery; - global.$q = q; global.$db = db; global.$setSyncingMode = setSyncingMode; } diff --git a/upcoming-release-notes/2326.md b/upcoming-release-notes/2326.md new file mode 100644 index 00000000000..4c8ccfdbd31 --- /dev/null +++ b/upcoming-release-notes/2326.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [MatissJanis] +--- + +Allow running DB queries against the local database outside of dev-mode. Read more in [AQL docs](https://actualbudget.org/docs/api/actual-ql/)