document the debug component
This commit is contained in:
@@ -30,6 +30,7 @@ SELECT my_column_1 AS row_level_parameter_1, my_column_2 AS row_level_parameter_
|
||||
|
||||
This page documents all the components provided by default in SQLPage and their parameters.
|
||||
Use this as a reference when building your SQL application.
|
||||
If at any point you need help, you can ask for it on the [SQLPage forum](https://github.com/lovasoa/SQLpage/discussions).
|
||||
|
||||
If you have some frontend development experience, you can also create your own components, by placing
|
||||
[`.handlebars`](https://handlebarsjs.com/guide/) files in a folder called `sqlpage/templates` at the root of your server.
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
-- Insert the http_header component into the component table
|
||||
INSERT INTO component (name, description, icon)
|
||||
VALUES (
|
||||
'debug',
|
||||
'Display all of the row-level parameters passed to the component. Useful for debugging: just replace the name of the component you want to debug with ''debug''.',
|
||||
'bug'
|
||||
);
|
||||
-- Insert an example usage of the http_header component into the example table
|
||||
INSERT INTO example (component, description, properties)
|
||||
VALUES (
|
||||
'debug',
|
||||
'At any time, if you are confused about what data you are passing to a component, just replace the component name with ''debug'' to see all the parameters that are passed to it.',
|
||||
JSON('[{"component": "debug"}, {"x": "y", "z": 42}, {"a": "b", "c": null}]')
|
||||
);
|
||||
Reference in New Issue
Block a user