@@ -4,7 +4,6 @@ use crate::connection::RequestMessages;
4
4
use crate :: types:: Type ;
5
5
use postgres_protocol:: message:: frontend;
6
6
use std:: {
7
- fmt,
8
7
num:: { NonZeroI16 , NonZeroU32 } ,
9
8
sync:: { Arc , Weak } ,
10
9
} ;
@@ -66,11 +65,12 @@ impl Statement {
66
65
}
67
66
68
67
/// Information about a column of a query.
68
+ #[ derive( Debug ) ]
69
69
pub struct Column {
70
70
pub ( crate ) name : String ,
71
71
pub ( crate ) table_oid : Option < NonZeroU32 > ,
72
72
pub ( crate ) column_id : Option < NonZeroI16 > ,
73
- pub ( crate ) type_ : Type ,
73
+ pub ( crate ) r#type : Type ,
74
74
}
75
75
76
76
impl Column {
@@ -91,17 +91,6 @@ impl Column {
91
91
92
92
/// Returns the type of the column.
93
93
pub fn type_ ( & self ) -> & Type {
94
- & self . type_
95
- }
96
- }
97
-
98
- impl fmt:: Debug for Column {
99
- fn fmt ( & self , fmt : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
100
- fmt. debug_struct ( "Column" )
101
- . field ( "name" , & self . name )
102
- . field ( "table_oid" , & self . table_oid )
103
- . field ( "column_id" , & self . column_id )
104
- . field ( "type" , & self . type_ )
105
- . finish ( )
94
+ & self . r#type
106
95
}
107
96
}
0 commit comments