mosaic icon indicating copy to clipboard operation
mosaic copied to clipboard

Creating a table should automatically escape the name with quotes

Open willium opened this issue 9 months ago • 0 comments

It'd be great if a table name was escape with quotes automatically during creation. https://github.com/uwdata/mosaic/blob/5fe204e9ab0706ff2d39f64911dd91d758da31a9/packages/sql/src/load/create.js#L11

I was going to send a PR for this by exporting quoteTableName from ref.js: https://github.com/uwdata/mosaic/blob/5fe204e9ab0706ff2d39f64911dd91d758da31a9/packages/sql/src/ref.js#L38-L46

but I noticed we actually handle 'quoting' in several different places in mosaic-sql, so I'm not sure what the preferred way of addressing this (globally?) would be:

  • aggregates.js has unquoted
  • Query.js has unquote and isDoubleQuoted
  • ref.js has quoteTableName

willium avatar May 04 '24 19:05 willium