mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-06 01:34:21 +01:00
Fix import csv failing when single quote is in string
This commit is contained in:
@@ -81,7 +81,8 @@ impl<'a> ImportFile<'a> {
|
||||
|
||||
for r in record.iter() {
|
||||
values_string.push('\'');
|
||||
values_string.push_str(r);
|
||||
// The string can have a single quote which needs to be escaped
|
||||
values_string.push_str(&r.replace("'", "''"));
|
||||
values_string.push_str("',");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user