-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_conversion.rs
More file actions
46 lines (39 loc) · 1.43 KB
/
debug_conversion.rs
File metadata and controls
46 lines (39 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Debug conversion function for testing
fn debug_convert_line(line: &str) {
println!("Input: {:?}", line);
// Test individual conversion steps
let patterns = CompiledPatterns::get();
let mut converted = line.to_string();
// Step 1: handle_auto_increment
let after_auto_inc = handle_auto_increment(&converted);
if after_auto_inc != converted {
println!("After auto_increment: {:?}", after_auto_inc);
converted = after_auto_inc;
}
// Step 2: convert_data_types
let after_types = convert_data_types(&converted);
if after_types != converted {
println!("After data_types: {:?}", after_types);
converted = after_types;
}
// Step 3: convert_quotes
let after_quotes = convert_quotes(&converted);
if after_quotes != converted {
println!("After quotes: {:?}", after_quotes);
converted = after_quotes;
}
// Step 4: handle_indexes_and_keys
let after_indexes = handle_indexes_and_keys(&converted);
if after_indexes != converted {
println!("After indexes: {:?}", after_indexes);
converted = after_indexes;
}
// Step 5: handle_create_table
let after_create = handle_create_table(&converted);
if after_create != converted {
println!("After create_table: {:?}", after_create);
converted = after_create;
}
println!("Final: {:?}", converted);
println!("---");
}