@@ -17,7 +17,6 @@ async fn verify_raw_query_basic_functionality() {
17
17
let client = prepare_database ! ( ) ;
18
18
19
19
// The key test: verify that ? characters don't cause binding errors
20
- // Use fetch_bytes to avoid the RowBinary format issue
21
20
let result = client
22
21
. query_raw ( "SELECT 1 WHERE 'test?' = 'test?'" )
23
22
. fetch_bytes ( "TSV" )
@@ -50,21 +49,19 @@ async fn verify_raw_query_basic_functionality() {
50
49
async fn fetch_with_single_field_struct ( ) {
51
50
let client = prepare_database ! ( ) ;
52
51
53
- // Create a test table
54
52
client
55
53
. query ( "CREATE TABLE test_users(name String) ENGINE = Memory" )
56
54
. execute ( )
57
55
. await
58
56
. unwrap ( ) ;
59
57
60
- // Insert test data
61
58
client
62
59
. query_raw ( "INSERT INTO test_users VALUES ('Alice?'), ('Bob??'), ('Charlie???')" )
63
60
. execute ( )
64
61
. await
65
62
. unwrap ( ) ;
66
63
67
- // Test raw query with struct fetching (FORMAT is RowBinary by default)
64
+ // Test raw query with struct fetching
68
65
let sql = "SELECT name FROM test_users ORDER BY name" ;
69
66
70
67
let mut cursor = client. query_raw ( sql) . fetch :: < PersonName < ' _ > > ( ) . unwrap ( ) ;
@@ -95,7 +92,7 @@ async fn fetch_with_multi_field_struct() {
95
92
. await
96
93
. unwrap ( ) ;
97
94
98
- // Test raw query with multi-field struct (FORMAT is RowBinary by default)
95
+ // Test raw query with multi-field struct
99
96
let sql = "SELECT name, age FROM test_persons ORDER BY age" ;
100
97
101
98
let mut cursor = client. query_raw ( sql) . fetch :: < PersonInfo > ( ) . unwrap ( ) ;
@@ -119,14 +116,12 @@ async fn fetch_with_multi_field_struct() {
119
116
async fn compare_raw_vs_regular_query_with_structs ( ) {
120
117
let client = prepare_database ! ( ) ;
121
118
122
- // Create a test table
123
119
client
124
120
. query ( "CREATE TABLE test_comparison(name String) ENGINE = Memory" )
125
121
. execute ( )
126
122
. await
127
123
. unwrap ( ) ;
128
124
129
- // Insert test data
130
125
client
131
126
. query_raw ( "INSERT INTO test_comparison VALUES ('Alice?')" )
132
127
. execute ( )
@@ -144,7 +139,7 @@ async fn compare_raw_vs_regular_query_with_structs() {
144
139
assert ! ( error_msg. contains( "unbound" ) ) ;
145
140
}
146
141
147
- // Raw query with ? should succeed (FORMAT will be added automatically )
142
+ // Raw query with ? should succeed )
148
143
let raw_result = client
149
144
. query_raw ( "SELECT name FROM test_comparison WHERE name = 'Alice?'" )
150
145
. fetch :: < PersonName < ' _ > > ( )
@@ -286,6 +281,7 @@ async fn complex_sql_with_question_marks() {
286
281
#[ tokio:: test]
287
282
async fn query_raw_preserves_exact_sql ( ) {
288
283
let client = prepare_database ! ( ) ;
284
+ //check client
289
285
290
286
// Test that raw query preserves the exact SQL including whitespace and formatting
291
287
let sql = "SELECT 1 WHERE 'test?' = 'test?' " ;
0 commit comments