mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-04-05 01:43:48 +00:00
Add Database::RawBuffer to parameterize Encode
This commit is contained in:
@@ -28,6 +28,8 @@ where
|
||||
|
||||
/// The Rust type of table identifiers for this database.
|
||||
type TableId: Display + Clone;
|
||||
|
||||
type RawBuffer;
|
||||
}
|
||||
|
||||
pub trait HasRawValue<'c> {
|
||||
|
||||
@@ -11,6 +11,8 @@ impl Database for MySql {
|
||||
type TypeInfo = super::MySqlTypeInfo;
|
||||
|
||||
type TableId = Box<str>;
|
||||
|
||||
type RawBuffer = Vec<u8>;
|
||||
}
|
||||
|
||||
impl<'c> HasRow<'c> for MySql {
|
||||
|
||||
@@ -12,6 +12,8 @@ impl Database for Postgres {
|
||||
type TypeInfo = super::PgTypeInfo;
|
||||
|
||||
type TableId = u32;
|
||||
|
||||
type RawBuffer = Vec<u8>;
|
||||
}
|
||||
|
||||
impl<'a> HasRow<'a> for Postgres {
|
||||
|
||||
Reference in New Issue
Block a user