SQL Queries for admins in Discourse
Go to file
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
.github/workflows DEV: Update CI workflows (#180) 2022-06-17 21:34:29 +02:00
app FIX: Allow groups to access system queries (#185) 2022-08-19 00:14:07 +08:00
assets FIX: fixed the blueing of the bookmark icon (#186) 2022-08-19 00:07:35 +08:00
config Update translations (#181) 2022-06-21 15:27:08 +02:00
db/migrate FIX: Store query groups in a temp table when fixing ids. (#68) 2020-09-28 12:23:53 -03:00
lib DEV: Bookmarkable reminder refinement (#183) 2022-07-18 13:40:24 +10:00
spec FIX: Errors when running query due to PG template patterns or comments (#189) 2022-10-10 09:03:37 +08:00
test/javascripts DEV: Update linting setup and fix issues (#179) 2022-06-17 15:01:34 +02:00
.discourse-compatibility DEV: Update last .discourse-compatibility entry's target to 2.9.0.beta6 2022-07-18 14:59:14 +03:00
.eslintrc DEV: apply coding standards (#66) 2020-09-04 13:23:11 +02:00
.gitignore DEV: Update linting setup and fix issues (#179) 2022-06-17 15:01:34 +02:00
.prettierrc DEV: Minor clean-up (#119) 2021-07-02 10:31:16 +02:00
.rubocop.yml DEV: Move to rubocop-discourse. 2020-05-06 18:11:07 +02:00
.template-lintrc.js DEV: apply coding standards (#66) 2020-09-04 13:23:11 +02:00
Gemfile DEV: Add RubyGems as source 2020-09-25 11:46:42 -05:00
Gemfile.lock DEV: Bump rubocop-discourse (#188) 2022-10-03 22:20:04 +02:00
LICENSE Initial commit as a clone of discourse-tagging 2015-06-25 09:25:15 -07:00
README.md DEV: Update README.md (#164) 2022-02-21 20:59:32 +01:00
package.json DEV: Update linting setup and fix issues (#179) 2022-06-17 15:01:34 +02:00
plugin.rb FIX: Errors when running query due to PG template patterns or comments (#189) 2022-10-10 09:03:37 +08:00
translator.yml DEV: Switch from Transifex to Crowdin 2020-07-16 14:00:47 +02:00
yarn.lock DEV: Update linting setup and fix issues (#179) 2022-06-17 15:01:34 +02:00

README.md

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