Skip to content

Commit

Permalink
Merge pull request #18 from scratchmex/patch-1
Browse files Browse the repository at this point in the history
enh: escape table name
  • Loading branch information
caiiiycuk authored Nov 17, 2023
2 parents 0448c9d + 83ed9e4 commit 2f22ba9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ object CreateTable extends Command with Log {
schema.addColumn(table, column)
}

(table, s"CREATE TABLE $table (${columns.map(column => s"[${column.name}]").mkString(", ")});")
(table, s"CREATE TABLE [$table] (${columns.map(column => s"[${column.name}]").mkString(", ")});")
} catch {
case t: Throwable =>
throw CommandException(s"CREATE TABLE - Unable to find TABLE NAME or COLUMNS in '$rawSql'",
Expand Down

0 comments on commit 2f22ba9

Please sign in to comment.