Alan Guo Xiang Tan 4236689d27 FIX: Errors when running query due to PG template patterns or comments (#189)
Before this fix, the use of PG template patterns containing ":" or the
use of "?" in comments in the SQL will result in an error being raised
because `DB.param_encoder.encode` calls ActiveRecord's `sanitize_sql_array` which is
meant for SQL fragments and not an entire SQL string.

Instead we change data-explorer to use `MiniSql::InlineParamEncoder`
instead which takes into account of template patterns and does not trip
on `?` which is a special param encoding character used by ActiveRecord.
2022-10-10 09:03:37 +08:00
2022-06-21 15:27:08 +02:00
2020-09-04 13:23:11 +02:00
2021-07-02 10:31:16 +02:00
2020-05-06 18:11:07 +02:00
2020-09-25 11:46:42 -05:00
2022-02-21 20:59:32 +01:00

Data Explorer Plugin

This plugin allows admins to run SQL queries against the live Discourse database, including parameterized queries and formatting for several common column types.

For more information, please see: https://meta.discourse.org/t/data-explorer-plugin/32566

S
Description
SQL Queries for admins in Discourse
Readme MIT
2.9 MiB
Languages
Ruby 55.5%
JavaScript 41.9%
SCSS 2.6%