model.anubis
1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* Created by PyramIDE.
* User: フランスのトトロ aka (David RENÉ)
* Date: 13/02/2016
* Time: 10:41
* © Calexium
*/
transmit tools/basis.anubis
transmit columns.anubis
transmit calexium_lib/web/CXM_json.anubis
transmit hayamiki_lib/model/types/hk_model.anubis
public define HK_Model
hk_model(
List(HK_Model_Column) columns, //columns other than the primary key column (if any)
String show_string
)=
hk_model(columns, [], show_string)
.
_HK_MODEL message format:
========================
+------------+---------------+--------------------------
| name | type | description
+------------+---------------+--------------------------------
| "columns" | List(Message) | List of columns of the table Message id is _HK_COLUMN
| "show_str" | String | computation String to be shown to summarize row content. This string is Anubis source code
where the row content is in datum, named "obj".
public define JsonValue
to_JSON
(
HK_Model hk_model
)=
json_object("_HK_MODEL",
[
json_member("columns", json_array(map((HK_Model_Column column) |-> to_JSON(column), hk_model.columns))),
json_member("show_str", json_string(hk_model.show_string))
]).