Skip to content

Commit c0d4b82

Browse files
committed
improve the documentation for the DEBUG component
closes #251
1 parent bd7a0c9 commit c0d4b82

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

examples/official-site/sqlpage/migrations/06_debug.sql

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22
INSERT INTO component (name, description, icon)
33
VALUES (
44
'debug',
5-
'Display all the parameters passed to the component. Useful for debugging: just replace the name of the component you want to debug with ''debug''.',
5+
'Visualize any set of values as JSON.
6+
Can be used to display all the parameters passed to the component.
7+
Useful for debugging: just replace the name of the component you want to debug with ''debug'', and see all the top-level and row-level parameters that are passed to it, and their types.',
68
'bug'
79
);
810
-- Insert an example usage of the http_header component into the example table
911
INSERT INTO example (component, description, properties)
1012
VALUES (
1113
'debug',
1214
'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.',
13-
JSON('[{"component": "debug"}, {"x": "y", "z": 42}, {"a": "b", "c": null}]')
15+
JSON('[{"component": "debug", "my_top_level_property": true}, {"x": "y", "z": 42}, {"a": "b", "c": null}]')
16+
),
17+
(
18+
'debug',
19+
'Show the result of a SQLPage function:
20+
21+
```sql
22+
select ''debug'' as component, sqlpage.environment_variable(''HOME'');
23+
```',
24+
NULL
1425
);

0 commit comments

Comments
 (0)