@@ -11,6 +11,7 @@ use std::io::{MemWriter, BufReader};
11
11
use std:: io:: util:: LimitReader ;
12
12
use std:: str;
13
13
use std:: vec;
14
+ use std:: vec_ng:: Vec ;
14
15
use time:: Timespec ;
15
16
16
17
use self :: array:: { Array , ArrayBase , DimensionInfo } ;
@@ -543,6 +544,12 @@ impl RawToSql for ~[u8] {
543
544
}
544
545
}
545
546
547
+ impl RawToSql for Vec < u8 > {
548
+ fn raw_to_sql < W : Writer > ( & self , w : & mut W ) {
549
+ or_fail ! ( w. write( self . as_slice( ) ) )
550
+ }
551
+ }
552
+
546
553
impl RawToSql for ~str {
547
554
fn raw_to_sql < W : Writer > ( & self , w : & mut W ) {
548
555
or_fail ! ( w. write( self . as_bytes( ) ) )
@@ -677,6 +684,7 @@ macro_rules! to_raw_to_impl(
677
684
678
685
to_raw_to_impl ! ( PgBool , bool )
679
686
to_raw_to_impl ! ( PgByteA , ~[ u8 ] )
687
+ to_raw_to_impl ! ( PgByteA , Vec <u8 >)
680
688
to_raw_to_impl ! ( PgVarchar | PgText | PgCharN , ~str )
681
689
to_raw_to_impl ! ( PgJson , Json )
682
690
to_raw_to_impl ! ( PgChar , i8 )
@@ -749,6 +757,7 @@ macro_rules! to_array_impl(
749
757
750
758
to_array_impl ! ( PgBoolArray , bool )
751
759
to_array_impl ! ( PgByteAArray , ~[ u8 ] )
760
+ to_array_impl ! ( PgByteAArray , Vec <u8 >)
752
761
to_array_impl ! ( PgCharArray , i8 )
753
762
to_array_impl ! ( PgInt2Array , i16 )
754
763
to_array_impl ! ( PgInt4Array , i32 )
0 commit comments