Skip to content

Commit b124085

Browse files
martin-kolarikjbr
authored andcommitted
MySql support added
1 parent 7c9ff9b commit b124085

File tree

3 files changed

+523
-2
lines changed

3 files changed

+523
-2
lines changed

Cargo.toml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@ readme = "README.md"
88
repository = "https://github.com/jbr/async-sqlx-session"
99
documentation = "https://docs.rs/async-sqlx-session"
1010
license = "MIT OR Apache-2.0"
11-
keywords = ["sessions", "tide", "async-session", "sqlx", "sqlite"]
11+
keywords = [
12+
"sessions",
13+
"tide",
14+
"async-session",
15+
"sqlx",
16+
"sqlite",
17+
"postgres",
18+
"mysql"
19+
]
1220
categories = ["web-programming::http-server", "web-programming", "database"]
1321

1422
[package.metadata.docs.rs]
15-
features = ["pg", "sqlite", "async_std"]
23+
features = ["pg", "sqlite", "mysql", "async_std"]
1624

1725
[features]
1826
default = ["native-tls"]
@@ -21,6 +29,7 @@ pg = ["sqlx/postgres", "sqlx/json"]
2129
native-tls = ["sqlx/runtime-async-std-native-tls"]
2230
rustls = ["sqlx/runtime-async-std-rustls"]
2331
async_std = ["async-std"]
32+
mysql = ["sqlx/mysql", "sqlx/json"]
2433

2534
[dependencies]
2635
async-session = "3.0.0"
@@ -29,3 +38,7 @@ async-std = { version = "1.9.0", optional = true }
2938

3039
[dev-dependencies]
3140
async-std = { version = "1.9.0", features = ["attributes"] }
41+
42+
[dev-dependencies.sqlx]
43+
version = "0.5.5"
44+
features = ["chrono", "runtime-async-std-native-tls"]

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,8 @@ pub use sqlite::SqliteSessionStore;
4949
mod pg;
5050
#[cfg(feature = "pg")]
5151
pub use pg::PostgresSessionStore;
52+
53+
#[cfg(feature = "mysql")]
54+
mod mysql;
55+
#[cfg(feature = "mysql")]
56+
pub use mysql::MySqlSessionStore;

0 commit comments

Comments
 (0)