mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-04-05 09:53:45 +00:00
refactor(core): remove the HRTB (higher rank trait bound) on Row in the aim of improving ergonomics
* removes the lifetime from Row * removes MySqlQueryAs, SqliteQueryAs, etc. (no longer needed) * introduce query_scalar * introduce Decode::accepts to allow overriding runtime type checking per-type (replaces TypeInfo::compatible) * introduce Encode::produces to allow overriding the encoded type per-value * adds a lifetime to Arguments (and introduce the HRTB HasArguments) to support zero-copy encoding with SQLite * renames Database::RawBuffer to HasArguments::ArgumentBuffer * introduce Connect::connect_with to provide an ConnectOptions type explicitly to opt-out of connection string parsing * introduce Value and ValueRef traits to allow decoding-deferred extraction of values from Rows * introduce Encode::encode_by_ref and change Encode::encode to take by-value to try and re-use memory where possible * use thiserror to generate sqlx::Error * [!] temporarily removes query logging * [!] temporarily removes transactions
This commit is contained in:
@@ -28,7 +28,7 @@ pub use native_tls;
|
||||
))]
|
||||
pub use tokio::{
|
||||
self, fs, io::AsyncRead, io::AsyncReadExt, io::AsyncWrite, io::AsyncWriteExt, net::TcpStream,
|
||||
task::yield_now,
|
||||
task::yield_now, time::delay_for as sleep, time::timeout,
|
||||
};
|
||||
|
||||
#[cfg(all(
|
||||
@@ -89,8 +89,9 @@ macro_rules! blocking {
|
||||
not(any(feature = "runtime-actix", feature = "runtime-tokio",))
|
||||
))]
|
||||
pub use async_std::{
|
||||
self, fs, io::prelude::ReadExt as AsyncReadExt, io::prelude::WriteExt as AsyncWriteExt,
|
||||
io::Read as AsyncRead, io::Write as AsyncWrite, net::TcpStream, task::spawn, task::yield_now,
|
||||
self, fs, future::timeout, io::prelude::ReadExt as AsyncReadExt,
|
||||
io::prelude::WriteExt as AsyncWriteExt, io::Read as AsyncRead, io::Write as AsyncWrite,
|
||||
net::TcpStream, task::sleep, task::spawn, task::yield_now,
|
||||
};
|
||||
|
||||
#[cfg(all(
|
||||
|
||||
Reference in New Issue
Block a user