Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f68d83c
MySQL session store
oliverbarnes Jun 25, 2025
e4c3def
Move tests to separate directory and file
oliverbarnes Jun 26, 2025
6b0bd1c
Remove tests that don't hit the db
oliverbarnes Jun 26, 2025
af9097d
Not happy with this solution yet, but tests are working now
oliverbarnes Jun 26, 2025
2ec4dfc
Simplify database setup in tests
oliverbarnes Jun 26, 2025
3954c3a
Serial tests
oliverbarnes Jun 26, 2025
a813fcd
Avoid serial by changing tests around expired sessions
oliverbarnes Jun 26, 2025
ca8cda2
Add unhappy path
oliverbarnes Jun 30, 2025
10e9b94
Rename test file to be consistent with sqlite tests naming
oliverbarnes Jun 30, 2025
8a31dc6
Merge branch 'main' into mysql-session-store
oliverbarnes Jul 7, 2025
9146611
Ignore RUSTSEC-2023-0071 advisory while there's no upgrade path avail…
oliverbarnes Jul 7, 2025
a053997
cargo hakari generate
oliverbarnes Jul 7, 2025
7c450e8
Make mysql pool private and update tests accordingly
oliverbarnes Jul 25, 2025
281b96e
Merge branch 'main' into mysql-session-store
oliverbarnes Jul 25, 2025
644e96b
cargo hakari manage-deps
oliverbarnes Jul 25, 2025
8a19c8f
Revert "cargo hakari manage-deps"
oliverbarnes Jul 25, 2025
d4ab6da
cargo hakari generate
oliverbarnes Jul 25, 2025
02ccd36
cargo hakari manage-deps
oliverbarnes Jul 25, 2025
102eb1a
Merge branch 'main' into mysql-session-store
oliverbarnes Jul 26, 2025
e6efc98
Only update if existing record is expired
oliverbarnes Aug 5, 2025
32a7c0b
Missing quotes
oliverbarnes Aug 5, 2025
aada453
Return duplicate id error when existing record is current
oliverbarnes Aug 5, 2025
46bd55b
Revert "Return duplicate id error when existing record is current"
oliverbarnes Aug 6, 2025
754e0f0
Use affected rows count to return duplicate id error
oliverbarnes Aug 7, 2025
e25ac11
Debug
oliverbarnes Aug 7, 2025
adfec5e
Revert "Debug"
oliverbarnes Aug 9, 2025
bae8ae6
Revert "Use affected rows count to return duplicate id error"
oliverbarnes Aug 9, 2025
80b4073
Revert "Missing quotes"
oliverbarnes Aug 9, 2025
d1af77e
Revert "Only update if existing record is expired"
oliverbarnes Aug 9, 2025
92df3cc
Merge branch 'main' into mysql-session-store
oliverbarnes Aug 9, 2025
32432fc
Remove unneeded duplicate id error clause on session creation
oliverbarnes Aug 9, 2025
f8e6556
Document decision to keep simple upserts on conflicting ids
oliverbarnes Aug 12, 2025
fbe38f6
Fix conflicting id test
oliverbarnes Aug 12, 2025
0777395
Merge branch 'main' into mysql-session-store
oliverbarnes Aug 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions libs/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ ignore = [
# `paste` is unmaintained, but it's a small utility for macro-writing.
# There are no known vulnerabilities, so we'll ignore the advisory for now.
"RUSTSEC-2024-0436",
# `rsa` crate has a timing sidechannel vulnerability (Marvin Attack)
# but it's a transitive dependency through sqlx-mysql and no safe upgrade
# is available. The risk is acceptable for server-side usage where timing
# attacks are difficult to execute.
"RUSTSEC-2023-0071",
]

[licenses]
Expand Down
3 changes: 2 additions & 1 deletion libs/pavex_session_sqlx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ version.workspace = true
[features]
default = []
postgres = ["sqlx/postgres", "jiff-sqlx/postgres"]
mysql = ["sqlx/mysql", "sqlx/runtime-tokio-rustls"]
sqlite = ["sqlx/sqlite", "sqlx/runtime-tokio-rustls"]

[package.metadata.docs.rs]
Expand All @@ -34,6 +35,6 @@ px_workspace_hack = { version = "0.1", path = "../px_workspace_hack" }
[dev-dependencies]
pavex_session_sqlx = { path = ".", features = ["postgres", "sqlite"] }
pavex_tracing = { path = "../pavex_tracing" }
tokio = { workspace = true, features = ["rt-multi-thread", "time"] }
tokio = { workspace = true, features = ["rt-multi-thread", "time", "macros"] }
tempfile = { workspace = true }
uuid = { workspace = true, features = ["v4"] }
10 changes: 10 additions & 0 deletions libs/pavex_session_sqlx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//! There is a dedicated feature flag for each supported database backend:
//!
//! - `postgres`: Support for PostgreSQL.
//! - `mysql`: Support for MySQL.
//! - `sqlite`: Support for SQLite.

#[cfg(feature = "postgres")]
Expand All @@ -17,6 +18,15 @@ pub mod postgres;
#[doc(inline)]
pub use postgres::PostgresSessionStore;

#[cfg(feature = "mysql")]
#[cfg_attr(docsrs, doc(cfg(feature = "mysql")))]
pub mod mysql;

#[cfg(feature = "mysql")]
#[cfg_attr(docsrs, doc(cfg(feature = "mysql")))]
#[doc(inline)]
pub use mysql::MySqlSessionStore;

#[cfg(feature = "sqlite")]
#[cfg_attr(docsrs, doc(cfg(feature = "sqlite")))]
pub mod sqlite;
Expand Down
Loading
Loading