File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -583,24 +583,6 @@ pub struct NormalPostgresStatement<'self> {
583583 priv next_portal_id : Cell < uint >
584584}
585585
586- #[ deriving( Eq ) ]
587- pub struct ResultDescription {
588- name : ~str ,
589- ty : PostgresType
590- }
591-
592- impl ResultDescription {
593- fn from_row_description_entry ( row : RowDescriptionEntry )
594- -> ResultDescription {
595- let RowDescriptionEntry { name, type_oid, _ } = row;
596-
597- ResultDescription {
598- name : name,
599- ty : PostgresType :: from_oid ( type_oid)
600- }
601- }
602- }
603-
604586#[ unsafe_destructor]
605587impl < ' self > Drop for NormalPostgresStatement < ' self > {
606588 fn drop ( & mut self ) {
@@ -768,6 +750,24 @@ impl<'self> PostgresStatement for NormalPostgresStatement<'self> {
768750 }
769751}
770752
753+ #[ deriving( Eq ) ]
754+ pub struct ResultDescription {
755+ name : ~str ,
756+ ty : PostgresType
757+ }
758+
759+ impl ResultDescription {
760+ fn from_row_description_entry ( row : RowDescriptionEntry )
761+ -> ResultDescription {
762+ let RowDescriptionEntry { name, type_oid, _ } = row;
763+
764+ ResultDescription {
765+ name : name,
766+ ty : PostgresType :: from_oid ( type_oid)
767+ }
768+ }
769+ }
770+
771771pub struct TransactionalPostgresStatement < ' self > {
772772 priv stmt : NormalPostgresStatement < ' self >
773773}
Original file line number Diff line number Diff line change @@ -353,8 +353,8 @@ fn test_too_few_params() {
353353fn test_too_many_params( ) {
354354 let conn = PostgresConnection :: connect( "postgres://postgres@localhost" ) ;
355355 conn. try_update( "SELECT $1::INT, $2::INT" , [ & 1i32 as & ToSql ,
356- & 2i32 as & ToSql ,
357- & 3i32 as & ToSql ] ) ;
356+ & 2i32 as & ToSql ,
357+ & 3i32 as & ToSql ] ) ;
358358}
359359
360360#[ test]
You can’t perform that action at this time.
0 commit comments