File tree Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Original file line number Diff line number Diff line change @@ -68,35 +68,13 @@ async fn check_tiny_int() {
68
68
type_check :: < _ , sql_types:: TinyInt > ( conn, i8:: MIN ) . await ;
69
69
type_check :: < _ , sql_types:: TinyInt > ( conn, i8:: MAX ) . await ;
70
70
71
- #[ derive( QueryableByName , Debug ) ]
72
- #[ diesel( table_name = test_small) ]
73
- struct Test {
74
- id : i8 ,
75
- }
76
-
77
- table ! ( test_small( id) {
78
- id -> TinyInt ,
79
- } ) ;
80
-
81
71
// test case for https://github.com/weiznich/diesel_async/issues/91
82
- diesel:: sql_query ( "drop table if exists test_small" )
83
- . execute ( conn)
84
- . await
85
- . unwrap ( ) ;
86
- diesel:: sql_query ( "create table test_small(id smallint primary key)" )
87
- . execute ( conn)
88
- . await
89
- . unwrap ( ) ;
90
- diesel:: sql_query ( "insert into test_small(id) values(-1)" )
91
- . execute ( conn)
92
- . await
93
- . unwrap ( ) ;
94
- let got = diesel:: sql_query ( "select id from test_small where id = ?" )
72
+ let res = diesel:: dsl:: sql :: < diesel:: sql_types:: Bool > ( "SELECT -1 = " )
95
73
. bind :: < sql_types:: TinyInt , _ > ( -1 )
96
- . load :: < Test > ( conn)
74
+ . get_result :: < bool > ( conn)
97
75
. await
98
76
. unwrap ( ) ;
99
- assert_eq ! ( got [ 0 ] . id , - 1 ) ;
77
+ assert ! ( res ) ;
100
78
}
101
79
102
80
#[ cfg( feature = "mysql" ) ]
You can’t perform that action at this time.
0 commit comments