@@ -166,65 +166,56 @@ mod tests {
166166 use expression:: dsl:: sql;
167167 use prelude:: * ;
168168 use test_helpers:: connection;
169-
170- cfg_if ! {
171- if #[ cfg( feature = "mysql" ) ] {
172- type IntLiteralSql = :: types:: BigInt ;
173- type IntLiteralRust = i64 ;
174- } else {
175- type IntLiteralSql = :: types:: Integer ;
176- type IntLiteralRust = i32 ;
177- }
178- }
169+ use types:: Integer ;
179170
180171 #[ test]
181172 fn named_struct_definition ( ) {
182173 #[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
183174 struct MyStruct {
184- foo : IntLiteralRust ,
185- bar : IntLiteralRust ,
175+ foo : i32 ,
176+ bar : i32 ,
186177 }
187178
188179 impl_Queryable ! {
189180 #[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
190181 struct MyStruct {
191- foo: IntLiteralRust ,
192- bar: IntLiteralRust ,
182+ foo: i32 ,
183+ bar: i32 ,
193184 }
194185 }
195186
196187 let conn = connection ( ) ;
197- let data = :: select ( sql :: < ( IntLiteralSql , IntLiteralSql ) > ( "1, 2" ) ) . get_result ( & conn) ;
188+ let data = :: select ( sql :: < ( Integer , Integer ) > ( "1, 2" ) ) . get_result ( & conn) ;
198189 assert_eq ! ( Ok ( MyStruct { foo: 1 , bar: 2 } ) , data) ;
199190 }
200191
201192 #[ test]
202193 fn tuple_struct ( ) {
203194 #[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
204- struct MyStruct ( IntLiteralRust , IntLiteralRust ) ;
195+ struct MyStruct ( i32 , i32 ) ;
205196
206197 impl_Queryable ! {
207198 #[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
208- struct MyStruct ( #[ column_name( foo) ] IntLiteralRust , #[ column_name( bar) ] IntLiteralRust ) ;
199+ struct MyStruct ( #[ column_name( foo) ] i32 , #[ column_name( bar) ] i32 ) ;
209200 }
210201
211202 let conn = connection ( ) ;
212- let data = :: select ( sql :: < ( IntLiteralSql , IntLiteralSql ) > ( "1, 2" ) ) . get_result ( & conn) ;
203+ let data = :: select ( sql :: < ( Integer , Integer ) > ( "1, 2" ) ) . get_result ( & conn) ;
213204 assert_eq ! ( Ok ( MyStruct ( 1 , 2 ) ) , data) ;
214205 }
215206
216207 #[ test]
217208 fn tuple_struct_without_column_name_annotations ( ) {
218209 #[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
219- struct MyStruct ( IntLiteralRust , IntLiteralRust ) ;
210+ struct MyStruct ( i32 , i32 ) ;
220211
221212 impl_Queryable ! {
222213 #[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
223- struct MyStruct ( IntLiteralRust , IntLiteralRust ) ;
214+ struct MyStruct ( i32 , i32 ) ;
224215 }
225216
226217 let conn = connection ( ) ;
227- let data = :: select ( sql :: < ( IntLiteralSql , IntLiteralSql ) > ( "1, 2" ) ) . get_result ( & conn) ;
218+ let data = :: select ( sql :: < ( Integer , Integer ) > ( "1, 2" ) ) . get_result ( & conn) ;
228219 assert_eq ! ( Ok ( MyStruct ( 1 , 2 ) ) , data) ;
229220 }
230221}
0 commit comments