760667d744
What's the problem? =================== TL;DR: When the user enters an incorrect default value, its corresponding param-input will disappear When creating a parameter from SQL, we perform cast_to_ruby, which means that if the default value given by the user is invalid, the entire parameter will not be added to the param_list of the query. This behavior is very confusing, and users will not understand why an incorrect initial value will cause the param-input to disappear. What's the fix? ================ The cast_to_ruby process is canceled in create_from_sql, so that param-input with incorrect default value will still be displayed. We have a simple validation process on the front end, which is enough to prompt whether some default inputs are incorrect. |
||
---|---|---|
.github/workflows | ||
app | ||
assets | ||
config | ||
db/migrate | ||
lib | ||
spec | ||
test/javascripts | ||
.discourse-compatibility | ||
.eslintrc.cjs | ||
.gitignore | ||
.prettierrc.cjs | ||
.rubocop.yml | ||
.streerc | ||
.template-lintrc.cjs | ||
Gemfile | ||
Gemfile.lock | ||
LICENSE | ||
README.md | ||
about.json | ||
package.json | ||
plugin.rb | ||
translator.yml | ||
yarn.lock |
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