@@ -63,7 +63,7 @@ SQLx is an async, pure Rust<sub>†</sub> SQL crate featuring compile-time check
63
63
64
64
- ** Compile-time checked queries** (if you want). See [ SQLx is not an ORM] ( #sqlx-is-not-an-orm ) .
65
65
66
- - ** Database Agnostic** . Support for [ PostgreSQL] , [ MySQL] , [ SQLite] .
66
+ - ** Database Agnostic** . Support for [ PostgreSQL] , [ MySQL] , [ MariaDB ] , [ SQLite] .
67
67
- [ MSSQL] was supported prior to version 0.7, but has been removed pending a full rewrite of the driver as part of our [ SQLx Pro initiative] .
68
68
69
69
- ** Pure Rust** . The Postgres and MySQL/MariaDB drivers are written in pure Rust using ** zero** unsafe<sub >††</sub > code.
@@ -83,6 +83,7 @@ The SQLite driver directly invokes the SQLite3 API via `libsqlite3-sys`, which r
83
83
[ postgresql ] : http://postgresql.org/
84
84
[ sqlite ] : https://sqlite.org/
85
85
[ mysql ] : https://www.mysql.com/
86
+ [ mariadb ] : https://www.mariadb.org/
86
87
[ mssql ] : https://www.microsoft.com/en-us/sql-server
87
88
[ SQLx Pro initiative ] : https://github.com/launchbadge/sqlx/discussions/1616
88
89
@@ -100,7 +101,7 @@ The SQLite driver directly invokes the SQLite3 API via `libsqlite3-sys`, which r
100
101
- Simple (unprepared) query execution including fetching results into the same ` Row ` types used by
101
102
the high-level API. Supports batch execution and returns results from all statements.
102
103
103
- - Transport Layer Security (TLS) where supported ([ MySQL] and [ PostgreSQL] ).
104
+ - Transport Layer Security (TLS) where supported ([ MySQL] , [ MariaDB ] and [ PostgreSQL] ).
104
105
105
106
- Asynchronous notifications using ` LISTEN ` and ` NOTIFY ` for [ PostgreSQL] .
106
107
@@ -232,14 +233,14 @@ use sqlx::postgres::PgPoolOptions;
232
233
// or #[actix_web::main]
233
234
async fn main () -> Result <(), sqlx :: Error > {
234
235
// Create a connection pool
235
- // for MySQL, use MySqlPoolOptions::new()
236
+ // for MySQL/MariaDB , use MySqlPoolOptions::new()
236
237
// for SQLite, use SqlitePoolOptions::new()
237
238
// etc.
238
239
let pool = PgPoolOptions :: new ()
239
240
. max_connections (5 )
240
241
. connect (" postgres://postgres:password@localhost/test" ). await ? ;
241
242
242
- // Make a simple query to return the given parameter (use a question mark `?` instead of `$1` for MySQL)
243
+ // Make a simple query to return the given parameter (use a question mark `?` instead of `$1` for MySQL/MariaDB )
243
244
let row : (i64 ,) = sqlx :: query_as (" SELECT $1" )
244
245
. bind (150_i64 )
245
246
. fetch_one (& pool ). await ? ;
0 commit comments