We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2512a7 commit 6537e33Copy full SHA for 6537e33
1 file changed
src-crates/chdb/src/lib.rs
@@ -70,10 +70,13 @@ impl Connection {
70
conn: Mutex::new(conn),
71
dylib,
72
};
73
- // TODO: Migrate the database field to the dynamic library in the future.
74
- let db = database.trim();
75
- if !db.is_empty() {
76
- conn.execute(&format!("USE {}", db))?;
+ {
+ // TODO: Migrate the database field to the dynamic library in the future.
+ let db = database.trim();
+ if !db.is_empty() {
77
+ let escaped = db.replace('"', "\"\"");
78
+ conn.execute(&format!("USE \"{}\"", escaped))?;
79
+ }
80
}
81
Ok(conn)
82
0 commit comments