Skip to content

Commit 9bcb0c7

Browse files
authored
Merge pull request #32 from pmorris-dev/sqlite-observer-phase-1
feat: add initial types/logic to observe SQLite
2 parents 22048e6 + bcd26b5 commit 9bcb0c7

11 files changed

Lines changed: 1381 additions & 3 deletions

File tree

Cargo.lock

Lines changed: 104 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
resolver = "3"
33
members = [
44
"crates/sqlx-sqlite-conn-mgr",
5+
"crates/sqlx-sqlite-observer",
56
]
67

78
[package]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[package]
2+
name = "sqlx-sqlite-observer"
3+
# Sync major.minor with major.minor of SQLx crate
4+
version = "0.8.6"
5+
license = "MIT"
6+
edition = "2024"
7+
rust-version = "1.89"
8+
authors = ["Jeremy Thomerson"]
9+
description = "Reactive change notifications for SQLite databases using sqlx"
10+
repository = "https://github.com/silvermine/tauri-plugin-sqlite"
11+
readme = "README.md"
12+
keywords = ["sqlite", "sqlx", "reactive", "observer", "database"]
13+
categories = ["database", "asynchronous"]
14+
15+
[features]
16+
# Bundle SQLite by default - preupdate hooks require SQLITE_ENABLE_PREUPDATE_HOOK
17+
# which most system SQLite libraries don't have enabled.
18+
default = ["bundled"]
19+
bundled = ["libsqlite3-sys/bundled"]
20+
21+
[dependencies]
22+
tokio = { version = "1.49.0", features = ["sync"] }
23+
thiserror = "2.0.17"
24+
tracing = { version = "0.1.44", default-features = false, features = ["std", "release_max_level_off"] }
25+
parking_lot = "0.12.3"
26+
regex = "1.12.3"
27+
sqlx = { version = "0.8.6", features = ["sqlite", "runtime-tokio"], default-features = false }
28+
# Required for preupdate_hook - SQLite must be compiled with SQLITE_ENABLE_PREUPDATE_HOOK
29+
libsqlite3-sys = { version = "0.30.1", features = ["preupdate_hook"] }
30+
31+
[dev-dependencies]
32+
tokio = { version = "1.49.0", features = ["full", "macros"] }
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Jeremy Thomerson
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)