header.anubis
1.76 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* Created by PyramIDE.
* User: フランスのトトロ
* Date: 31/12/2015
* Time: 13:42
* © Calexium
*/
read types/db_model.anubis
read tools/basis.anubis
read tools/streams.anubis
read tools/ISO-8601.anubis
define Maybe(One)
foreign_table_header
(
Stream stream,
List(DB_Model_Column) columns
)=
if columns is
{
[] then success(unique),
[h . t] then
since h is db_column(_, type, _),
if type is foreign_key(table_name) then
if write_string(stream, "\nread database/generated/"+table_name+".anubis") is
{
failure then failure,
success(_) then foreign_table_header(stream, t)
}
else
foreign_table_header(stream, t)
}
.
List(MetaSQL_ColStruct)
public define Maybe(One)
generate_header
(
Stream stream,
List(DB_Model_Column) columns
)=
if write_string(stream,
"/*
* Created by model_manager.
* User: Automat
* Date: "+_Int_to_ISO_8601_date(now)+"
* Time: "+_Int_to_ISO_8601_time(now)+"
*
*/
read tools/basis.anubis
read tools/base_tools.anubis
read calexium_lib/web/CXM_making_a_web_site.anubis
read calexium_lib/web/CXM_common.anubis
read calexium_lib/web/CXM_web_dump.anubis
read calexium_lib/web/CXM_web_arg_utils.anubis
read data_base/sqlite.anubis
read data_base/db_tools.anubis
read calexium_lib/database/db_utils.anubis
read calexium_lib/database/db_types.anubis
read calexium_lib/database/vtm/view_table_types.anubis
read system/logger.anubis
read system/datetime.anubis
read system/convert.anubis
read system/string.anubis
read calexium_lib/net_services_protocols/logger_service.anubis
read app/app_loggers.anubis
") is failure then failure else
foreign_table_header(stream, columns)
.