Add Database::RawBuffer to parameterize Encode

This commit is contained in:
Ryan Leckey
2020-03-11 09:21:06 -07:00
parent cca096355f
commit 553f03fa05
3 changed files with 6 additions and 0 deletions

View File

@@ -28,6 +28,8 @@ where
/// The Rust type of table identifiers for this database.
type TableId: Display + Clone;
type RawBuffer;
}
pub trait HasRawValue<'c> {

View File

@@ -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 {

View File

@@ -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 {