The Convert Double Quotes plugin for TablePlus does a very simple thing – it converts all instances of a double quote in your SQL query to a single quote.

So, this query:
SELECT *
FROM table_name
WHERE table_name.some_key = "test";Code language: SQL (Structured Query Language) (sql)
will be converted to this:
SELECT *
FROM table_name
WHERE table_name.some_key = 'test';Code language: SQL (Structured Query Language) (sql)
Please beware, the plugin does NOT check where exactly those double quotes are used, so if you have them inside your values you are querying for – they will also be replaced. And that potentially can break your SQL query.
For example, a valid SQL query like this:
SELECT *
FROM table_name
WHERE table_name.some_value = 'te"s"t';Code language: SQL (Structured Query Language) (sql)
will become broken after applying the plugin conversion:
SELECT *
FROM table_name
WHERE table_name.some_key = 'te's't';Code language: SQL (Structured Query Language) (sql)
How to install the Convert Double Quotes plugin
Unfortunately, the plugin author does not provide a ready-made plugin file that you can download and install by simply running it, so you will need to first build it.
- Open the repository and clone it locally (or download the whole zip)
- Inside the repo directory locally run the
npm cicommand - After that, run the
npm run buildcommand, - This will generate a file needed for the plugin to work
- Now your
ConvertDoubleQuotes.tablepluspluginplugin (which in UI of your operating system will be marked with a TablePlus logo as being recognized as a plugin) is ready to be installed – double-click the plugin. - TablePlus will ask you to allow the plugin installation.
How to use the plugin
- Open/write/generate the SQL query and put it into the SQL Editor (
CMD+E). - Go to the TablePlus top-level Plugins menu, and click the “Convert Double Quotes” menu item
- Or press the
Control + Dshortcut while inside the SQL Editor. - The query will be instantly updated inside the SQL Editor.
Leave a Reply