From 553f03fa0551539efaab55a6b13b781af6ed5615 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Wed, 11 Mar 2020 09:21:06 -0700 Subject: [PATCH] Add Database::RawBuffer to parameterize Encode --- sqlx-core/src/database.rs | 2 ++ sqlx-core/src/mysql/database.rs | 2 ++ sqlx-core/src/postgres/database.rs | 2 ++ 3 files changed, 6 insertions(+) diff --git a/sqlx-core/src/database.rs b/sqlx-core/src/database.rs index 79c67445..70dea800 100644 --- a/sqlx-core/src/database.rs +++ b/sqlx-core/src/database.rs @@ -28,6 +28,8 @@ where /// The Rust type of table identifiers for this database. type TableId: Display + Clone; + + type RawBuffer; } pub trait HasRawValue<'c> { diff --git a/sqlx-core/src/mysql/database.rs b/sqlx-core/src/mysql/database.rs index 62a22898..e2233bbf 100644 --- a/sqlx-core/src/mysql/database.rs +++ b/sqlx-core/src/mysql/database.rs @@ -11,6 +11,8 @@ impl Database for MySql { type TypeInfo = super::MySqlTypeInfo; type TableId = Box; + + type RawBuffer = Vec; } impl<'c> HasRow<'c> for MySql { diff --git a/sqlx-core/src/postgres/database.rs b/sqlx-core/src/postgres/database.rs index 5792f464..399b2f67 100644 --- a/sqlx-core/src/postgres/database.rs +++ b/sqlx-core/src/postgres/database.rs @@ -12,6 +12,8 @@ impl Database for Postgres { type TypeInfo = super::PgTypeInfo; type TableId = u32; + + type RawBuffer = Vec; } impl<'a> HasRow<'a> for Postgres {