Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd16a9cd

Browse files
authored
Merge pull request#1051 from andrewbaxter/patch-1
Add to_sql for bytes Cow as well
2 parents4f41157 +34c8dc9 commitd16a9cd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎postgres-types/src/lib.rs‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,18 @@ impl<T: ToSql> ToSql for Box<[T]> {
10351035
to_sql_checked!();
10361036
}
10371037

1038+
impl<'a>ToSqlforCow<'a,[u8]>{
1039+
fnto_sql(&self,ty:&Type,w:&mutBytesMut) ->Result<IsNull,Box<dynError +Sync +Send>>{
1040+
<&[u8]asToSql>::to_sql(&self.as_ref(), ty, w)
1041+
}
1042+
1043+
fnaccepts(ty:&Type) ->bool{
1044+
<&[u8]asToSql>::accepts(ty)
1045+
}
1046+
1047+
to_sql_checked!();
1048+
}
1049+
10381050
implToSqlforVec<u8>{
10391051
fnto_sql(&self,ty:&Type,w:&mutBytesMut) ->Result<IsNull,Box<dynError +Sync +Send>>{
10401052
<&[u8]asToSql>::to_sql(&&**self, ty, w)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp