Commit Graph

5 Commits

Author SHA1 Message Date
Loïc Guitaut abe51c2aba
DEV: Fix new Rubocop offenses (#282) 2024-02-29 18:15:57 +01:00
Martin Brennan 5776aa7fc9
FEATURE: Add JSON result type component (#260)
If a column is payload or contains _payload it will be assumed
it has JSON data in it, then we will show the truncated JSON in the
result column with a button to show the full-screen formatted
JSON using our full-screen code viewer. We also do the same if
the column is the `json` postgres data type.
2023-11-02 09:50:05 +10:00
Bianca Nenciu 206d937a78
DEV: Update plugin to match latest guidelines (#229)
This commit updates the plugin to the latest guidelines, as shown in
discourse-plugin-skeleton, which involves moving a lot of the code to
dedicated files, use proper namespaces, use the autoloader as much as
possible, etc.
2023-03-22 23:29:08 +02:00
David Taylor 148d6c32a3
DEV: Introduce syntax_tree for ruby formatting (#208) 2022-12-29 13:31:29 +01:00
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