@@ -11,7 +11,7 @@ a query on database 'dj/northwind' called 'group', executable for the 'authentic
1111}
1212```
1313## query catalog
14- a query on database 'dj/ northwind' called 'list'. Parameters limit and offset can be passed to the query
14+ a query on database 'northwind' called 'list'. Parameters limit and offset can be passed to the query
1515``` json
1616{
1717 "ID" : " list" ,
@@ -30,6 +30,16 @@ a query on database 'dj/northwind' called 'list'. Parameters limit and offset ca
3030 }
3131}
3232```
33+ ## query catalog: stored procedure
34+ stored procedure 'sp' on database 'postgres' called with parameter 'test'
35+ ``` json
36+ {
37+ "ID" : " sp" ,
38+ "database" : " dj/postgres" ,
39+ "query" : " CALL my_sp('test')" ,
40+ "type" : " read"
41+ }
42+ ```
3343## database definition
3444postgres database connection information with encrypted password
3545``` json
@@ -42,6 +52,94 @@ postgres database connection information with encrypted password
4252 "password" : " DJ1#\b /gbzX8DDZa1lVaiLat0HdX9cDST2KHJk"
4353}
4454```
55+ ## database definition with audit log
56+ sqlite database definition. The before-update trigger is called accordingly and logs an audit record to the table audit
57+ ``` json
58+ {
59+ "name" : " sqlite" ,
60+ "ID" : " dj/sqlite" ,
61+ "djClassName" : " org.dashjoin.service.SQLDatabase" ,
62+ "url" : " jdbc:sqlite:dashjoin-demo.db" ,
63+ "tables" : {
64+ "REQUESTS" : {
65+ "before-update" : " $create('db', 'audit', {'timestamp': $now(), 'user': user, 'operation': command, 'payload': object})"
66+ }
67+ }
68+ }
69+ ```
70+ ## database definition with initial create table
71+ sqlite database definition with init script that contains: CREATE TABLE IF NOT EXISTS MY_TABLE(ID INT PRIMARY KEY, NAME VARCHAR(255))
72+ ``` json
73+ {
74+ "name" : " sqlite" ,
75+ "ID" : " dj/sqlite" ,
76+ "djClassName" : " org.dashjoin.service.SQLDatabase" ,
77+ "url" : " jdbc:sqlite:dashjoin-demo.db" ,
78+ "initScripts" : [ " upload/init.sql" ]
79+ }
80+ ```
81+ ## database definition with foreign key
82+ sqlite database definition with a foreign key pointing to the CUSTOMERS table in the northwind database
83+ ``` json
84+ {
85+ "name" : " sqlite" ,
86+ "ID" : " dj/sqlite" ,
87+ "djClassName" : " org.dashjoin.service.SQLDatabase" ,
88+ "url" : " jdbc:sqlite:dashjoin-demo.db" ,
89+ "tables" : {
90+ "REQUESTS" : {
91+ "properties" : {
92+ "customer" : {
93+ "ref" : " dj/northwind/CUSTOMERS/CUSTOMER_ID" ,
94+ "displayWith" : " fk"
95+ }
96+ }
97+ }
98+ }
99+ }
100+ ```
101+ ## database definition with foreign key array
102+ postgres database definition with an array of foreign keys pointing to the CUSTOMERS table in the northwind database
103+ ``` json
104+ {
105+ "name" : " postgres" ,
106+ "djClassName" : " org.dashjoin.service.SQLDatabase" ,
107+ "username" : " postgres" ,
108+ "password" : " DJ1#\b ApQHRIfZwu6WSIJrlI2aBqbMhnLRPlsg" ,
109+ "url" : " jdbc:postgresql://localhost:5432/postgres" ,
110+ "ID" : " dj/postgres" ,
111+ "tables" : {
112+ "test" : {
113+ "properties" : {
114+ "arr" : {
115+ "type" : " array" ,
116+ "items" : {
117+ "ref" : " dj/northwind/CUSTOMERS/CUSTOMER_ID" ,
118+ "type" : " string" ,
119+ "displayWith" : " fk"
120+ }
121+ }
122+ }
123+ }
124+ }
125+ }
126+ ```
127+ ## database definition with record label
128+ EMPLOYEES table defines the record label to be the LAST_NAME. All links and page titles for EMPLOYEE records use the LAST_NAME column as labels
129+ ``` json
130+ {
131+ "ID" : " dj/northwind" ,
132+ "name" : " northwind" ,
133+ "parent" : " dj" ,
134+ "djClassName" : " org.dashjoin.service.SQLDatabase" ,
135+ "url" : " jdbc:h2:mem:northwind" ,
136+ "tables" : {
137+ "EMPLOYEES" : {
138+ "dj-label" : " ${LAST_NAME}"
139+ }
140+ }
141+ }
142+ ```
45143## Function catalog: Invoke
46144Function that adds two numbers passed in the argument object. It can be called via $call('add') or via REST
47145``` json
@@ -280,3 +378,32 @@ Query timeout in milliseconds for queries issued when browsing data. To disable
280378 "integer" : 1000
281379}
282380```
381+ ## tenantusers
382+ [email protected] is allowed (active) on the platform and is in the role 'authenticated'
383+ ``` json
384+ {
385+ 386+ "active" : true ,
387+ "roles" : [ " authenticated" ]
388+ }
389+ ```
390+ ## tenantusers
391+ Sets the 'homepage' variable (the initial page after login) to '/page/test' for
[email protected] (overrides the global and role setting for 'homepage')
392+ ``` json
393+ {
394+ 395+ "properties" : {
396+ "homepage" : " /page/test"
397+ }
398+ }
399+ ```
400+ ## dj-role
401+ defines the role 'admin'. Sets the 'homepage' variable (the initial page after login) is set to '/page/Info' for all users in this role (overrides the global setting 'homepage')
402+ ``` json
403+ {
404+ "ID" : " admin" ,
405+ "properties" : {
406+ "homepage" : " /page/Info"
407+ }
408+ }
409+ ```
0 commit comments