mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-13 20:53:30 +01:00
[PR #190] [MERGED] Database access refactor #115
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mountain-loop/yaak/pull/190
Author: @gschier
Created: 3/23/2025
Status: ✅ Merged
Merged: 3/25/2025
Merged by: @gschier
Base:
master← Head:db-refactor📝 Commits (10+)
6fc710dCheckpoint38d34a3A bit better5f0200aIt's working!9375435Checkpointcd32a09Generic upsert and deletionfb0165dMacro to generate AnyModel enum5b613f5Remove some plugin logs4084e5fRename queries_2 mod65df7f5Tokio-friendly QueryManager07cfc20Move over workspace queries and other things📊 Changes
72 files changed (+4891 additions, -4698 deletions)
View changed files
📝
package-lock.json(+124 -108)📝
package.json(+4 -4)📝
packages/plugin-runtime-types/package.json(+1 -3)📝
packages/plugin-runtime/src/PluginHandle.ts(+0 -1)📝
src-tauri/Cargo.lock(+183 -277)📝
src-tauri/Cargo.toml(+3 -3)📝
src-tauri/gen/schemas/acl-manifests.json(+1 -1)📝
src-tauri/gen/schemas/desktop-schema.json(+88 -3)📝
src-tauri/gen/schemas/macOS-schema.json(+88 -3)📝
src-tauri/src/error.rs(+10 -7)📝
src-tauri/src/history.rs(+20 -28)📝
src-tauri/src/http_request.rs(+43 -19)📝
src-tauri/src/lib.rs(+558 -543)📝
src-tauri/src/notifications.rs(+21 -5)📝
src-tauri/src/plugin_events.rs(+74 -30)📝
src-tauri/src/updates.rs(+32 -26)📝
src-tauri/yaak-git/Cargo.toml(+2 -2)📝
src-tauri/yaak-git/permissions/schemas/schema.json(+2 -2)📝
src-tauri/yaak-license/permissions/schemas/schema.json(+2 -2)📝
src-tauri/yaak-license/src/commands.rs(+4 -4)...and 52 more files
📄 Description
This PR introduces a new DB access pattern to query data by
app_handle.queries().connect()?.get_workspace()but also has the ability to do transactions and includes easy ways to write common queries.queries()connect()andwith_tx()helpersmodel_upsertedandmodel_deletedeventsMutexfor DB connection🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.