mirror of
https://github.com/nushell/nushell
synced 2024-11-16 01:37:57 +00:00
Fix SQLite table creation sql (#8430)
# Description The "CREATE TABLE" statement in `into sqlite` does not add quotes to the column names, reproduction steps are below: ``` /home/xxx〉[[name,y/n];[a,y]] | into sqlite test.db Error: × Failed to prepare SQLite statement ╭─[entry #1:1:1] 1 │ [[name,y/n];[a,y]] | into sqlite test.db · ───┬─── · ╰── near "/": syntax error in CREATE TABLE IF NOT EXISTS main (name TEXT,y/n TEXT) at offset 44 ╰──── ``` # User-Facing Changes None --------- Co-authored-by: Reilly Wood <reilly.wood@icloud.com>
This commit is contained in:
parent
79d0735864
commit
86faf753bd
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ fn action(
|
|||
|
||||
let table_columns_creation = columns
|
||||
.iter()
|
||||
.map(|(name, sql_type)| format!("{name} {sql_type}"))
|
||||
.map(|(name, sql_type)| format!("\"{name}\" {sql_type}"))
|
||||
.join(",");
|
||||
|
||||
// get the values
|
||||
|
|
Loading…
Reference in a new issue