https://github.com/patte/tower-sessions-rusqlite-store
(tokio-)rusqlite SessionStore implementation for tower-sessions
https://github.com/patte/tower-sessions-rusqlite-store
async axum crate rusqlite rust session-store
Last synced: about 1 month ago
JSON representation
(tokio-)rusqlite SessionStore implementation for tower-sessions
- Host: GitHub
- URL: https://github.com/patte/tower-sessions-rusqlite-store
- Owner: patte
- License: mit
- Created: 2024-02-15T17:57:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-23T05:19:48.000Z (4 months ago)
- Last Synced: 2025-04-04T11:51:28.694Z (about 2 months ago)
- Topics: async, axum, crate, rusqlite, rust, session-store
- Language: Rust
- Homepage: https://crates.io/crates/tower-sessions-rusqlite-store
- Size: 37.1 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
tower-sessions-rusqlite-store
(tokio-)rusqlite session store fortower-sessions
.[](https://github.com/patte/tower-sessions-rusqlite-store/actions/workflows/rust.yml) [](https://crates.io/crates/tower-sessions-rusqlite-store) [](https://codecov.io/gh/patte/tower-sessions-rusqlite-store)
## Overview
This is a `SessionStore` for the [`tower-sessions`](https://github.com/maxcountryman/tower-sessions) middleware which uses [tokio-rusqlite](https://github.com/programatik29/tokio-rusqlite) for handling SQLite databases.It is directly based on the [`sqlx-store`](https://github.com/maxcountryman/tower-sessions-stores/tree/main/sqlx-store) and uses the same folder structure as [tower-session-stores](https://github.com/maxcountryman/tower-sessions-stores) for easy maintenance.
All contributions are welcome!
## ๐คธ Usage
Check out the [counter example](./rusqlite-store/examples/counter.rs). Run it with `cargo run --example counter`.## ๐งช Tests
This crate is covered by integration- and unit-tests.
The integration tests are copied from [tower-session-stores](https://github.com/maxcountryman/tower-sessions-stores) and kept in the `tests` create. They can be run with `cargo nextest run rusqlite_store_tests --test test_integration`.The unit tests are copied from [maxcountryman/tower-sessions/memory-store](https://github.com/maxcountryman/tower-sessions/blob/6ad8933b4f5e71f3202f0c1a28f194f3db5234c8/memory-store/src/lib.rs#L62) and located directly in `src/lib.rs`. They can be run with `cargo nextest run rusqlite_store_tests -p tower-sessions-rusqlite-store`.
Run all tests with: `cargo nextest run rusqlite_store_tests`.
## ๐ฆบ Disclaimer
This is an unofficial fork of the original `tower-sessions-stores`.## ๐ Credits
Most credits go to the original authors of `tower-sessions-stores` and `tower-sessions`.