Commit 03fd5d94d231a079529c96da85b88244bff84722
0 parents
first commit of VTM generator ;-) The name of that application is not decided yet.
The file organization is also messy and can change in the near future.
Showing
11 changed files
with
2233 additions
and
0 deletions
Show diff stats
calexium_lib @ 4d677a6833d
| 1 | +++ a/model_manager.aproj | |
| 1 | +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| 2 | + <PropertyGroup> | |
| 3 | + <ProjectGuid>{89372B21-80FA-4EB8-B17C-072EB55713D6}</ProjectGuid> | |
| 4 | + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
| 5 | + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |
| 6 | + <OutputType>Exe</OutputType> | |
| 7 | + <RootNamespace>model_manager</RootNamespace> | |
| 8 | + <AssemblyName>model_manager</AssemblyName> | |
| 9 | + <StartupObject>src\main.anubis</StartupObject> | |
| 10 | + <IncludePaths>./%3b./src</IncludePaths> | |
| 11 | + <MakeUsedFile>False</MakeUsedFile> | |
| 12 | + <MakeUnusedFile>False</MakeUnusedFile> | |
| 13 | + <AnubiscVerbosity>False</AnubiscVerbosity> | |
| 14 | + </PropertyGroup> | |
| 15 | + <PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | |
| 16 | + <OutputPath>bin\Debug\</OutputPath> | |
| 17 | + <DebugSymbols>True</DebugSymbols> | |
| 18 | + <DebugType>Full</DebugType> | |
| 19 | + <Optimize>False</Optimize> | |
| 20 | + <CommandLine>-sc</CommandLine> | |
| 21 | + </PropertyGroup> | |
| 22 | + <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | |
| 23 | + <OutputPath>bin\Release\</OutputPath> | |
| 24 | + <DebugSymbols>False</DebugSymbols> | |
| 25 | + <DebugType>None</DebugType> | |
| 26 | + <Optimize>True</Optimize> | |
| 27 | + </PropertyGroup> | |
| 28 | + <Import Project="$(AnubisBinPath)\Anubis.Build.targets" /> | |
| 29 | + <ItemGroup> | |
| 30 | + <Compile Include="calexium_lib\asterisk\ami.anubis" /> | |
| 31 | + <Compile Include="calexium_lib\asterisk\ami_commands.anubis" /> | |
| 32 | + <Compile Include="calexium_lib\asterisk\ami_types.anubis" /> | |
| 33 | + <Compile Include="calexium_lib\CXM_errors.anubis" /> | |
| 34 | + <Compile Include="calexium_lib\CXM_message_constants.anubis" /> | |
| 35 | + <Compile Include="calexium_lib\database\alter_table.anubis" /> | |
| 36 | + <Compile Include="calexium_lib\database\db_types.anubis" /> | |
| 37 | + <Compile Include="calexium_lib\database\db_utils.anubis" /> | |
| 38 | + <Compile Include="calexium_lib\database\migration.anubis" /> | |
| 39 | + <Compile Include="calexium_lib\database\migration_common.anubis" /> | |
| 40 | + <Compile Include="calexium_lib\database\migration_common_sqlite3.anubis" /> | |
| 41 | + <Compile Include="calexium_lib\database\migration_sqlite3.anubis" /> | |
| 42 | + <Compile Include="calexium_lib\database\settings.anubis" /> | |
| 43 | + <Compile Include="calexium_lib\database\settings_sqlite3.anubis" /> | |
| 44 | + <Compile Include="calexium_lib\database\sqlite_foreign_key.anubis" /> | |
| 45 | + <Compile Include="calexium_lib\extensions\json.anubis" /> | |
| 46 | + <Compile Include="calexium_lib\mail\authentication.anubis" /> | |
| 47 | + <Compile Include="calexium_lib\mail\lexers\enhanced_status.anubis" /> | |
| 48 | + <Compile Include="calexium_lib\mail\send_mail.anubis" /> | |
| 49 | + <Compile Include="calexium_lib\mail\send_mail_type.anubis" /> | |
| 50 | + <Compile Include="calexium_lib\mail\smtp_client.anubis" /> | |
| 51 | + <Compile Include="calexium_lib\mail\smtp_server_extensions.anubis" /> | |
| 52 | + <Compile Include="calexium_lib\mail\tools.anubis" /> | |
| 53 | + <Compile Include="calexium_lib\network\socket_pool.anubis" /> | |
| 54 | + <Compile Include="calexium_lib\net_services\CXM_generic_client.anubis" /> | |
| 55 | + <Compile Include="calexium_lib\net_services\CXM_generic_protocol.anubis" /> | |
| 56 | + <Compile Include="calexium_lib\net_services\CXM_net_services.anubis" /> | |
| 57 | + <Compile Include="calexium_lib\net_services_protocols\ftp_client.anubis" /> | |
| 58 | + <Compile Include="calexium_lib\net_services_protocols\logger_service.anubis" /> | |
| 59 | + <Compile Include="calexium_lib\net_services_protocols\pkg_updater_protocol.anubis" /> | |
| 60 | + <Compile Include="calexium_lib\os_tools\freebsd\rc_conf.anubis" /> | |
| 61 | + <Compile Include="calexium_lib\os_tools\linux\config\network_interface_file.anubis" /> | |
| 62 | + <Compile Include="calexium_lib\unit_test\xml_rpc.unit_test.anubis" /> | |
| 63 | + <Compile Include="calexium_lib\web\counter.anubis" /> | |
| 64 | + <Compile Include="calexium_lib\web\CXM_common.anubis" /> | |
| 65 | + <Compile Include="calexium_lib\web\CXM_cookies.anubis" /> | |
| 66 | + <Compile Include="calexium_lib\web\CXM_dojo.anubis" /> | |
| 67 | + <Compile Include="calexium_lib\web\CXM_form.anubis" /> | |
| 68 | + <Compile Include="calexium_lib\web\CXM_generic_form.anubis" /> | |
| 69 | + <Compile Include="calexium_lib\web\CXM_generic_login.anubis" /> | |
| 70 | + <Compile Include="calexium_lib\web\CXM_generic_table.anubis" /> | |
| 71 | + <Compile Include="calexium_lib\web\CXM_html_tooltip.anubis" /> | |
| 72 | + <Compile Include="calexium_lib\web\CXM_https_get.anubis" /> | |
| 73 | + <Compile Include="calexium_lib\web\CXM_http_get.anubis" /> | |
| 74 | + <Compile Include="calexium_lib\web\CXM_http_get_common.anubis" /> | |
| 75 | + <Compile Include="calexium_lib\web\CXM_jquery.anubis" /> | |
| 76 | + <Compile Include="calexium_lib\web\CXM_json.anubis" /> | |
| 77 | + <Compile Include="calexium_lib\web\CXM_making_a_web_site.anubis" /> | |
| 78 | + <Compile Include="calexium_lib\web\CXM_mime.anubis" /> | |
| 79 | + <Compile Include="calexium_lib\web\CXM_multihost_http_server.anubis" /> | |
| 80 | + <Compile Include="calexium_lib\web\CXM_style_tools.anubis" /> | |
| 81 | + <Compile Include="calexium_lib\web\CXM_urllib.anubis" /> | |
| 82 | + <Compile Include="calexium_lib\web\CXM_web_arg_encode.anubis" /> | |
| 83 | + <Compile Include="calexium_lib\web\CXM_web_arg_utils.anubis" /> | |
| 84 | + <Compile Include="calexium_lib\web\CXM_web_dump.anubis" /> | |
| 85 | + <Compile Include="calexium_lib\web\CXM_widgets.anubis" /> | |
| 86 | + <Compile Include="calexium_lib\web\CXM_xml_rpc.anubis" /> | |
| 87 | + <Compile Include="calexium_lib\web\CXM_xml_rpc_parser.anubis" /> | |
| 88 | + <Compile Include="calexium_lib\web\CXM_xml_rpc_types.anubis" /> | |
| 89 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_animate.anubis" /> | |
| 90 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_button.anubis" /> | |
| 91 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_datatable.anubis" /> | |
| 92 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_datatable_plugins.anubis" /> | |
| 93 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_datatable_server_side.anubis" /> | |
| 94 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_datatable_translation.anubis" /> | |
| 95 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_datatable_types.anubis" /> | |
| 96 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_dialog.anubis" /> | |
| 97 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_easing.anubis" /> | |
| 98 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_eudock.anubis" /> | |
| 99 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_eudock_types.anubis" /> | |
| 100 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_icons.anubis" /> | |
| 101 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_jqplot.anubis" /> | |
| 102 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_tabs.anubis" /> | |
| 103 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_tiptip.anubis" /> | |
| 104 | + <Compile Include="calexium_lib\web\jQuery\CXM_jquery_toolbar.anubis" /> | |
| 105 | + <Compile Include="calexium_lib\web\jQuery\CXM_jq_checkbox.anubis" /> | |
| 106 | + <Compile Include="calexium_lib\web\jQuery\CXM_jq_form.anubis" /> | |
| 107 | + <Compile Include="calexium_lib\web\jQuery\CXM_jq_radio.anubis" /> | |
| 108 | + <Compile Include="calexium_lib\web\jQuery\jq_flot.anubis" /> | |
| 109 | + <Compile Include="calexium_lib\web\jQuery\ui-addon\datetimepicker.anubis" /> | |
| 110 | + <Compile Include="calexium_lib\web\js_tools.anubis" /> | |
| 111 | + <Compile Include="calexium_lib\web\widgets\button.anubis" /> | |
| 112 | + <Compile Include="calexium_lib\web\widgets\css_helper.anubis" /> | |
| 113 | + <Compile Include="calexium_lib\web\widgets\dashboard.anubis" /> | |
| 114 | + <Compile Include="calexium_lib\web\widgets\fisheye_menu.anubis" /> | |
| 115 | + <Compile Include="calexium_lib\web\widgets\icons_set.anubis" /> | |
| 116 | + <Compile Include="library\a2a\C\formater.anubis" /> | |
| 117 | + <Compile Include="library\a2a\example.anubis" /> | |
| 118 | + <Compile Include="library\a2a\generic\preformater.anubis" /> | |
| 119 | + <Compile Include="library\charset\charset_decoder.anubis" /> | |
| 120 | + <Compile Include="library\charset\iso2022_jp_decoder.anubis" /> | |
| 121 | + <Compile Include="library\cipher\base64.anubis" /> | |
| 122 | + <Compile Include="library\compile_everything.anubis" /> | |
| 123 | + <Compile Include="library\compil_all.anubis" /> | |
| 124 | + <Compile Include="library\compil_all_beta.anubis" /> | |
| 125 | + <Compile Include="library\converters\_1_7_to_1_8.anubis" /> | |
| 126 | + <Compile Include="library\data_base\alter_table.anubis" /> | |
| 127 | + <Compile Include="library\data_base\db_tools.anubis" /> | |
| 128 | + <Compile Include="library\data_base\db_types.anubis" /> | |
| 129 | + <Compile Include="library\data_base\import_csv.anubis" /> | |
| 130 | + <Compile Include="library\data_base\metaSQL.anubis" /> | |
| 131 | + <Compile Include="library\data_base\metaSQL_example_database.anubis" /> | |
| 132 | + <Compile Include="library\data_base\metaSQL_example_output.anubis" /> | |
| 133 | + <Compile Include="library\data_base\metaSQL_example_queries.anubis" /> | |
| 134 | + <Compile Include="library\data_base\metaSQL_Postgres.anubis" /> | |
| 135 | + <Compile Include="library\data_base\metaSQL_test.anubis" /> | |
| 136 | + <Compile Include="library\data_base\metaSQL_web.anubis" /> | |
| 137 | + <Compile Include="library\data_base\mysql_client.anubis" /> | |
| 138 | + <Compile Include="library\data_base\postgres_client.anubis" /> | |
| 139 | + <Compile Include="library\data_base\postgres_graphic_interface.anubis" /> | |
| 140 | + <Compile Include="library\data_base\read_csv.anubis" /> | |
| 141 | + <Compile Include="library\data_base\read_csv_org.anubis" /> | |
| 142 | + <Compile Include="library\data_base\read_csv_table.anubis" /> | |
| 143 | + <Compile Include="library\data_base\sdbms.anubis" /> | |
| 144 | + <Compile Include="library\data_base\sdbms1.anubis" /> | |
| 145 | + <Compile Include="library\data_base\sdbms3.anubis" /> | |
| 146 | + <Compile Include="library\data_base\sdbms4.anubis" /> | |
| 147 | + <Compile Include="library\data_base\sqlite.anubis" /> | |
| 148 | + <Compile Include="library\data_base\sqlite_foreign_key.anubis" /> | |
| 149 | + <Compile Include="library\data_base\theory.anubis" /> | |
| 150 | + <Compile Include="library\doc_tools\latex.anubis" /> | |
| 151 | + <Compile Include="library\doc_tools\make_doc.anubis" /> | |
| 152 | + <Compile Include="library\doc_tools\maml.anubis" /> | |
| 153 | + <Compile Include="library\doc_tools\maml3.anubis" /> | |
| 154 | + <Compile Include="library\examples\args.anubis" /> | |
| 155 | + <Compile Include="library\examples\conditional_examples.anubis" /> | |
| 156 | + <Compile Include="library\examples\cryptography\md5.anubis" /> | |
| 157 | + <Compile Include="library\examples\cryptography\sha1.anubis" /> | |
| 158 | + <Compile Include="library\examples\fibonacci.anubis" /> | |
| 159 | + <Compile Include="library\examples\file_manager_example.anubis" /> | |
| 160 | + <Compile Include="library\examples\full_ls.anubis" /> | |
| 161 | + <Compile Include="library\examples\graphism\diaporama.anubis" /> | |
| 162 | + <Compile Include="library\examples\graphism\paint.anubis" /> | |
| 163 | + <Compile Include="library\examples\graphism\paint2.anubis" /> | |
| 164 | + <Compile Include="library\examples\graphism\show_image.anubis" /> | |
| 165 | + <Compile Include="library\examples\graphism\try_window.anubis" /> | |
| 166 | + <Compile Include="library\examples\hello.anubis" /> | |
| 167 | + <Compile Include="library\examples\kbd.anubis" /> | |
| 168 | + <Compile Include="library\examples\lexical_analysis\href_extractor.anubis" /> | |
| 169 | + <Compile Include="library\examples\logic\church_integers.anubis" /> | |
| 170 | + <Compile Include="library\examples\logic\peano.anubis" /> | |
| 171 | + <Compile Include="library\examples\ls.anubis" /> | |
| 172 | + <Compile Include="library\examples\mathematics\fact.anubis" /> | |
| 173 | + <Compile Include="library\examples\mathematics\mandelbrot_set.anubis" /> | |
| 174 | + <Compile Include="library\examples\mathematics\mandelbrot_set_old.anubis" /> | |
| 175 | + <Compile Include="library\examples\mathematics\runge_kutta\runge_kutta.anubis" /> | |
| 176 | + <Compile Include="library\examples\mathematics\syracuse.anubis" /> | |
| 177 | + <Compile Include="library\examples\merge_list.anubis" /> | |
| 178 | + <Compile Include="library\examples\mkdir_test.anubis" /> | |
| 179 | + <Compile Include="library\examples\network\client_browser_info.anubis" /> | |
| 180 | + <Compile Include="library\examples\network\client_server.anubis" /> | |
| 181 | + <Compile Include="library\examples\network\minimal_web_site.anubis" /> | |
| 182 | + <Compile Include="library\examples\network\muscle_echo.anubis" /> | |
| 183 | + <Compile Include="library\examples\network\port_scan.anubis" /> | |
| 184 | + <Compile Include="library\examples\network\sntp_client.anubis" /> | |
| 185 | + <Compile Include="library\examples\network\sokoban.anubis" /> | |
| 186 | + <Compile Include="library\examples\network\try_dns.anubis" /> | |
| 187 | + <Compile Include="library\examples\network\udp_client_server.anubis" /> | |
| 188 | + <Compile Include="library\examples\network\upload.anubis" /> | |
| 189 | + <Compile Include="library\examples\playing_with_functions.anubis" /> | |
| 190 | + <Compile Include="library\examples\read_line_example.anubis" /> | |
| 191 | + <Compile Include="library\examples\restart.anubis" /> | |
| 192 | + <Compile Include="library\examples\saturate_example.anubis" /> | |
| 193 | + <Compile Include="library\examples\system\load_adm.anubis" /> | |
| 194 | + <Compile Include="library\examples\test.anubis" /> | |
| 195 | + <Compile Include="library\examples\test_web_site.anubis" /> | |
| 196 | + <Compile Include="library\examples\try_now.anubis" /> | |
| 197 | + <Compile Include="library\examples\try_protect.anubis" /> | |
| 198 | + <Compile Include="library\examples\watt.anubis" /> | |
| 199 | + <Compile Include="library\examples\_99_bottles_of_beer.anubis" /> | |
| 200 | + <Compile Include="library\graphism\charts.anubis" /> | |
| 201 | + <Compile Include="library\graphism\float_int32.anubis" /> | |
| 202 | + <Compile Include="library\graphism\font_tools.anubis" /> | |
| 203 | + <Compile Include="library\graphism\geometrical_figures.anubis" /> | |
| 204 | + <Compile Include="library\graphism\gif.anubis" /> | |
| 205 | + <Compile Include="library\graphism\image_tools.anubis" /> | |
| 206 | + <Compile Include="library\graphism\jpeg.anubis" /> | |
| 207 | + <Compile Include="library\graphism\jpeg_size.anubis" /> | |
| 208 | + <Compile Include="library\graphism\lzw_gif.anubis" /> | |
| 209 | + <Compile Include="library\graphism\png_size.anubis" /> | |
| 210 | + <Compile Include="library\graphism\test_charts.anubis" /> | |
| 211 | + <Compile Include="library\graphism\test_gfigures.anubis" /> | |
| 212 | + <Compile Include="library\install_released_files.anubis" /> | |
| 213 | + <Compile Include="library\lexical_analysis\compile_time_test.anubis" /> | |
| 214 | + <Compile Include="library\lexical_analysis\fast_lexer.anubis" /> | |
| 215 | + <Compile Include="library\lexical_analysis\fast_lexer_2.anubis" /> | |
| 216 | + <Compile Include="library\lexical_analysis\fast_lexer_3.anubis" /> | |
| 217 | + <Compile Include="library\lexical_analysis\fast_lexer_4.anubis" /> | |
| 218 | + <Compile Include="library\lexical_analysis\fast_lexer_example_1.anubis" /> | |
| 219 | + <Compile Include="library\lexical_analysis\fast_lexer_example_2.anubis" /> | |
| 220 | + <Compile Include="library\lexical_analysis\lexer_maker_v2.anubis" /> | |
| 221 | + <Compile Include="library\lexical_analysis\testing_fast_lexer.anubis" /> | |
| 222 | + <Compile Include="library\lexical_analysis\xml.anubis" /> | |
| 223 | + <Compile Include="library\locale\iso3166-1.anubis" /> | |
| 224 | + <Compile Include="library\locale\L3.anubis" /> | |
| 225 | + <Compile Include="library\locale\L3LanguageInfo.anubis" /> | |
| 226 | + <Compile Include="library\mail\send_mail.anubis" /> | |
| 227 | + <Compile Include="library\mail\smtp_server.anubis" /> | |
| 228 | + <Compile Include="library\make_distribution_library.anubis" /> | |
| 229 | + <Compile Include="library\mycompile_everything.anubis" /> | |
| 230 | + <Compile Include="library\network\dns.anubis" /> | |
| 231 | + <Compile Include="library\network\dns_tools.anubis" /> | |
| 232 | + <Compile Include="library\network\remote_files_manager_common.anubis" /> | |
| 233 | + <Compile Include="library\network\sntp.anubis" /> | |
| 234 | + <Compile Include="library\network\tools.anubis" /> | |
| 235 | + <Compile Include="library\official_library.anubis" /> | |
| 236 | + <Compile Include="library\predefined.anubis" /> | |
| 237 | + <Compile Include="library\syntactic_analysis\anubis_output.anubis" /> | |
| 238 | + <Compile Include="library\syntactic_analysis\common.anubis" /> | |
| 239 | + <Compile Include="library\syntactic_analysis\make_automaton.anubis" /> | |
| 240 | + <Compile Include="library\syntactic_analysis\parser_generator.anubis" /> | |
| 241 | + <Compile Include="library\syntactic_analysis\read_grammar.anubis" /> | |
| 242 | + <Compile Include="library\syntactic_analysis\yacc_version.anubis" /> | |
| 243 | + <Compile Include="library\system\bytearray.anubis" /> | |
| 244 | + <Compile Include="library\system\convert.anubis" /> | |
| 245 | + <Compile Include="library\system\data_io.anubis" /> | |
| 246 | + <Compile Include="library\system\datetime.anubis" /> | |
| 247 | + <Compile Include="library\system\files.anubis" /> | |
| 248 | + <Compile Include="library\system\lists.anubis" /> | |
| 249 | + <Compile Include="library\system\logger.anubis" /> | |
| 250 | + <Compile Include="library\system\message_queue.anubis" /> | |
| 251 | + <Compile Include="library\system\message_transceiver.anubis" /> | |
| 252 | + <Compile Include="library\system\muscle.anubis" /> | |
| 253 | + <Compile Include="library\system\parameter\inifile.anubis" /> | |
| 254 | + <Compile Include="library\system\string.anubis" /> | |
| 255 | + <Compile Include="library\system\test_logger.anubis" /> | |
| 256 | + <Compile Include="library\system\types.anubis" /> | |
| 257 | + <Compile Include="library\system_colors\hsl.anubis" /> | |
| 258 | + <Compile Include="library\system_colors\hsv.anubis" /> | |
| 259 | + <Compile Include="library\system_colors\rgb.anubis" /> | |
| 260 | + <Compile Include="library\system_colors\system_colors.anubis" /> | |
| 261 | + <Compile Include="library\system_fonts\draw_font.anubis" /> | |
| 262 | + <Compile Include="library\system_fonts\font_table.anubis" /> | |
| 263 | + <Compile Include="library\test\all_unit_test.anubis" /> | |
| 264 | + <Compile Include="library\test\cp_test.anubis" /> | |
| 265 | + <Compile Include="library\test\execute_capture.anubis" /> | |
| 266 | + <Compile Include="library\test\inifile_test.anubis" /> | |
| 267 | + <Compile Include="library\test\lexical_analysis\fast_lexer.ut.anubis" /> | |
| 268 | + <Compile Include="library\test\lexical_analysis\low_level_fast_lexer_test.anubis" /> | |
| 269 | + <Compile Include="library\test\locale_test.anubis" /> | |
| 270 | + <Compile Include="library\test\Logger_test.anubis" /> | |
| 271 | + <Compile Include="library\test\predefined\ByteArray.ut.anubis" /> | |
| 272 | + <Compile Include="library\test\predefined\date_and_time.unit_test.anubis" /> | |
| 273 | + <Compile Include="library\test\predefined\dbapi.unit_test.anubis" /> | |
| 274 | + <Compile Include="library\test\predefined\decimal_scan.unit_test.anubis" /> | |
| 275 | + <Compile Include="library\test\predefined\fast_lexer.unit_test.anubis" /> | |
| 276 | + <Compile Include="library\test\predefined\file.ut.anubis" /> | |
| 277 | + <Compile Include="library\test\predefined\Int.unit_test.anubis" /> | |
| 278 | + <Compile Include="library\test\predefined\sqlite.obsolete.unit_test.anubis" /> | |
| 279 | + <Compile Include="library\test\predefined\sqlite.unit_test.anubis" /> | |
| 280 | + <Compile Include="library\test\serialize_test.anubis" /> | |
| 281 | + <Compile Include="library\test\sqlite3_test.anubis" /> | |
| 282 | + <Compile Include="library\test\SSLTest.anubis" /> | |
| 283 | + <Compile Include="library\test\system\convert.unit_test.anubis" /> | |
| 284 | + <Compile Include="library\test\system\files.unit_test.anubis" /> | |
| 285 | + <Compile Include="library\test\system\Int.unit_test.anubis" /> | |
| 286 | + <Compile Include="library\test\system\message_queue.unit_test.anubis" /> | |
| 287 | + <Compile Include="library\test\system\message_transceiver.unit_test.anubis" /> | |
| 288 | + <Compile Include="library\test\system\string.unit_test.anubis" /> | |
| 289 | + <Compile Include="library\test\system\wordXX.unit_test.anubis" /> | |
| 290 | + <Compile Include="library\test\TestItem.anubis" /> | |
| 291 | + <Compile Include="library\test\tools\line_reader.ut.anubis" /> | |
| 292 | + <Compile Include="library\test\tools\utf-8.unit_test.anubis" /> | |
| 293 | + <Compile Include="library\test\vm_test.anubis" /> | |
| 294 | + <Compile Include="library\tools\2-4tree.anubis" /> | |
| 295 | + <Compile Include="library\tools\admloader_test.anubis" /> | |
| 296 | + <Compile Include="library\tools\adm_autoreload.anubis" /> | |
| 297 | + <Compile Include="library\tools\adm_autoreload_tools.anubis" /> | |
| 298 | + <Compile Include="library\tools\avltrees.anubis" /> | |
| 299 | + <Compile Include="library\tools\base64.anubis" /> | |
| 300 | + <Compile Include="library\tools\basis.anubis" /> | |
| 301 | + <Compile Include="library\tools\bool.anubis" /> | |
| 302 | + <Compile Include="library\tools\btree1.anubis" /> | |
| 303 | + <Compile Include="library\tools\buffered_connection.anubis" /> | |
| 304 | + <Compile Include="library\tools\bytearray.anubis" /> | |
| 305 | + <Compile Include="library\tools\cmd_line.anubis" /> | |
| 306 | + <Compile Include="library\tools\connections.anubis" /> | |
| 307 | + <Compile Include="library\tools\delegate_writer.anubis" /> | |
| 308 | + <Compile Include="library\tools\dictionaries.anubis" /> | |
| 309 | + <Compile Include="library\tools\dump_file.anubis" /> | |
| 310 | + <Compile Include="library\tools\explore_disk.anubis" /> | |
| 311 | + <Compile Include="library\tools\file_and_dir.anubis" /> | |
| 312 | + <Compile Include="library\tools\findstring.anubis" /> | |
| 313 | + <Compile Include="library\tools\find_and_replace.anubis" /> | |
| 314 | + <Compile Include="library\tools\find_and_replace_simulator.anubis" /> | |
| 315 | + <Compile Include="library\tools\finger_trees.anubis" /> | |
| 316 | + <Compile Include="library\tools\float.anubis" /> | |
| 317 | + <Compile Include="library\tools\function.anubis" /> | |
| 318 | + <Compile Include="library\tools\graphic.anubis" /> | |
| 319 | + <Compile Include="library\tools\graphviz.anubis" /> | |
| 320 | + <Compile Include="library\tools\hashtable.anubis" /> | |
| 321 | + <Compile Include="library\tools\int.anubis" /> | |
| 322 | + <Compile Include="library\tools\ip_address.anubis" /> | |
| 323 | + <Compile Include="library\tools\ISO-8601.anubis" /> | |
| 324 | + <Compile Include="library\tools\iterators.anubis" /> | |
| 325 | + <Compile Include="library\tools\latex.anubis" /> | |
| 326 | + <Compile Include="library\tools\line_reader.anubis" /> | |
| 327 | + <Compile Include="library\tools\list.anubis" /> | |
| 328 | + <Compile Include="library\tools\maml.anubis" /> | |
| 329 | + <Compile Include="library\tools\maybefloat.anubis" /> | |
| 330 | + <Compile Include="library\tools\printable_tree.anubis" /> | |
| 331 | + <Compile Include="library\tools\prompt.anubis" /> | |
| 332 | + <Compile Include="library\tools\random.anubis" /> | |
| 333 | + <Compile Include="library\tools\rationals.anubis" /> | |
| 334 | + <Compile Include="library\tools\read_table.anubis" /> | |
| 335 | + <Compile Include="library\tools\safe_save_retrieve.anubis" /> | |
| 336 | + <Compile Include="library\tools\saturate.anubis" /> | |
| 337 | + <Compile Include="library\tools\schedul_task.anubis" /> | |
| 338 | + <Compile Include="library\tools\sdbms.anubis" /> | |
| 339 | + <Compile Include="library\tools\sdbms1.anubis" /> | |
| 340 | + <Compile Include="library\tools\sdbms2.anubis" /> | |
| 341 | + <Compile Include="library\tools\sorting.anubis" /> | |
| 342 | + <Compile Include="library\tools\streams.anubis" /> | |
| 343 | + <Compile Include="library\tools\string.anubis" /> | |
| 344 | + <Compile Include="library\tools\tables.anubis" /> | |
| 345 | + <Compile Include="library\tools\time.anubis" /> | |
| 346 | + <Compile Include="library\tools\tools.anubis" /> | |
| 347 | + <Compile Include="library\tools\unit_test.anubis" /> | |
| 348 | + <Compile Include="library\tools\useful_types.anubis" /> | |
| 349 | + <Compile Include="library\tools\utf-8.anubis" /> | |
| 350 | + <Compile Include="library\tools\words.anubis" /> | |
| 351 | + <Compile Include="library\version2\diaconescu.anubis" /> | |
| 352 | + <Compile Include="library\vm\vm_dump.anubis" /> | |
| 353 | + <Compile Include="library\vm_test.anubis" /> | |
| 354 | + <Compile Include="library\web\calculatrice.anubis" /> | |
| 355 | + <Compile Include="library\web\common.anubis" /> | |
| 356 | + <Compile Include="library\web\cookies.anubis" /> | |
| 357 | + <Compile Include="library\web\counter.anubis" /> | |
| 358 | + <Compile Include="library\web\default_web_site.anubis" /> | |
| 359 | + <Compile Include="library\web\dynamic_http_server.anubis" /> | |
| 360 | + <Compile Include="library\web\file_manager.anubis" /> | |
| 361 | + <Compile Include="library\web\generic_form.anubis" /> | |
| 362 | + <Compile Include="library\web\generic_login.anubis" /> | |
| 363 | + <Compile Include="library\web\generic_table.anubis" /> | |
| 364 | + <Compile Include="library\web\html.anubis" /> | |
| 365 | + <Compile Include="library\web\https_get.anubis" /> | |
| 366 | + <Compile Include="library\web\http_get.anubis" /> | |
| 367 | + <Compile Include="library\web\http_get_common.anubis" /> | |
| 368 | + <Compile Include="library\web\http_trace.anubis" /> | |
| 369 | + <Compile Include="library\web\kernel.anubis" /> | |
| 370 | + <Compile Include="library\web\making_a_web_site.anubis" /> | |
| 371 | + <Compile Include="library\web\making_forms.anubis" /> | |
| 372 | + <Compile Include="library\web\mime.anubis" /> | |
| 373 | + <Compile Include="library\web\modules.anubis" /> | |
| 374 | + <Compile Include="library\web\multihost_http_server.anubis" /> | |
| 375 | + <Compile Include="library\web\read_html.anubis" /> | |
| 376 | + <Compile Include="library\web\secure_action.anubis" /> | |
| 377 | + <Compile Include="library\web\service_machine.anubis" /> | |
| 378 | + <Compile Include="library\web\site_test.anubis" /> | |
| 379 | + <Compile Include="library\web\sokoban.anubis" /> | |
| 380 | + <Compile Include="library\web\torture_server.anubis" /> | |
| 381 | + <Compile Include="library\web\web_arg_encode.anubis" /> | |
| 382 | + <Compile Include="library\widgets3\5_ht.anubis" /> | |
| 383 | + <Compile Include="library\widgets3\box.anubis" /> | |
| 384 | + <Compile Include="library\widgets3\bubble.anubis" /> | |
| 385 | + <Compile Include="library\widgets3\button.anubis" /> | |
| 386 | + <Compile Include="library\widgets3\characters_example.anubis" /> | |
| 387 | + <Compile Include="library\widgets3\check_box.anubis" /> | |
| 388 | + <Compile Include="library\widgets3\colors.anubis" /> | |
| 389 | + <Compile Include="library\widgets3\desktop.anubis" /> | |
| 390 | + <Compile Include="library\widgets3\desktop_example.anubis" /> | |
| 391 | + <Compile Include="library\widgets3\drag_and_drop.anubis" /> | |
| 392 | + <Compile Include="library\widgets3\generic_editor.anubis" /> | |
| 393 | + <Compile Include="library\widgets3\generic_editor_example.anubis" /> | |
| 394 | + <Compile Include="library\widgets3\host_window.anubis" /> | |
| 395 | + <Compile Include="library\widgets3\hypertext.anubis" /> | |
| 396 | + <Compile Include="library\widgets3\image.anubis" /> | |
| 397 | + <Compile Include="library\widgets3\input.anubis" /> | |
| 398 | + <Compile Include="library\widgets3\map_list.anubis" /> | |
| 399 | + <Compile Include="library\widgets3\menus.anubis" /> | |
| 400 | + <Compile Include="library\widgets3\menu_manager.anubis" /> | |
| 401 | + <Compile Include="library\widgets3\o_essai.anubis" /> | |
| 402 | + <Compile Include="library\widgets3\o_hypertext.anubis" /> | |
| 403 | + <Compile Include="library\widgets3\resizer.anubis" /> | |
| 404 | + <Compile Include="library\widgets3\scrollbar.anubis" /> | |
| 405 | + <Compile Include="library\widgets3\simple_example.anubis" /> | |
| 406 | + <Compile Include="library\widgets3\simple_window.anubis" /> | |
| 407 | + <Compile Include="library\widgets3\space.anubis" /> | |
| 408 | + <Compile Include="library\widgets3\table.anubis" /> | |
| 409 | + <Compile Include="library\widgets3\table_example.anubis" /> | |
| 410 | + <Compile Include="library\widgets3\text.anubis" /> | |
| 411 | + <Compile Include="library\widgets3\tickets_holder.anubis" /> | |
| 412 | + <Compile Include="library\widgets3\tools.anubis" /> | |
| 413 | + <Compile Include="library\widgets3\trace.anubis" /> | |
| 414 | + <Compile Include="library\widgets3\tree_editor.anubis" /> | |
| 415 | + <Compile Include="library\widgets3\tree_editor_test.anubis" /> | |
| 416 | + <Compile Include="library\widgets3\try_ht.anubis" /> | |
| 417 | + <Compile Include="library\widgets3\ubiquity.anubis" /> | |
| 418 | + <Compile Include="library\widgets3\variable.anubis" /> | |
| 419 | + <Compile Include="library\widgets3\widget.anubis" /> | |
| 420 | + <Compile Include="library\widgets3\window.anubis" /> | |
| 421 | + <Compile Include="library\widgets4\background.anubis" /> | |
| 422 | + <Compile Include="library\widgets4\box.anubis" /> | |
| 423 | + <Compile Include="library\widgets4\bubble_manager.anubis" /> | |
| 424 | + <Compile Include="library\widgets4\bubble_manager_test.anubis" /> | |
| 425 | + <Compile Include="library\widgets4\button.anubis" /> | |
| 426 | + <Compile Include="library\widgets4\check_box.anubis" /> | |
| 427 | + <Compile Include="library\widgets4\desktop.anubis" /> | |
| 428 | + <Compile Include="library\widgets4\desktop_example.anubis" /> | |
| 429 | + <Compile Include="library\widgets4\detect_event.anubis" /> | |
| 430 | + <Compile Include="library\widgets4\host_window.anubis" /> | |
| 431 | + <Compile Include="library\widgets4\hypertext.anubis" /> | |
| 432 | + <Compile Include="library\widgets4\hypertext_test.anubis" /> | |
| 433 | + <Compile Include="library\widgets4\image.anubis" /> | |
| 434 | + <Compile Include="library\widgets4\make_tartan_files.anubis" /> | |
| 435 | + <Compile Include="library\widgets4\menus.anubis" /> | |
| 436 | + <Compile Include="library\widgets4\menu_manager.anubis" /> | |
| 437 | + <Compile Include="library\widgets4\menu_manager_test.anubis" /> | |
| 438 | + <Compile Include="library\widgets4\mouse_tracker.anubis" /> | |
| 439 | + <Compile Include="library\widgets4\radio_button.anubis" /> | |
| 440 | + <Compile Include="library\widgets4\radio_buttons_test.anubis" /> | |
| 441 | + <Compile Include="library\widgets4\resizer.anubis" /> | |
| 442 | + <Compile Include="library\widgets4\scrollbar.anubis" /> | |
| 443 | + <Compile Include="library\widgets4\simple_window.anubis" /> | |
| 444 | + <Compile Include="library\widgets4\space.anubis" /> | |
| 445 | + <Compile Include="library\widgets4\table.anubis" /> | |
| 446 | + <Compile Include="library\widgets4\tartan_generator.anubis" /> | |
| 447 | + <Compile Include="library\widgets4\tartan_generator_demo.anubis" /> | |
| 448 | + <Compile Include="library\widgets4\tests.anubis" /> | |
| 449 | + <Compile Include="library\widgets4\text.anubis" /> | |
| 450 | + <Compile Include="library\widgets4\text_input.anubis" /> | |
| 451 | + <Compile Include="library\widgets4\text_input_test.anubis" /> | |
| 452 | + <Compile Include="library\widgets4\ticket_keeper.anubis" /> | |
| 453 | + <Compile Include="library\widgets4\tools.anubis" /> | |
| 454 | + <Compile Include="library\widgets4\trace.anubis" /> | |
| 455 | + <Compile Include="library\widgets4\tree_editor.anubis" /> | |
| 456 | + <Compile Include="library\widgets4\tree_editor_test.anubis" /> | |
| 457 | + <Compile Include="library\widgets4\tree_node.anubis" /> | |
| 458 | + <Compile Include="library\widgets4\variable_widget.anubis" /> | |
| 459 | + <Compile Include="library\widgets4\widget.anubis" /> | |
| 460 | + <Compile Include="library\widgets4\widget_demo.anubis" /> | |
| 461 | + <Compile Include="library\widgets4\widget_test.anubis" /> | |
| 462 | + <Compile Include="library\widgets4\window.anubis" /> | |
| 463 | + <Compile Include="library\widgets4\window_test.anubis" /> | |
| 464 | + <Compile Include="library\xml\basic_xml_parser.anubis" /> | |
| 465 | + <Compile Include="library\xml\xml_parser.apg.anubis" /> | |
| 466 | + <Compile Include="src\generation\files.anubis" /> | |
| 467 | + <Compile Include="src\generation\header.anubis" /> | |
| 468 | + <Compile Include="src\generation\types.anubis" /> | |
| 469 | + <Compile Include="src\main.anubis" /> | |
| 470 | + <Compile Include="src\model.3.0.0.anubis" /> | |
| 471 | + <Compile Include="src\types\db_model.anubis" /> | |
| 472 | + <None Include="calexium_lib\.git" /> | |
| 473 | + <None Include="calexium_lib\.gitignore" /> | |
| 474 | + <None Include="calexium_lib\obj\unit_test.aproj.FileListAbsolute.txt" /> | |
| 475 | + <None Include="calexium_lib\unit_test.aproj" /> | |
| 476 | + <None Include="calexium_lib\unit_test.ide" /> | |
| 477 | + <None Include="calexium_lib\web\js\cxm_jquery_animate.js" /> | |
| 478 | + <None Include="library\cipher\test_quick_base64.a2a" /> | |
| 479 | + <None Include="library\compile_all.inproj" /> | |
| 480 | + <None Include="library\doc_tools\cows.jpg" /> | |
| 481 | + <None Include="library\doc_tools\fNScTnBA4MH-qH_w0pRfArXeeKE8.png" /> | |
| 482 | + <None Include="library\doc_tools\fq22PnfBrYNx2fPr8NQyxy5tdO_A.png" /> | |
| 483 | + <None Include="library\doc_tools\maml3_tutorial.html" /> | |
| 484 | + <None Include="library\doc_tools\maml3_tutorial.maml" /> | |
| 485 | + <None Include="library\doc_tools\maml3_tutorial.maml.html" /> | |
| 486 | + <None Include="library\doc_tools\maml3_tutorial.maml.pdf" /> | |
| 487 | + <None Include="library\doc_tools\maml3_tutorial.pdf" /> | |
| 488 | + <None Include="library\doc_tools\tNScTnBA4MH-qH_w0pRfArXeeKE8.png" /> | |
| 489 | + <None Include="library\examples\determinism.anubis.c" /> | |
| 490 | + <None Include="library\examples\for_loop.anubis.c" /> | |
| 491 | + <None Include="library\examples\graphism\image_samples\cows.jpg" /> | |
| 492 | + <None Include="library\examples\graphism\image_samples\farm.jpg" /> | |
| 493 | + <None Include="library\examples\graphism\image_samples\fingers.jpg" /> | |
| 494 | + <None Include="library\examples\graphism\image_samples\flowers.jpg" /> | |
| 495 | + <None Include="library\examples\graphism\image_samples\mountain.jpg" /> | |
| 496 | + <None Include="library\examples\graphism\image_samples\torrent.jpg" /> | |
| 497 | + <None Include="library\examples\mathematics\runge_kutta\runge_kutta.apg" /> | |
| 498 | + <None Include="library\examples\network\public\bambou.gif" /> | |
| 499 | + <None Include="library\examples\network\public\bleuc.gif" /> | |
| 500 | + <None Include="library\examples\network\public\bleuccloud.gif" /> | |
| 501 | + <None Include="library\examples\network\public\boule.gif" /> | |
| 502 | + <None Include="library\examples\network\public\button_prev.gif" /> | |
| 503 | + <None Include="library\examples\network\public\cloud.gif" /> | |
| 504 | + <None Include="library\examples\network\public\gboule.gif" /> | |
| 505 | + <None Include="library\examples\network\public\gtete.gif" /> | |
| 506 | + <None Include="library\examples\network\public\noir25.gif" /> | |
| 507 | + <None Include="library\examples\network\public\noir25cloud.gif" /> | |
| 508 | + <None Include="library\examples\network\public\tete.gif" /> | |
| 509 | + <None Include="library\examples\OOCounter.anubis.cpp" /> | |
| 510 | + <None Include="library\graphism\image_samples\cows.jpg" /> | |
| 511 | + <None Include="library\graphism\image_samples\farm.jpg" /> | |
| 512 | + <None Include="library\graphism\image_samples\fingers.jpg" /> | |
| 513 | + <None Include="library\graphism\image_samples\flowers.jpg" /> | |
| 514 | + <None Include="library\graphism\image_samples\mountain.jpg" /> | |
| 515 | + <None Include="library\graphism\image_samples\torrent.jpg" /> | |
| 516 | + <None Include="library\install_released_files.bat" /> | |
| 517 | + <None Include="library\install_test.bat" /> | |
| 518 | + <None Include="library\lexical_analysis\lexer_maker_v2_example.lexer" /> | |
| 519 | + <None Include="library\lexical_analysis\test.xml" /> | |
| 520 | + <None Include="library\locale\ISO-639-1 and ISO-639-2.txt" /> | |
| 521 | + <None Include="library\locale\ISO-639-2_values_8bits.txt" /> | |
| 522 | + <None Include="library\syntactic_analysis\anubis_output.anubis.test" /> | |
| 523 | + <None Include="library\syntactic_analysis\calculator_example.apg" /> | |
| 524 | + <None Include="library\syntactic_analysis\README" /> | |
| 525 | + <None Include="library\system_fonts\courier_bold_o_10.sf" /> | |
| 526 | + <None Include="library\system_fonts\courier_bold_o_12.sf" /> | |
| 527 | + <None Include="library\system_fonts\courier_bold_o_14.sf" /> | |
| 528 | + <None Include="library\system_fonts\courier_bold_o_18.sf" /> | |
| 529 | + <None Include="library\system_fonts\courier_bold_o_24.sf" /> | |
| 530 | + <None Include="library\system_fonts\courier_bold_o_8.sf" /> | |
| 531 | + <None Include="library\system_fonts\courier_bold_r_10.sf" /> | |
| 532 | + <None Include="library\system_fonts\courier_bold_r_12.sf" /> | |
| 533 | + <None Include="library\system_fonts\courier_bold_r_14.sf" /> | |
| 534 | + <None Include="library\system_fonts\courier_bold_r_18.sf" /> | |
| 535 | + <None Include="library\system_fonts\courier_bold_r_24.sf" /> | |
| 536 | + <None Include="library\system_fonts\courier_bold_r_8.sf" /> | |
| 537 | + <None Include="library\system_fonts\courier_medium_o_10.sf" /> | |
| 538 | + <None Include="library\system_fonts\courier_medium_o_12.sf" /> | |
| 539 | + <None Include="library\system_fonts\courier_medium_o_14.sf" /> | |
| 540 | + <None Include="library\system_fonts\courier_medium_o_18.sf" /> | |
| 541 | + <None Include="library\system_fonts\courier_medium_o_24.sf" /> | |
| 542 | + <None Include="library\system_fonts\courier_medium_o_8.sf" /> | |
| 543 | + <None Include="library\system_fonts\courier_medium_r_10.sf" /> | |
| 544 | + <None Include="library\system_fonts\courier_medium_r_12.sf" /> | |
| 545 | + <None Include="library\system_fonts\courier_medium_r_14.sf" /> | |
| 546 | + <None Include="library\system_fonts\courier_medium_r_18.sf" /> | |
| 547 | + <None Include="library\system_fonts\courier_medium_r_24.sf" /> | |
| 548 | + <None Include="library\system_fonts\courier_medium_r_8.sf" /> | |
| 549 | + <None Include="library\system_fonts\helvetica_bold_o_10.sf" /> | |
| 550 | + <None Include="library\system_fonts\helvetica_bold_o_12.sf" /> | |
| 551 | + <None Include="library\system_fonts\helvetica_bold_o_14.sf" /> | |
| 552 | + <None Include="library\system_fonts\helvetica_bold_o_18.sf" /> | |
| 553 | + <None Include="library\system_fonts\helvetica_bold_o_24.sf" /> | |
| 554 | + <None Include="library\system_fonts\helvetica_bold_o_8.sf" /> | |
| 555 | + <None Include="library\system_fonts\helvetica_bold_r_10.sf" /> | |
| 556 | + <None Include="library\system_fonts\helvetica_bold_r_12.sf" /> | |
| 557 | + <None Include="library\system_fonts\helvetica_bold_r_14.sf" /> | |
| 558 | + <None Include="library\system_fonts\helvetica_bold_r_18.sf" /> | |
| 559 | + <None Include="library\system_fonts\helvetica_bold_r_24.sf" /> | |
| 560 | + <None Include="library\system_fonts\helvetica_bold_r_8.sf" /> | |
| 561 | + <None Include="library\system_fonts\helvetica_medium_o_10.sf" /> | |
| 562 | + <None Include="library\system_fonts\helvetica_medium_o_12.sf" /> | |
| 563 | + <None Include="library\system_fonts\helvetica_medium_o_14.sf" /> | |
| 564 | + <None Include="library\system_fonts\helvetica_medium_o_18.sf" /> | |
| 565 | + <None Include="library\system_fonts\helvetica_medium_o_24.sf" /> | |
| 566 | + <None Include="library\system_fonts\helvetica_medium_o_8.sf" /> | |
| 567 | + <None Include="library\system_fonts\helvetica_medium_r_10.sf" /> | |
| 568 | + <None Include="library\system_fonts\helvetica_medium_r_12.sf" /> | |
| 569 | + <None Include="library\system_fonts\helvetica_medium_r_14.sf" /> | |
| 570 | + <None Include="library\system_fonts\helvetica_medium_r_18.sf" /> | |
| 571 | + <None Include="library\system_fonts\helvetica_medium_r_24.sf" /> | |
| 572 | + <None Include="library\system_fonts\helvetica_medium_r_8.sf" /> | |
| 573 | + <None Include="library\system_fonts\times_bold_i_10.sf" /> | |
| 574 | + <None Include="library\system_fonts\times_bold_i_12.sf" /> | |
| 575 | + <None Include="library\system_fonts\times_bold_i_14.sf" /> | |
| 576 | + <None Include="library\system_fonts\times_bold_i_18.sf" /> | |
| 577 | + <None Include="library\system_fonts\times_bold_i_24.sf" /> | |
| 578 | + <None Include="library\system_fonts\times_bold_i_8.sf" /> | |
| 579 | + <None Include="library\system_fonts\times_bold_r_10.sf" /> | |
| 580 | + <None Include="library\system_fonts\times_bold_r_12.sf" /> | |
| 581 | + <None Include="library\system_fonts\times_bold_r_14.sf" /> | |
| 582 | + <None Include="library\system_fonts\times_bold_r_18.sf" /> | |
| 583 | + <None Include="library\system_fonts\times_bold_r_24.sf" /> | |
| 584 | + <None Include="library\system_fonts\times_bold_r_8.sf" /> | |
| 585 | + <None Include="library\system_fonts\times_medium_i_10.sf" /> | |
| 586 | + <None Include="library\system_fonts\times_medium_i_12.sf" /> | |
| 587 | + <None Include="library\system_fonts\times_medium_i_14.sf" /> | |
| 588 | + <None Include="library\system_fonts\times_medium_i_18.sf" /> | |
| 589 | + <None Include="library\system_fonts\times_medium_i_24.sf" /> | |
| 590 | + <None Include="library\system_fonts\times_medium_i_8.sf" /> | |
| 591 | + <None Include="library\system_fonts\times_medium_r_10.sf" /> | |
| 592 | + <None Include="library\system_fonts\times_medium_r_12.sf" /> | |
| 593 | + <None Include="library\system_fonts\times_medium_r_14.sf" /> | |
| 594 | + <None Include="library\system_fonts\times_medium_r_18.sf" /> | |
| 595 | + <None Include="library\system_fonts\times_medium_r_24.sf" /> | |
| 596 | + <None Include="library\system_fonts\times_medium_r_8.sf" /> | |
| 597 | + <None Include="library\test\Anubis UnitTest.aproj" /> | |
| 598 | + <None Include="library\test\Anubis UnitTest.ide" /> | |
| 599 | + <None Include="library\test\duplicate_letters.c" /> | |
| 600 | + <None Include="library\tools\maml.anubis.1" /> | |
| 601 | + <None Include="library\tools\safe_save_retrieve.anubis_back" /> | |
| 602 | + <None Include="library\web\spacer.gif" /> | |
| 603 | + <None Include="library\widgets3\alienor.jpg" /> | |
| 604 | + <None Include="library\widgets3\alienor_aquitaine.jpg" /> | |
| 605 | + <None Include="library\widgets3\anubis.jpg" /> | |
| 606 | + <None Include="library\widgets3\flowers.jpg" /> | |
| 607 | + <None Include="library\widgets3\gisant_alienor.jpg" /> | |
| 608 | + <None Include="library\widgets3\gisant_alienor2.jpg" /> | |
| 609 | + <None Include="library\widgets3\henri_2.jpg" /> | |
| 610 | + <None Include="library\widgets3\john_lackland.jpg" /> | |
| 611 | + <None Include="library\widgets3\old_sarum.jpg" /> | |
| 612 | + <None Include="library\widgets3\richard.jpg" /> | |
| 613 | + <None Include="library\widgets4\images\bidon.jpg" /> | |
| 614 | + <None Include="library\widgets4\images\checked.jpg" /> | |
| 615 | + <None Include="library\widgets4\images\cows.jpg" /> | |
| 616 | + <None Include="library\widgets4\images\farm.jpg" /> | |
| 617 | + <None Include="library\widgets4\images\fingers.jpg" /> | |
| 618 | + <None Include="library\widgets4\images\flowers.jpg" /> | |
| 619 | + <None Include="library\widgets4\images\mountain.jpg" /> | |
| 620 | + <None Include="library\widgets4\images\not_checked.jpg" /> | |
| 621 | + <None Include="library\widgets4\images\torrent.jpg" /> | |
| 622 | + <None Include="library\xml\xml_parser.apg" /> | |
| 623 | + </ItemGroup> | |
| 624 | + <ItemGroup> | |
| 625 | + <Folder Include="calexium_lib" /> | |
| 626 | + <Folder Include="calexium_lib\asterisk" /> | |
| 627 | + <Folder Include="calexium_lib\database" /> | |
| 628 | + <Folder Include="calexium_lib\extensions" /> | |
| 629 | + <Folder Include="calexium_lib\mail" /> | |
| 630 | + <Folder Include="calexium_lib\mail\lexers" /> | |
| 631 | + <Folder Include="calexium_lib\network" /> | |
| 632 | + <Folder Include="calexium_lib\net_services" /> | |
| 633 | + <Folder Include="calexium_lib\net_services_protocols" /> | |
| 634 | + <Folder Include="calexium_lib\obj" /> | |
| 635 | + <Folder Include="calexium_lib\os_tools" /> | |
| 636 | + <Folder Include="calexium_lib\os_tools\freebsd" /> | |
| 637 | + <Folder Include="calexium_lib\os_tools\linux" /> | |
| 638 | + <Folder Include="calexium_lib\os_tools\linux\config" /> | |
| 639 | + <Folder Include="calexium_lib\unit_test" /> | |
| 640 | + <Folder Include="calexium_lib\web" /> | |
| 641 | + <Folder Include="calexium_lib\web\jQuery" /> | |
| 642 | + <Folder Include="calexium_lib\web\jQuery\ui-addon" /> | |
| 643 | + <Folder Include="calexium_lib\web\js" /> | |
| 644 | + <Folder Include="calexium_lib\web\widgets" /> | |
| 645 | + <Folder Include="library" /> | |
| 646 | + <Folder Include="library\a2a" /> | |
| 647 | + <Folder Include="library\a2a\C" /> | |
| 648 | + <Folder Include="library\a2a\generic" /> | |
| 649 | + <Folder Include="library\charset" /> | |
| 650 | + <Folder Include="library\cipher" /> | |
| 651 | + <Folder Include="library\converters" /> | |
| 652 | + <Folder Include="library\data_base" /> | |
| 653 | + <Folder Include="library\doc_tools" /> | |
| 654 | + <Folder Include="library\examples" /> | |
| 655 | + <Folder Include="library\examples\cryptography" /> | |
| 656 | + <Folder Include="library\examples\graphism" /> | |
| 657 | + <Folder Include="library\examples\graphism\image_samples" /> | |
| 658 | + <Folder Include="library\examples\lexical_analysis" /> | |
| 659 | + <Folder Include="library\examples\logic" /> | |
| 660 | + <Folder Include="library\examples\mathematics" /> | |
| 661 | + <Folder Include="library\examples\mathematics\runge_kutta" /> | |
| 662 | + <Folder Include="library\examples\network" /> | |
| 663 | + <Folder Include="library\examples\network\public" /> | |
| 664 | + <Folder Include="library\examples\system" /> | |
| 665 | + <Folder Include="library\graphism" /> | |
| 666 | + <Folder Include="library\graphism\image_samples" /> | |
| 667 | + <Folder Include="library\lexical_analysis" /> | |
| 668 | + <Folder Include="library\locale" /> | |
| 669 | + <Folder Include="library\mail" /> | |
| 670 | + <Folder Include="library\network" /> | |
| 671 | + <Folder Include="library\syntactic_analysis" /> | |
| 672 | + <Folder Include="library\system" /> | |
| 673 | + <Folder Include="library\system\parameter" /> | |
| 674 | + <Folder Include="library\system_colors" /> | |
| 675 | + <Folder Include="library\system_fonts" /> | |
| 676 | + <Folder Include="library\test" /> | |
| 677 | + <Folder Include="library\test\lexical_analysis" /> | |
| 678 | + <Folder Include="library\test\predefined" /> | |
| 679 | + <Folder Include="library\test\system" /> | |
| 680 | + <Folder Include="library\test\tools" /> | |
| 681 | + <Folder Include="library\tools" /> | |
| 682 | + <Folder Include="library\version2" /> | |
| 683 | + <Folder Include="library\vm" /> | |
| 684 | + <Folder Include="library\web" /> | |
| 685 | + <Folder Include="library\widgets3" /> | |
| 686 | + <Folder Include="library\widgets4" /> | |
| 687 | + <Folder Include="library\widgets4\images" /> | |
| 688 | + <Folder Include="library\xml" /> | |
| 689 | + <Folder Include="src" /> | |
| 690 | + <Folder Include="src\generation" /> | |
| 691 | + <Folder Include="src\types" /> | |
| 692 | + </ItemGroup> | |
| 693 | +</Project> | |
| 0 | 694 | \ No newline at end of file | ... | ... |
| 1 | +++ a/model_manager.ide | |
| 1 | + | |
| 2 | +Microsoft Visual Studio Solution File, Format Version 9.00 | |
| 3 | +# Visual Studio 2005 | |
| 4 | +# SharpDevelop 1.0.12.108 | |
| 5 | +Project("{B6712916-30DE-4a3e-A54C-2A79AC984AEE}") = "model_manager", "model_manager.aproj", "{89372B21-80FA-4EB8-B17C-072EB55713D6}" | |
| 6 | +EndProject | |
| 7 | +Global | |
| 8 | + GlobalSection(SolutionConfigurationPlatforms) = preSolution | |
| 9 | + Debug|Any CPU = Debug|Any CPU | |
| 10 | + Release|Any CPU = Release|Any CPU | |
| 11 | + EndGlobalSection | |
| 12 | + GlobalSection(ProjectConfigurationPlatforms) = postSolution | |
| 13 | + {89372B21-80FA-4EB8-B17C-072EB55713D6}.Debug|Any CPU.Build.0 = Debug|Any CPU | |
| 14 | + {89372B21-80FA-4EB8-B17C-072EB55713D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |
| 15 | + {89372B21-80FA-4EB8-B17C-072EB55713D6}.Release|Any CPU.Build.0 = Release|Any CPU | |
| 16 | + {89372B21-80FA-4EB8-B17C-072EB55713D6}.Release|Any CPU.ActiveCfg = Release|Any CPU | |
| 17 | + EndGlobalSection | |
| 18 | +EndGlobal | ... | ... |
| 1 | +++ a/src/generation/files.anubis | |
| 1 | +/* | |
| 2 | + * Created by PyramIDE. | |
| 3 | + * User: フランスのトトロ | |
| 4 | + * Date: 31/12/2015 | |
| 5 | + * Time: 09:29 | |
| 6 | + * © Calexium | |
| 7 | + */ | |
| 8 | + | |
| 9 | +read system/string.anubis | |
| 10 | + | |
| 11 | +read types/db_model.anubis | |
| 12 | +read tools/basis.anubis | |
| 13 | +read tools/streams.anubis | |
| 14 | +read tools/ISO-8601.anubis | |
| 15 | +read generation/header.anubis | |
| 16 | +read generation/types.anubis | |
| 17 | + | |
| 18 | +define Maybe(One) | |
| 19 | + generate_table | |
| 20 | + ( | |
| 21 | + DB_Table table | |
| 22 | + ) | |
| 23 | + = | |
| 24 | + since table is db_table(name, model, display), | |
| 25 | + since model is db_model(columns, show_string), | |
| 26 | + println("Generating file for table ["+name+"]"); | |
| 27 | + with file_name = name+".anubis", | |
| 28 | + if file(file_name, new) is | |
| 29 | + { | |
| 30 | + failure then println("can't create file "+file_name);failure, | |
| 31 | + success(fd) then | |
| 32 | + with strm = make_stream(fd), | |
| 33 | + if generate_header(strm, columns) is { failure then failure, success(_) then | |
| 34 | + if generate_type(strm, table) is { failure then failure, success(_) then | |
| 35 | + if generate_get_default(strm, table) is { failure then failure, success(_) then | |
| 36 | + if generate_extract_web_arg(strm, table) is { failure then failure, success(_) then | |
| 37 | + if generate_extract_db_cursor(strm, table) is { failure then failure, success(_) then | |
| 38 | + if generate_get_all(strm, table) is { failure then failure, success(_) then | |
| 39 | + if generate_get_one(strm, table) is { failure then failure, success(_) then | |
| 40 | + if generate_update(strm, table) is { failure then failure, success(_) then | |
| 41 | + if generate_show_string(strm, table) is { failure then failure, success(_) then | |
| 42 | + if generate_VT_view(strm, table) is { failure then failure, success(_) then | |
| 43 | + if generate_VT_edit(strm, table) is { failure then failure, success(_) then | |
| 44 | + success(unique)}}}}}}}}}}} | |
| 45 | + }. | |
| 46 | + | |
| 47 | +define One | |
| 48 | + make_all_tables | |
| 49 | + ( | |
| 50 | + List(DB_Table) tables //list of the table model description | |
| 51 | + ) | |
| 52 | + = | |
| 53 | + if tables is | |
| 54 | + { | |
| 55 | + [] then println("Generation finished"), | |
| 56 | + [h . t] then | |
| 57 | + if generate_table(h) is | |
| 58 | + { | |
| 59 | + failure then println("Generation error") | |
| 60 | + success(_) then make_all_tables(t) | |
| 61 | + } | |
| 62 | + }. | |
| 63 | + | |
| 64 | +define Maybe(One) | |
| 65 | + generate_vtm_file | |
| 66 | + ( | |
| 67 | + List(String) transmit, | |
| 68 | + List(String) view, | |
| 69 | + List(String) edit, | |
| 70 | + List(String) writer | |
| 71 | + )= | |
| 72 | + with file_name = "vtm.anubis", | |
| 73 | + if file(file_name, new) is | |
| 74 | + { | |
| 75 | + failure then println("can't create file "+file_name);failure, | |
| 76 | + success(fd) then | |
| 77 | + if write_string(make_stream(fd), | |
| 78 | +"/* | |
| 79 | + * Created by model_manager. | |
| 80 | + * User: Automat | |
| 81 | + * Date: "+_Int_to_ISO_8601_date(now)+" | |
| 82 | + * Time: "+_Int_to_ISO_8601_time(now)+" | |
| 83 | + * | |
| 84 | + */ | |
| 85 | +read tools/basis.anubis | |
| 86 | +read tools/base_tools.anubis | |
| 87 | +read calexium_lib/database/vtm/view_table_manager_types.anubis\n"+ | |
| 88 | +join("\n", transmit)+"\n\n"+ | |
| 89 | +"public define List(VTM_view)\n"+ | |
| 90 | +" generated_vtm_view_list =\n"+ | |
| 91 | +" [\n "+join(",\n ",view)+"\n"+ | |
| 92 | +" ].\n\n"+ | |
| 93 | +"public define List(VTM_edit)\n"+ | |
| 94 | +" generated_vtm_edit_list =\n"+ | |
| 95 | +" [\n "+join(",\n ",edit)+"\n"+ | |
| 96 | +" ].\n\n"+ | |
| 97 | +"public define List(TM_writer)\n"+ | |
| 98 | +" generated_tm_writer_list =\n"+ | |
| 99 | +" [\n "+join(",\n ",writer)+"\n"+ | |
| 100 | +" ].\n\n" | |
| 101 | + ) is //end of the function | |
| 102 | + { | |
| 103 | + failure then println("can't write vtm "); failure, | |
| 104 | + success(_) then success(unique) | |
| 105 | + }}. | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | +define One | |
| 110 | + _make_vtm | |
| 111 | + ( | |
| 112 | + List(DB_Table) tables, //list of the table model description | |
| 113 | + List(String) so_far_transmit, | |
| 114 | + List(String) so_far_view, | |
| 115 | + List(String) so_far_edit, | |
| 116 | + List(String) so_far_writer | |
| 117 | + )= | |
| 118 | + if tables is | |
| 119 | + { | |
| 120 | + [] then forget(generate_vtm_file(so_far_transmit, so_far_view, so_far_edit, so_far_writer));println("Generation finished"), | |
| 121 | + [table . t] then | |
| 122 | + since table is db_table(name, _, _), | |
| 123 | + with transmit = "transmit "+name+".anubis", | |
| 124 | + with view = "vtm_view(\""+name+"\", get_viewable_"+name+")", | |
| 125 | + with edit = "vtm_edit(\""+name+"\", get_editable_"+name+")", | |
| 126 | + with writer = "tm_writer(\""+name+"\", update_"+name+")", | |
| 127 | + | |
| 128 | + _make_vtm(t, [transmit . so_far_transmit], [view . so_far_view], [edit . so_far_edit], [writer . so_far_writer]) | |
| 129 | + }. | |
| 130 | + | |
| 131 | +define One | |
| 132 | + make_vtm | |
| 133 | + ( | |
| 134 | + List(DB_Table) tables //list of the table model description | |
| 135 | + ) | |
| 136 | + = | |
| 137 | + _make_vtm(tables, [], [], [], []). | |
| 138 | + | |
| 139 | + | |
| 140 | +public define One | |
| 141 | + generate_model_files | |
| 142 | + ( | |
| 143 | + DB_Database database //database model description | |
| 144 | + )= | |
| 145 | + since database is db_database(name, tables), | |
| 146 | + println("Generating models for Database "+name); | |
| 147 | + make_all_tables(tables); | |
| 148 | + println("Generating VTM for Database "+name); | |
| 149 | + make_vtm(tables). | |
| 150 | + | ... | ... |
| 1 | +++ a/src/generation/header.anubis | |
| 1 | +/* | |
| 2 | + * Created by PyramIDE. | |
| 3 | + * User: フランスのトトロ | |
| 4 | + * Date: 31/12/2015 | |
| 5 | + * Time: 13:42 | |
| 6 | + * © Calexium | |
| 7 | + */ | |
| 8 | + | |
| 9 | +read types/db_model.anubis | |
| 10 | +read tools/basis.anubis | |
| 11 | +read tools/streams.anubis | |
| 12 | +read tools/ISO-8601.anubis | |
| 13 | + | |
| 14 | +define Maybe(One) | |
| 15 | + foreign_table_header | |
| 16 | + ( | |
| 17 | + Stream stream, | |
| 18 | + List(DB_Model_Column) columns | |
| 19 | + )= | |
| 20 | + if columns is | |
| 21 | + { | |
| 22 | + [] then success(unique), | |
| 23 | + [h . t] then | |
| 24 | + since h is db_column(_, type, _), | |
| 25 | + if type is foreign_key(table_name) then | |
| 26 | + if write_string(stream, "\nread database/generated/"+table_name+".anubis") is | |
| 27 | + { | |
| 28 | + failure then failure, | |
| 29 | + success(_) then foreign_table_header(stream, t) | |
| 30 | + } | |
| 31 | + else | |
| 32 | + foreign_table_header(stream, t) | |
| 33 | + } | |
| 34 | + . | |
| 35 | + | |
| 36 | + List(MetaSQL_ColStruct) | |
| 37 | + | |
| 38 | +public define Maybe(One) | |
| 39 | + generate_header | |
| 40 | + ( | |
| 41 | + Stream stream, | |
| 42 | + List(DB_Model_Column) columns | |
| 43 | + | |
| 44 | + )= | |
| 45 | + if write_string(stream, | |
| 46 | +"/* | |
| 47 | + * Created by model_manager. | |
| 48 | + * User: Automat | |
| 49 | + * Date: "+_Int_to_ISO_8601_date(now)+" | |
| 50 | + * Time: "+_Int_to_ISO_8601_time(now)+" | |
| 51 | + * | |
| 52 | + */ | |
| 53 | +read tools/basis.anubis | |
| 54 | +read tools/base_tools.anubis | |
| 55 | + | |
| 56 | +read calexium_lib/web/CXM_making_a_web_site.anubis | |
| 57 | +read calexium_lib/web/CXM_common.anubis | |
| 58 | +read calexium_lib/web/CXM_web_dump.anubis | |
| 59 | +read calexium_lib/web/CXM_web_arg_utils.anubis | |
| 60 | +read data_base/sqlite.anubis | |
| 61 | +read data_base/db_tools.anubis | |
| 62 | +read calexium_lib/database/db_utils.anubis | |
| 63 | +read calexium_lib/database/db_types.anubis | |
| 64 | +read calexium_lib/database/vtm/view_table_types.anubis | |
| 65 | + | |
| 66 | +read system/logger.anubis | |
| 67 | +read system/datetime.anubis | |
| 68 | +read system/convert.anubis | |
| 69 | +read system/string.anubis | |
| 70 | + | |
| 71 | +read calexium_lib/net_services_protocols/logger_service.anubis | |
| 72 | +read app/app_loggers.anubis | |
| 73 | + | |
| 74 | +") is failure then failure else | |
| 75 | + foreign_table_header(stream, columns) | |
| 76 | + . | |
| 77 | + | ... | ... |
| 1 | +++ a/src/generation/types.anubis | |
| 1 | +/* | |
| 2 | + * Created by PyramIDE. | |
| 3 | + * User: フランスのトトロ | |
| 4 | + * Date: 31/12/2015 | |
| 5 | + * Time: 16:18 | |
| 6 | + * © Calexium | |
| 7 | + */ | |
| 8 | + | |
| 9 | +read types/db_model.anubis | |
| 10 | +read tools/basis.anubis | |
| 11 | +read tools/streams.anubis | |
| 12 | +read system/string.anubis | |
| 13 | + | |
| 14 | + | |
| 15 | +define List(String) | |
| 16 | +/** | |
| 17 | + */ | |
| 18 | + _generate_type | |
| 19 | + ( | |
| 20 | + List(DB_Model_Column) columns, | |
| 21 | + List(String) so_far | |
| 22 | + )= | |
| 23 | + if columns is | |
| 24 | + { | |
| 25 | + [] then reverse(so_far), | |
| 26 | + [h . t ] then | |
| 27 | + since h is db_column(name, col_type, _), | |
| 28 | + _generate_type(t, [ " "+fill(to_Anubis_type(col_type), 12) + " " + name . so_far]) | |
| 29 | + }. | |
| 30 | + | |
| 31 | +public define Maybe(One) | |
| 32 | + generate_type | |
| 33 | + ( | |
| 34 | + Stream stream, | |
| 35 | + DB_Table table | |
| 36 | + )= | |
| 37 | + since table is db_table(name, model, display), | |
| 38 | + since model is db_model(columns, show_string), | |
| 39 | + with type_name = to_upper(name, 1), //make the first character to upper case to able to be a Anubis Type. | |
| 40 | + | |
| 41 | + //generate the type of the db_table that contain all components | |
| 42 | + if write_string(stream, | |
| 43 | + "\n\npublic type "+type_name+":\n "+name+"\n (\n"+ //head of the type declaration | |
| 44 | + join(",\n",_generate_type(columns, []))+ //all components of the type | |
| 45 | + "\n ).\n") is //end of declaration | |
| 46 | + { | |
| 47 | + failure then println("can't write type "+type_name); failure, | |
| 48 | + success(_) then success(unique) | |
| 49 | + }. | |
| 50 | + | |
| 51 | +define List(String) | |
| 52 | +/** | |
| 53 | + */ | |
| 54 | + _generate_get_default | |
| 55 | + ( | |
| 56 | + List(DB_Model_Column) columns, | |
| 57 | + List(String) so_far | |
| 58 | + )= | |
| 59 | + if columns is | |
| 60 | + { | |
| 61 | + [] then reverse(so_far), | |
| 62 | + [h . t ] then | |
| 63 | + since h is db_column(name, col_type, _), | |
| 64 | + _generate_get_default(t, [ to_Anubis_default(col_type) . so_far]) | |
| 65 | + }. | |
| 66 | +public define Maybe(One) | |
| 67 | + generate_get_default | |
| 68 | + ( | |
| 69 | + Stream stream, | |
| 70 | + DB_Table table | |
| 71 | + )= | |
| 72 | + since table is db_table(name, model, _), | |
| 73 | + since model is db_model(columns, show_string), | |
| 74 | + with type_name = to_upper(name, 1), //make the first character to upper case to able to be a Anubis Type. | |
| 75 | + | |
| 76 | + //generate the type of the table that contain all components | |
| 77 | + if write_string(stream, | |
| 78 | + "\n\ndefine "+type_name+"\n get_default_"+name+" =\n "+name+"("+ //head of the definition | |
| 79 | + join(", ",_generate_get_default(columns, []))+ //all components of the type | |
| 80 | + ").\n") is //end of the function | |
| 81 | + { | |
| 82 | + failure then println("can't write get_default "+type_name); failure, | |
| 83 | + success(_) then success(unique) | |
| 84 | + }. | |
| 85 | + | |
| 86 | +define (List(String), Int) | |
| 87 | +/** | |
| 88 | + */ | |
| 89 | + _generate_extract_web_arg | |
| 90 | + ( | |
| 91 | + List(DB_Model_Column) columns, | |
| 92 | + List(String) so_far, | |
| 93 | + Int closure | |
| 94 | + )= | |
| 95 | + if columns is | |
| 96 | + { | |
| 97 | + [] then (reverse(so_far), closure), | |
| 98 | + [h . t ] then | |
| 99 | + since h is db_column(name, col_type, _), | |
| 100 | + with result = from_web_arg(col_type, name), | |
| 101 | + //If the field is not editable no need to get it from the web | |
| 102 | + if result = "" then | |
| 103 | + _generate_extract_web_arg(t, so_far, closure) | |
| 104 | + else | |
| 105 | + if start_with(result, "with") then | |
| 106 | + _generate_extract_web_arg(t, [ " "+result . so_far], closure) | |
| 107 | + else | |
| 108 | + with line = " if "+fill(result, 45)+" is {failure then failure, "+fill("success("+name+")",25)+" then", | |
| 109 | + _generate_extract_web_arg(t, [ line . so_far], closure+1) | |
| 110 | + }. | |
| 111 | + | |
| 112 | +public define Maybe(One) | |
| 113 | + generate_extract_web_arg | |
| 114 | + ( | |
| 115 | + Stream stream, | |
| 116 | + DB_Table table | |
| 117 | + )= | |
| 118 | + since table is db_table(name, model, _), | |
| 119 | + since model is db_model(columns, _), | |
| 120 | + with type_name = to_upper(name, 1), //make the first character to upper case to able to be a Anubis Type. | |
| 121 | + since _generate_extract_web_arg(columns, [], 0) is ((List(String))list_of_web_arg, (Int) nb_closure), | |
| 122 | + //generate the type of the table that contain all components | |
| 123 | + if write_string(stream, | |
| 124 | + "\n\ndefine Maybe("+type_name+")\n extract_from_web_arg\n (\n List(Web_arg) lwa\n )=\n"+ //head of the definition | |
| 125 | + to_String(list_of_web_arg)+ //all editable components of the type | |
| 126 | + " success(\n"+generate_constructor(name, columns, " ")+")\n"+ //generate type construction with values got from web arg | |
| 127 | + " "+fill(nb_closure, '}')+ //add close } according to number of web arg | |
| 128 | + ".\n") is //end of the function | |
| 129 | + { | |
| 130 | + failure then println("can't write extract_from_web_arg "+type_name); failure, | |
| 131 | + success(_) then success(unique) | |
| 132 | + }. | |
| 133 | + | |
| 134 | +public define Maybe(One) | |
| 135 | + generate_extract_db_cursor | |
| 136 | + ( | |
| 137 | + Stream stream, | |
| 138 | + DB_Table table | |
| 139 | + )= | |
| 140 | + since table is db_table(name, model, display), | |
| 141 | + since model is db_model(columns, _), | |
| 142 | + with type_name = to_upper(name, 1), //make the first character to upper case to able to be a Anubis Type. | |
| 143 | + | |
| 144 | + //generate the type of the table that contain all components | |
| 145 | + if write_string(stream, | |
| 146 | + "\n\n"+ | |
| 147 | + "define Maybe("+type_name+")\n"+ | |
| 148 | + " extract_"+name+"\n"+ | |
| 149 | + " (\n"+ | |
| 150 | + " One -> SQLite3Row table_cursor\n"+ | |
| 151 | + " ) =\n"+ | |
| 152 | + " if table_cursor(unique) is\n"+ | |
| 153 | + " {\n"+ | |
| 154 | + " error(sql_error) then println(db_error(sql_error, \"extract_"+name+"\")); failure,\n"+ | |
| 155 | + " no_more_row then failure,\n"+ | |
| 156 | + " row(cursor) then\n"+ | |
| 157 | + " success(\n"+generate_constructor_from_cursor(name, "cursor", columns, " ")+")\n"+ //generate type construction with values got from web arg | |
| 158 | + " }.\n") is //end of the function | |
| 159 | + { | |
| 160 | + failure then println("can't write generate_extract_db_cursor "+type_name); failure, | |
| 161 | + success(_) then success(unique) | |
| 162 | + }. | |
| 163 | + | |
| 164 | + | |
| 165 | +public define Maybe(One) | |
| 166 | + generate_get_all | |
| 167 | + ( | |
| 168 | + Stream stream, | |
| 169 | + DB_Table table | |
| 170 | + )= | |
| 171 | + since table is db_table(name, model, _), | |
| 172 | + since model is db_model(columns, _), | |
| 173 | + with type_name = to_upper(name, 1), //make the first character to upper case to able to be a Anubis Type. | |
| 174 | + | |
| 175 | + //generate the type of the table that contain all components | |
| 176 | + if write_string(stream, | |
| 177 | + "\n\n"+ | |
| 178 | + "define List("+type_name+")\n"+ | |
| 179 | + " _get_all_"+name+"\n"+ | |
| 180 | + " (\n"+ | |
| 181 | + " One -> SQLite3Row table_cursor,\n"+ | |
| 182 | + " List("+type_name+") so_far\n"+ | |
| 183 | + " ) =\n"+ | |
| 184 | + " if extract_"+name+"(table_cursor) is\n"+ | |
| 185 | + " {\n"+ | |
| 186 | + " failure then reverse(so_far),\n"+ | |
| 187 | + " success(data) then _get_all_"+name+"(table_cursor, [data . so_far])\n"+ | |
| 188 | + " }.\n"+ | |
| 189 | + "\n\n"+ | |
| 190 | + //SQL query | |
| 191 | + "public define List("+type_name+")\n"+ | |
| 192 | + " get_all_"+name+"\n"+ | |
| 193 | + " (\n"+ | |
| 194 | + " SQLite3DataBase db,\n"+ | |
| 195 | + " )=\n"+ | |
| 196 | + " if sql_query_timeout(db, \"SELECT "+join(", ", components(columns, []))+" FROM "+name+";\", [], \"get_all_"+name+"\") is\n"+ | |
| 197 | + " {\n"+ | |
| 198 | + " error(_) then [],\n"+ | |
| 199 | + " ok(_, cursor, _) then _get_all_"+name+"(cursor, [])\n"+ | |
| 200 | + " }.\n" | |
| 201 | + | |
| 202 | + ) is //end of the function | |
| 203 | + { | |
| 204 | + failure then println("can't write generate_get_all "+type_name); failure, | |
| 205 | + success(_) then success(unique) | |
| 206 | + }. | |
| 207 | + | |
| 208 | +public define Maybe(One) | |
| 209 | + generate_get_one | |
| 210 | + ( | |
| 211 | + Stream stream, | |
| 212 | + DB_Table table | |
| 213 | + )= | |
| 214 | + since table is db_table(name, model, _), | |
| 215 | + since model is db_model(columns, show_string), | |
| 216 | + with type_name = to_upper(name, 1), //make the first character to upper case to able to be a Anubis Type. | |
| 217 | + | |
| 218 | + //generate the type of the table that contain all components | |
| 219 | + if write_string(stream, | |
| 220 | + "\n\n"+ | |
| 221 | + //SQL query | |
| 222 | + "public define Maybe("+type_name+")\n"+ | |
| 223 | + " get_"+name+"\n"+ | |
| 224 | + " (\n"+ | |
| 225 | + " SQLite3DataBase db,\n"+ | |
| 226 | + " String idx\n"+ | |
| 227 | + " )=\n"+ | |
| 228 | + " if sql_query_timeout(db, \"SELECT "+join(", ", components(columns, []))+" FROM "+name+" WHERE id=\"+idx+\";\", [], \"get_"+name+"\") is\n"+ | |
| 229 | + " {\n"+ | |
| 230 | + " error(_) then failure,\n"+ | |
| 231 | + " ok(_, cursor, _) then extract_"+name+"(cursor)\n"+ | |
| 232 | + " }.\n\n"+ | |
| 233 | + //SQL query | |
| 234 | + "public define Maybe("+type_name+")\n"+ | |
| 235 | + " get_"+name+"\n"+ | |
| 236 | + " (\n"+ | |
| 237 | + " SQLite3DataBase db,\n"+ | |
| 238 | + " Int idx\n"+ | |
| 239 | + " )=\n"+ | |
| 240 | + " get_"+name+"(db, to_decimal(idx))." | |
| 241 | + ) is //end of the function | |
| 242 | + { | |
| 243 | + failure then println("can't write generate_get_one "+type_name); failure, | |
| 244 | + success(_) then success(unique) | |
| 245 | + }. | |
| 246 | + | |
| 247 | + | |
| 248 | +public define Maybe(One) | |
| 249 | + generate_update | |
| 250 | + ( | |
| 251 | + Stream stream, | |
| 252 | + DB_Table table | |
| 253 | + )= | |
| 254 | + since table is db_table(name, model, _), | |
| 255 | + since model is db_model( columns, _), | |
| 256 | + with type_name = to_upper(name, 1), //make the first character to upper case to able to be a Anubis Type. | |
| 257 | + | |
| 258 | + //generate the type of the table that contain all components | |
| 259 | + if write_string(stream, | |
| 260 | + "\n\n"+ | |
| 261 | + //SQL query | |
| 262 | + "public define One\n"+ | |
| 263 | + " update_"+name+"\n"+ | |
| 264 | + " (\n"+ | |
| 265 | + " SQLite3DataBase db,\n"+ | |
| 266 | + " "+type_name+" "+name+"\n"+ | |
| 267 | + " )=\n"+ | |
| 268 | + " if "+name+".id is\n"+ | |
| 269 | + " {\n"+ | |
| 270 | + //INSERT SQL query | |
| 271 | + " none then\n"+ | |
| 272 | + " forget(sql_query_timeout(db,\n"+ | |
| 273 | + " \"INSERT INTO "+name+"\n"+ | |
| 274 | + insert_values(columns, " ")+";\",\n"+ | |
| 275 | + generate_Bind_list(columns, name, " ", true)+",\n"+ | |
| 276 | + " \"update_"+name+" (INSERT)\")),\n"+ | |
| 277 | + //UPDATE SQL query | |
| 278 | + " db_id(idx) then\n"+ | |
| 279 | + " forget(sql_query_timeout(db,\n"+ | |
| 280 | + " \"UPDATE "+name+" SET\n"+ | |
| 281 | + update_values(columns, " ")+"\n"+ | |
| 282 | + " WHERE id = \"+idx+\";\",\n"+ | |
| 283 | + generate_Bind_list(columns, name, " ", false)+",\n"+ | |
| 284 | + " \"update_"+name+" (UPDATE)\"))\n"+ | |
| 285 | + " }.\n\n"+ | |
| 286 | + "public define Maybe(One)\n"+ | |
| 287 | + " update_"+name+"\n"+ | |
| 288 | + " (\n"+ | |
| 289 | + " SQLite3DataBase db,\n"+ | |
| 290 | + " List(Web_arg) lwa\n"+ | |
| 291 | + " )=\n"+ | |
| 292 | + " if extract_from_web_arg(lwa) is\n"+ | |
| 293 | + " {\n"+ | |
| 294 | + " failure then failure,\n"+ | |
| 295 | + " success("+name+") then success(update_"+name+"(db, "+name+"))\n"+ | |
| 296 | + " }.\n\n" | |
| 297 | + | |
| 298 | + ) is //end of the function | |
| 299 | + { | |
| 300 | + failure then println("can't write generate_update "+type_name); failure, | |
| 301 | + success(_) then success(unique) | |
| 302 | + }. | |
| 303 | + | |
| 304 | +public define Maybe(One) | |
| 305 | + generate_show_string | |
| 306 | + ( | |
| 307 | + Stream stream, | |
| 308 | + DB_Table table | |
| 309 | + )= | |
| 310 | + since table is db_table(name, model, _), | |
| 311 | + since model is db_model( columns, show_string), | |
| 312 | + with type_name = to_upper(name, 1), //make the first character to upper case to able to be a Anubis Type. | |
| 313 | + | |
| 314 | + //generate the type of the table that contain all components | |
| 315 | + if write_string(stream, | |
| 316 | + "\n\n"+ | |
| 317 | + //SQL query | |
| 318 | + "public define String\n"+ | |
| 319 | + " get_"+name+"_show_string\n"+ | |
| 320 | + " (\n"+ | |
| 321 | + " SQLite3DataBase db,\n"+ | |
| 322 | + " Int idx\n"+ | |
| 323 | + " )=\n"+ | |
| 324 | + " if get_"+name+"(db, idx) is\n"+ | |
| 325 | + " {\n"+ | |
| 326 | + " failure then default_select,\n"+ | |
| 327 | + " success(obj) then "+show_string+"\n"+ | |
| 328 | + " }." | |
| 329 | + ) is //end of the function | |
| 330 | + { | |
| 331 | + failure then println("can't write generate_update "+type_name); failure, | |
| 332 | + success(_) then success(unique) | |
| 333 | + }. | |
| 334 | + | |
| 335 | +public define Maybe(One) | |
| 336 | + generate_VT_view | |
| 337 | + ( | |
| 338 | + Stream stream, | |
| 339 | + DB_Table table | |
| 340 | + )= | |
| 341 | + since table is db_table(name, model, display), | |
| 342 | + since model is db_model( columns, _), | |
| 343 | + since display is db_display(list_view, list_edit), | |
| 344 | + | |
| 345 | + with type_name = to_upper(name, 1), //make the first character to upper case to able to be a Anubis Type. | |
| 346 | + | |
| 347 | + //generate the type of the table that contain all components | |
| 348 | + if write_string(stream, | |
| 349 | + "\n\n"+ | |
| 350 | + //SQL query | |
| 351 | + "define VT_view\n"+ | |
| 352 | + " _get_viewable_"+name+"\n"+ | |
| 353 | + " (\n"+ | |
| 354 | + " SQLite3DataBase db,\n"+ | |
| 355 | + " List("+type_name+") list,\n"+ | |
| 356 | + " List(VT_view_row) so_far\n"+ | |
| 357 | + " )=\n"+ | |
| 358 | + " if list is\n"+ | |
| 359 | + " {\n"+ | |
| 360 | + " [] then\n"+ | |
| 361 | + " with header = vt_view_row([\n"+ | |
| 362 | + // view row header | |
| 363 | + make_list_view_header(list_view, " ")+"\n"+ | |
| 364 | + " ]),\n"+ | |
| 365 | + " vt_view(\""+name+"\", header, reverse(so_far)),\n"+ | |
| 366 | + " [ h . t ] then\n"+ | |
| 367 | + " with entry = vt_view_row([\n"+ | |
| 368 | + // view row | |
| 369 | + make_list_view_row(model, list_view, "h", " ")+"\n"+ | |
| 370 | + " ]),\n"+ | |
| 371 | + " _get_viewable_"+name+"(db, t, [entry . so_far])\n"+ | |
| 372 | + " }.\n\n"+ | |
| 373 | + "public define VT_view\n"+ | |
| 374 | + " get_viewable_"+name+"\n"+ | |
| 375 | + " (\n"+ | |
| 376 | + " SQLite3DataBase db\n"+ | |
| 377 | + " )=\n"+ | |
| 378 | + " _get_viewable_"+name+"(db, get_all_"+name+"(db), []).\n\n" | |
| 379 | + ) is //end of the function | |
| 380 | + { | |
| 381 | + failure then println("can't write generate_VT_view "+type_name); failure, | |
| 382 | + success(_) then success(unique) | |
| 383 | + }. | |
| 384 | + | |
| 385 | +public define Maybe(One) | |
| 386 | + generate_VT_edit | |
| 387 | + ( | |
| 388 | + Stream stream, | |
| 389 | + DB_Table table | |
| 390 | + )= | |
| 391 | + since table is db_table(name, model, display), | |
| 392 | + since model is db_model( columns, _), | |
| 393 | + since display is db_display(list_view, list_edit), | |
| 394 | + with type_name = to_upper(name, 1), //make the first character to upper case to able to be a Anubis Type. | |
| 395 | + | |
| 396 | + //generate the type of the table that contain all components | |
| 397 | + if write_string(stream, | |
| 398 | + "\n ********** EDITABLE VIEWs ***************\n"+ | |
| 399 | + //SQL query | |
| 400 | + "define VT_edit\n"+ | |
| 401 | + " _get_editable_"+name+"\n"+ | |
| 402 | + " (\n"+ | |
| 403 | + " "+type_name+" "+name+",\n"+ | |
| 404 | + " SQLite3DataBase db\n"+ | |
| 405 | + " )=\n"+ | |
| 406 | + " with edit_entries = (List(VT_edit_entry))\n"+ | |
| 407 | + " [\n"+ | |
| 408 | + edit_entries(columns, name, " ", [])+"\n"+ | |
| 409 | + " ],\n"+ | |
| 410 | + " vt_edit(\""+name+"\", edit_entries).\n\n"+ | |
| 411 | + | |
| 412 | + "public define VT_edit\n"+ | |
| 413 | + " get_editable_"+name+"\n"+ | |
| 414 | + " (\n"+ | |
| 415 | + " SQLite3DataBase db,\n"+ | |
| 416 | + " VT_action action\n"+ | |
| 417 | + " )=\n"+ | |
| 418 | + " with "+name+" = if action is\n"+ | |
| 419 | + " {\n"+ | |
| 420 | + " new_entry then get_default_"+name+"\n"+ | |
| 421 | + " edit_entry(idx) then\n"+ | |
| 422 | + " if get_"+name+"(db, idx) is\n"+ | |
| 423 | + " {\n"+ | |
| 424 | + " failure then get_default_"+name+",\n"+ | |
| 425 | + " success(data) then data\n"+ | |
| 426 | + " }\n"+ | |
| 427 | + " },\n"+ | |
| 428 | + " _get_editable_"+name+"("+name+", db).\n\n" | |
| 429 | + ) is //end of the function | |
| 430 | + { | |
| 431 | + failure then println("can't write generate_VT_edit "+type_name); failure, | |
| 432 | + success(_) then success(unique) | |
| 433 | + }. | ... | ... |
| 1 | +++ a/src/main.anubis | |
| 1 | +/************************************************* | |
| 2 | + * *Project* The Anubis Project | |
| 3 | + * | |
| 4 | + * *Title* Database model manager | |
| 5 | + * | |
| 6 | + * *Copyright* Copyright © David René 2015. | |
| 7 | + * | |
| 8 | + * | |
| 9 | + * | |
| 10 | + * | |
| 11 | + * *Overview* | |
| 12 | + * generate database management interface under Anubis according on model description file'. | |
| 13 | + * Like django | |
| 14 | + */ | |
| 15 | + | |
| 16 | +read tools/string.anubis | |
| 17 | +read generation/files.anubis | |
| 18 | +read types/db_model.anubis | |
| 19 | +read model.3.0.0.anubis | |
| 20 | + | |
| 21 | +global define One | |
| 22 | + db_model_manager | |
| 23 | + ( | |
| 24 | + List(String) args | |
| 25 | + ) = | |
| 26 | + generate_model_files(the_database_description). | |
| 27 | + | ... | ... |
| 1 | +++ a/src/model.3.0.0.anubis | |
| 1 | + | |
| 2 | +read types/db_model.anubis | |
| 3 | + | |
| 4 | +public define DB_Table settings_table = | |
| 5 | + db_table("settings", | |
| 6 | + db_model( | |
| 7 | + [ | |
| 8 | + db_column("id", p_key, []), | |
| 9 | + db_column("var_name", char_field(20), []), | |
| 10 | + db_column("var_value", char_field(20), []), | |
| 11 | + ], | |
| 12 | + "obj.var_name+\" = \"+obj.var_value" | |
| 13 | + ), | |
| 14 | + db_display( | |
| 15 | + //list_view | |
| 16 | + ["var_name", "var_value"], | |
| 17 | + //list edit | |
| 18 | + ["type"] | |
| 19 | + ) | |
| 20 | + ). | |
| 21 | + | |
| 22 | +public define DB_Table production_memory_type_table = | |
| 23 | + db_table("production_memory_type", | |
| 24 | + db_model( | |
| 25 | + [ | |
| 26 | + db_column("id", p_key, []), | |
| 27 | + db_column("type", char_field(20), []), | |
| 28 | + ], | |
| 29 | + "to_String(obj.id)+\":\"+obj.type" | |
| 30 | + ), | |
| 31 | + db_display( | |
| 32 | + //list_view | |
| 33 | + ["id", "type"], | |
| 34 | + //list edit | |
| 35 | + ["type"] | |
| 36 | + ) | |
| 37 | + ). | |
| 38 | + | |
| 39 | +public define DB_Table production_mass_storage_type_table = | |
| 40 | + db_table("production_mass_storage_type", | |
| 41 | + db_model( | |
| 42 | + [ | |
| 43 | + db_column("id", p_key, []), | |
| 44 | + db_column("type", char_field(20), []), | |
| 45 | + ], | |
| 46 | + "to_String(obj.id)+\":\"+obj.type" | |
| 47 | + ), | |
| 48 | + db_display( | |
| 49 | + //list_view | |
| 50 | + ["id", "type"], | |
| 51 | + //list edit | |
| 52 | + ["type"] | |
| 53 | + ) | |
| 54 | + ). | |
| 55 | + | |
| 56 | +public define DB_Table production_mass_storage_model_table = | |
| 57 | + db_table("production_mass_storage_model", | |
| 58 | + db_model( | |
| 59 | + [ | |
| 60 | + db_column("id", p_key, []), | |
| 61 | + db_column("manufacturer", char_field(20), []), | |
| 62 | + db_column("type_id", foreign_key("production_mass_storage_type"), [indexed]), | |
| 63 | + db_column("capacity", integer_field, []), // | |
| 64 | + db_column("tr_min", integer_field, []), // | |
| 65 | + db_column("date_created", datetime_field(auto_now_add), []), | |
| 66 | + db_column("last_modified", datetime_field(auto_now), []), | |
| 67 | + db_column("comments", text_field, []) // whatever the user wants to keep | |
| 68 | + ], | |
| 69 | + "obj.manufacturer" | |
| 70 | + ), | |
| 71 | + db_display( | |
| 72 | + //list_view | |
| 73 | + ["id", "manufacturer", "type_id", "capacity", "tr_min", "last_modified", "date_created"], | |
| 74 | + //list_edit | |
| 75 | + [] | |
| 76 | + ) | |
| 77 | + ). | |
| 78 | + | |
| 79 | +public define DB_Table production_mass_storage_table = | |
| 80 | + db_table("production_mass_storage", | |
| 81 | + db_model( | |
| 82 | + [ | |
| 83 | + db_column("id", p_key, []), | |
| 84 | + db_column("purchase_id", foreign_key("production_purchase"), [indexed]), | |
| 85 | + db_column("model_id", foreign_key("production_mass_storage_model"), [indexed]), | |
| 86 | + db_column("serial", char_field(40), []), // | |
| 87 | + db_column("status", char_field(10), []), // | |
| 88 | + db_column("date_created", datetime_field(auto_now_add), []), | |
| 89 | + db_column("last_modified", datetime_field(auto_now), []), | |
| 90 | + db_column("comments", text_field, []) // whatever the user wants to keep | |
| 91 | + ], | |
| 92 | + "obj.purchase_id.string" | |
| 93 | + ), | |
| 94 | + db_display( | |
| 95 | + //list_view | |
| 96 | + ["model_id", "serial", "status", "date_created"], | |
| 97 | + //list_edit | |
| 98 | + ["purchase_id", "model_id", "serial", "status", "comments"] | |
| 99 | + ) | |
| 100 | + ). | |
| 101 | + | |
| 102 | + "CREATE TABLE production_purchase ( | |
| 103 | + id integer NOT NULL PRIMARY KEY, | |
| 104 | + date date NOT NULL, | |
| 105 | + buyer_id integer NOT NULL REFERENCES staff_staff (id), | |
| 106 | + supplier_id integer NOT NULL REFERENCES production_supplier (id), | |
| 107 | + order_ref varchar(50) NOT NULL, | |
| 108 | + description varchar(200) NOT NULL, | |
| 109 | + date_created datetime NOT NULL, | |
| 110 | + last_modified datetime NOT NULL, | |
| 111 | + comments text NOT NULL | |
| 112 | + )" | |
| 113 | + | |
| 114 | +public define DB_Table production_purchase_table = | |
| 115 | + db_table("production_purchase", | |
| 116 | + db_model( | |
| 117 | + [ | |
| 118 | + db_column("id", p_key, []), | |
| 119 | + db_column("date", date_field(none), []), | |
| 120 | + db_column("buyer_id", foreign_key("staff_staff"), [indexed]), | |
| 121 | + db_column("supplier_id", foreign_key("production_supplier"), [indexed]), | |
| 122 | + db_column("order_ref", char_field(50), []), // | |
| 123 | + db_column("description", char_field(200), []), // description of the purchase | |
| 124 | + db_column("date_created", datetime_field(auto_now_add), []), | |
| 125 | + db_column("last_modified", datetime_field(auto_now), []), | |
| 126 | + db_column("comments", text_field, []), // whatever the user wants to keep | |
| 127 | + ], | |
| 128 | + "" | |
| 129 | + ), | |
| 130 | + db_display( | |
| 131 | + //list_view | |
| 132 | + ["date", "supplier_id", "description"], | |
| 133 | + //list_edit | |
| 134 | + ["date", "buyer_id", "supplier_id", "order_ref", "description", "comments"] | |
| 135 | + ) | |
| 136 | + ). | |
| 137 | + | |
| 138 | +public define DB_Database | |
| 139 | + the_database_description | |
| 140 | + = | |
| 141 | + db_database("prod_manager", | |
| 142 | + [ | |
| 143 | + settings_table, | |
| 144 | + production_mass_storage_type_table, | |
| 145 | + production_mass_storage_model_table, | |
| 146 | + production_memory_type_table | |
| 147 | + //production_mass_storage_table, | |
| 148 | + //production_purchase_table | |
| 149 | + ]). | ... | ... |
| 1 | +++ a/src/types/db_model.anubis | |
| 1 | +/* | |
| 2 | + * Created by PyramIDE. | |
| 3 | + * User: フランスのトトロ | |
| 4 | + * Date: 01/01/2016 | |
| 5 | + * Time: 1:34 | |
| 6 | + * © Calexium | |
| 7 | + */ | |
| 8 | + | |
| 9 | + The Anubis project | |
| 10 | + | |
| 11 | + Interfacing a database with Anubis | |
| 12 | + | |
| 13 | + | |
| 14 | + Author: David René | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + In order to generate such tools, DB_Model needs a formal | |
| 19 | + description of the database. | |
| 20 | + | |
| 21 | + | |
| 22 | + *** (1) Formal description of the database. | |
| 23 | + | |
| 24 | + *** (1.1) 'DB_Model_Field' (data types of table columns). | |
| 25 | +public type DB_Datetime_Field_Attr: | |
| 26 | + none, //Nothing special, normal behaviour | |
| 27 | + auto_now, //Always update datetime at SQL update | |
| 28 | + auto_now_add. //Set current datetime when row is created and can't be edited anymore | |
| 29 | + | |
| 30 | +public type DB_Model_Field: | |
| 31 | + //anubis(String _T), // the datum of type _T is serialized and base64 encoded | |
| 32 | + p_key, | |
| 33 | + //binary, // contains a byte array | |
| 34 | + boolean_field, // true or false | |
| 35 | + date_field(DB_Datetime_Field_Attr), // date with the precision of the day | |
| 36 | + time_field(DB_Datetime_Field_Attr), // time with the precision of the second | |
| 37 | + datetime_field(DB_Datetime_Field_Attr), // datetime with the precision of the second | |
| 38 | + foreign_key(String table_name), // foreign key to 'id' in another (or same) table and column_name for choice selector. | |
| 39 | + integer_field, // integer of arbitrary size | |
| 40 | + char_field(Int size), // text of maximal size 'size' (number of characters) | |
| 41 | + text_field. // text of variable size | |
| 42 | + | |
| 43 | + From the point of view of your Anubis program, these data will be of types: | |
| 44 | + | |
| 45 | + Name | Anubis type | Type within the database | |
| 46 | + ----------------+-------------------+-------------------------------------------------- | |
| 47 | + //anubis | T (serializable) | text (base64 encoded serialization) | |
| 48 | + p_key | DB_id | primary key (integer) | |
| 49 | + //binary | ByteArray | text (the byte array base64 encoded) | |
| 50 | + boolean_field | Bool | boolean | |
| 51 | + date_field | DB_date | text (date in ISO-8601 format: yyyy-mm-dd) | |
| 52 | + time_field | DB_time | text (date in ISO-8601 format: hh:mm:ss) | |
| 53 | + datetime_field | DB_datetime | text (date in ISO-8601 format: yyyy-mm-dd hh:mm:ss) | |
| 54 | + foreign_key | Int | integer | |
| 55 | + integer_field | Int | arbitrary size integer (numeric) | |
| 56 | + char_field | String | max size text | |
| 57 | + text_field | String | arbitrary size text | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + *** (1.2) 'MaybeNull'. | |
| 62 | + | |
| 63 | + This type scheme is isomorphic to 'Maybe', and is used for representing data which | |
| 64 | + can have the value 'NULL'. We don't use 'Maybe' for this purpose because | |
| 65 | + we want to avoid the misleading 'Maybe(Maybe(...))'. Instead, we will have | |
| 66 | + sometimes 'Maybe(MaybeNull(...))', so that 'null' means 'NULL', and 'failure' | |
| 67 | + means an error. | |
| 68 | + | |
| 69 | +public type MaybeNull($T): | |
| 70 | + null, | |
| 71 | + not_null($T value). | |
| 72 | + | |
| 73 | + Conversion tools between date, time and datetime in ISO-8601 format and 'Int' | |
| 74 | + (number of seconds since the epoch) are provided in 'library/tools/ISO-8601.anubis'. | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + *** (1.3) 'DB_Model_Attr' (attributes of columns). | |
| 79 | + | |
| 80 | + Possible attributes of columns: (each column has a list of such attributes) | |
| 81 | + | |
| 82 | +public type DB_Model_Attr: | |
| 83 | + unique, // by default, the values in a column are not required to be all different | |
| 84 | + indexed, // by default, a column is not indexed | |
| 85 | + default(String). // default value (used in case of creation of a NON NULL column | |
| 86 | + // in a table which already contains some rows) | |
| 87 | + | |
| 88 | + Of course, 'NOT NULL' is not an alternative of 'DB_Model_Attr' because it is already coded into the | |
| 89 | + database type itself (type 'DB_Model_Field' above). | |
| 90 | + | |
| 91 | + | |
| 92 | + *** (1.4) 'DB_Model_Column' (describing a column in a table). | |
| 93 | + | |
| 94 | + Description of a column: | |
| 95 | + | |
| 96 | +public type DB_Model_Column: | |
| 97 | + db_column (String name, // name of ordinary column (i.e. all but 'id') | |
| 98 | + DB_Model_Field type, | |
| 99 | + List(DB_Model_Attr) attributes). | |
| 100 | + | |
| 101 | + | |
| 102 | + *** (3.7) 'DB_Model_Table' (describing a table). | |
| 103 | + | |
| 104 | + Description of a table: | |
| 105 | + | |
| 106 | +public type DB_Model: | |
| 107 | + db_model( List(DB_Model_Column) columns, // columns other than the primary key column (if any) | |
| 108 | + String show_string). | |
| 109 | + | |
| 110 | + | |
| 111 | +public type DB_Display: | |
| 112 | + db_display(List(String) list_view, | |
| 113 | + List(String) edit_view). | |
| 114 | + | |
| 115 | +public type DB_Table: | |
| 116 | + db_table ( String name, // name of the table | |
| 117 | + DB_Model model, | |
| 118 | + DB_Display display). | |
| 119 | + | |
| 120 | + *** (3.8) 'DB_Database' (describing a whole database). | |
| 121 | + | |
| 122 | + Description of a whole database: | |
| 123 | + | |
| 124 | +public type DB_Database: | |
| 125 | + db_database (String name, // name of the database | |
| 126 | + List(DB_Table) tables). // list of all tables in the database | |
| 127 | + | |
| 128 | + Note: indexes are described via the attributes and will be generated accordingly. | |
| 129 | + | |
| 130 | + | |
| 131 | + Dates (of type 'String' in Anubis) are stored into the database as ISO-8601 strings, | |
| 132 | + for example: 2013-05-24 09:34:23 | |
| 133 | + | |
| 134 | + We provide functions for conversion into Int (number of seconds since the 'epoch') and conversely | |
| 135 | + in 'library/tools/ISO-8601.anubis'. | |
| 136 | + | |
| 137 | +public define Maybe(String) convert_to_date (MaybeNull(ByteArray) b). | |
| 138 | +public define MaybeNull(String) convert_to_date_or_null (MaybeNull(ByteArray) b). | |
| 139 | + | |
| 140 | + *** (8.3.6) Converting 'integer?' and 'integer?_or_null' to and fro. | |
| 141 | + | |
| 142 | + The next functions are used for integer16, integer32 and integer. | |
| 143 | + | |
| 144 | +public define Maybe(Int) convert_to_integer (MaybeNull(ByteArray) b). | |
| 145 | +public define MaybeNull(Int) convert_to_integer_or_null (MaybeNull(ByteArray) b). | |
| 146 | + | |
| 147 | + | |
| 148 | + *** (8.3.7) Converting 'char/text' and 'char_or_null/text_or_null' to and fro. | |
| 149 | + | |
| 150 | + The same functions are used for 'text/text_or_null' and 'vartext/vartext_or_null'. | |
| 151 | + | |
| 152 | + Litteral texts must be 'prepared' before they can be included into | |
| 153 | + SQL commands (this amounts to doubling the single quotes). | |
| 154 | + | |
| 155 | + public define MetaSQL_Prepared prepare_text (String t). | |
| 156 | + public define MetaSQL_Prepared prepare_text_or_null (MaybeNull(String) t). | |
| 157 | + | |
| 158 | + Conversely, texts arrive from the database in the form of byte arrays which must be | |
| 159 | + converted to strings. The two functions for converting to 'text' and to 'text_or_null' | |
| 160 | + are almost the same one. The only difference is that 'null' is interpreted as an error in | |
| 161 | + the case of 'text'. | |
| 162 | + | |
| 163 | + --- That's all for the public part !---------------------------------------------------------------- | |
| 164 | + | |
| 165 | +read tools/basis.anubis | |
| 166 | +read tools/base64.anubis | |
| 167 | +read system/string.anubis | |
| 168 | +read tools/ISO-8601.anubis | |
| 169 | + | |
| 170 | + | |
| 171 | + *** [1] Tools. | |
| 172 | + | |
| 173 | + *** [1.1] Concatenating strings which may not exist. | |
| 174 | + | |
| 175 | + The concatenation function '+' for strings is defined in 'tools/basis.anubis'. Here we define | |
| 176 | + an extension of it to strings which may not exist (i.e. data of type 'Maybe(String)'). Of course, | |
| 177 | + the result is always of type 'Maybe(String)'. | |
| 178 | + | |
| 179 | +define macro Maybe(String) | |
| 180 | + Maybe(String) s + String t | |
| 181 | + = | |
| 182 | + if s is | |
| 183 | + { | |
| 184 | + failure then failure, | |
| 185 | + success(s1) then success(s1+t) | |
| 186 | + }. | |
| 187 | + | |
| 188 | +define macro Maybe(String) | |
| 189 | + String s + Maybe(String) t | |
| 190 | + = | |
| 191 | + if t is | |
| 192 | + { | |
| 193 | + failure then failure, | |
| 194 | + success(t1) then success(s+t1) | |
| 195 | + }. | |
| 196 | + | |
| 197 | +define macro Maybe(String) | |
| 198 | + Maybe(String) s + Maybe(String) t | |
| 199 | + = | |
| 200 | + if s is | |
| 201 | + { | |
| 202 | + failure then failure, | |
| 203 | + success(s1) then if t is | |
| 204 | + { | |
| 205 | + failure then failure, | |
| 206 | + success(t1) then success(s1+t1) | |
| 207 | + } | |
| 208 | + }. | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + *** [2] Verifications concerning the description of the database and queries. | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + define Bool | |
| 217 | + has_forbidden_references | |
| 218 | + ( | |
| 219 | + String table_name, // the first 3 arguments concern the current table. | |
| 220 | + MetaSQL_PrimKey pk, | |
| 221 | + List(DB_Model_Column) columns, | |
| 222 | + List(DB_Model_Column) forwards, // subsequent tables | |
| 223 | + List(String) backwards // list of backwards table names | |
| 224 | + ) = | |
| 225 | + if columns is | |
| 226 | + { | |
| 227 | + [ ] then false, // no forbidden reference found | |
| 228 | + [col1 . other_cols] then | |
| 229 | + if is_forbidden_reference(table_name,col1,forwards,backwards) | |
| 230 | + then true | |
| 231 | + else has_forbidden_references(table_name,pk,other_cols,forwards,backwards) | |
| 232 | + }. | |
| 233 | + | |
| 234 | + define Bool // returns 'true' if there is at least one forbidden cycle. | |
| 235 | + has_forbidden_cycles | |
| 236 | + ( | |
| 237 | + String db_name, | |
| 238 | + List(DB_Model_Column) tables, | |
| 239 | + List(String) backwards // names of 'backwards' tables | |
| 240 | + ) = | |
| 241 | + if tables is | |
| 242 | + { | |
| 243 | + [ ] then false, // no forbidden cycle found | |
| 244 | + [tab1 . other_tabs] then if tab1 is table(name1,pk1,cols1) then | |
| 245 | + if has_forbidden_references(name1,pk1,cols1,other_tabs,backwards) | |
| 246 | + then true | |
| 247 | + else has_forbidden_cycles(db_name,other_tabs,[name1 . backwards]) | |
| 248 | + }. | |
| 249 | + | |
| 250 | + define Bool | |
| 251 | + is_forbidden_column_name | |
| 252 | + ( | |
| 253 | + String name | |
| 254 | + ) = | |
| 255 | + name = "id" | name = "metasqlcheck". | |
| 256 | + | |
| 257 | + define Bool | |
| 258 | + has_forbidden_column_names | |
| 259 | + ( | |
| 260 | + DB_Model_Column tab | |
| 261 | + ) = | |
| 262 | + if tab is table(_,_,cols) then | |
| 263 | + mapor((DB_Model_Column cs) |-> | |
| 264 | + if cs is col(name,_,_) then is_forbidden_column_name(name), | |
| 265 | + cols). | |
| 266 | + | |
| 267 | + define Bool | |
| 268 | + has_forbidden_column_names | |
| 269 | + ( | |
| 270 | + DB_Model_DB db | |
| 271 | + ) = | |
| 272 | + if db is database(_,tables) then | |
| 273 | + mapor(has_forbidden_column_names,tables). | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + *** [3] Generating the target file. | |
| 278 | + | |
| 279 | + *** [3.1] Converting a database type into the corresponding Anubis type: | |
| 280 | + | |
| 281 | +public define String | |
| 282 | + to_Anubis_type | |
| 283 | + ( | |
| 284 | + DB_Model_Field t | |
| 285 | + ) = | |
| 286 | + if t is | |
| 287 | + { | |
| 288 | + //anubis(_T) then "ByteArray", | |
| 289 | + p_key then "DB_id", | |
| 290 | + //binary then "ByteArray", | |
| 291 | + boolean_field then "Bool", | |
| 292 | + date_field(_) then "DB_date", | |
| 293 | + time_field(_) then "DB_time", | |
| 294 | + datetime_field(_) then "DB_datetime", | |
| 295 | + foreign_key(_) then "Int", | |
| 296 | + integer_field then "Int", | |
| 297 | + char_field(Int size) then "String", | |
| 298 | + text_field then "String" | |
| 299 | + }. | |
| 300 | + | |
| 301 | + | |
| 302 | +public define String | |
| 303 | + to_Anubis_default | |
| 304 | + ( | |
| 305 | + DB_Model_Field t | |
| 306 | + ) = | |
| 307 | + if t is | |
| 308 | + { | |
| 309 | + //anubis(_T) then "constant_byte_array(0,0)", | |
| 310 | + p_key then "none", | |
| 311 | + //binary then "constant_byte_array(0,0)", | |
| 312 | + boolean_field then "false", | |
| 313 | + date_field(_) then "db_date(\"\")", | |
| 314 | + time_field(_) then "db_time(\"\")", | |
| 315 | + datetime_field(_) then "db_datetime(\"\")", | |
| 316 | + foreign_key(_) then "0", | |
| 317 | + integer_field then "0", | |
| 318 | + char_field(Int size) then "\"\"", | |
| 319 | + text_field then "\"\"" | |
| 320 | + }. | |
| 321 | + | |
| 322 | +public define String | |
| 323 | + from_DB_cursor | |
| 324 | + ( | |
| 325 | + DB_Model_Field t, | |
| 326 | + String cursor, | |
| 327 | + Int index | |
| 328 | + ) = | |
| 329 | + with cursor_index = "("+cursor+")("+index+")", | |
| 330 | + if t is | |
| 331 | + { | |
| 332 | + //anubis(_T) then "constant_byte_array(0,0)", | |
| 333 | + p_key then "db_id((Int)db_integer"+cursor_index+")", | |
| 334 | + //binary then "constant_byte_array(0,0)", | |
| 335 | + boolean_field then "db_bool"+cursor_index, | |
| 336 | + date_field(_) then "db_date(text"+cursor_index+")", | |
| 337 | + time_field(_) then "db_time(text"+cursor_index+")", | |
| 338 | + datetime_field(_) then "db_datetime(text"+cursor_index+")", | |
| 339 | + foreign_key(_) then "(Int)db_integer"+cursor_index, | |
| 340 | + integer_field then "(Int)db_integer"+cursor_index, | |
| 341 | + char_field(Int size) then "text"+cursor_index, | |
| 342 | + text_field then "text"+cursor_index | |
| 343 | + }. | |
| 344 | + | |
| 345 | +define List(String) | |
| 346 | +/** | |
| 347 | + */ | |
| 348 | + components | |
| 349 | + ( | |
| 350 | + List(DB_Model_Column) columns, | |
| 351 | + String cursor_name, | |
| 352 | + List(String) so_far, | |
| 353 | + Int idx | |
| 354 | + )= | |
| 355 | + if columns is | |
| 356 | + { | |
| 357 | + [] then reverse(so_far), | |
| 358 | + [h . t ] then | |
| 359 | + since h is db_column(name, col_type, _), | |
| 360 | + with line = fill(from_DB_cursor(col_type, cursor_name, idx), 35)+ "/* "+name+" */", | |
| 361 | + components(t, cursor_name, [line . so_far], idx + 1 ) | |
| 362 | + }. | |
| 363 | + | |
| 364 | +public define String | |
| 365 | + generate_constructor_from_cursor | |
| 366 | + ( | |
| 367 | + String constructor_name, | |
| 368 | + String cursor_name, | |
| 369 | + List(DB_Model_Column) columns, | |
| 370 | + String indent | |
| 371 | + )= | |
| 372 | + indent+constructor_name+"(\n"+indent+" "+join(",\n"+indent+" ", components(columns, cursor_name, [], 0))+"\n"+indent+")". | |
| 373 | + | |
| 374 | + | |
| 375 | +public define String | |
| 376 | + from_web_arg | |
| 377 | + ( | |
| 378 | + DB_Model_Field t, | |
| 379 | + String name | |
| 380 | + ) = | |
| 381 | + if t is | |
| 382 | + { | |
| 383 | + //anubis(_T) then "constant_byte_array(0,0)", | |
| 384 | + p_key then "with "+name+" = get_DB_id(lwa, \""+name+"\"),", | |
| 385 | + //binary then "constant_byte_array(0,0)", | |
| 386 | + boolean_field then "with "+name+" = get_Bool(lwa, \""+name+"\"),", | |
| 387 | + date_field(attrs) then if attrs = none then "get_DB_date(lwa, \""+name+"\")" else "with "+name+" = get_dummy_DB_date,", | |
| 388 | + time_field(attrs) then if attrs = none then "get_DB_time(lwa, \""+name+"\")" else "with "+name+" = get_dummy_DB_time,", | |
| 389 | + datetime_field(attrs) then if attrs = none then "get_DB_datetime(lwa, \""+name+"\")" else "with "+name+" = get_dummy_DB_datetime,", | |
| 390 | + foreign_key(String table) then "get_Int(lwa, \""+name+"\")", | |
| 391 | + integer_field then "get_Int(lwa, \""+name+"\")", | |
| 392 | + char_field(Int size) then "get_String(lwa, \""+name+"\")", | |
| 393 | + text_field then "get_String(lwa, \""+name+"\")" | |
| 394 | + }. | |
| 395 | + | |
| 396 | +public define List(String) | |
| 397 | +/** | |
| 398 | + */ | |
| 399 | + components | |
| 400 | + ( | |
| 401 | + List(DB_Model_Column) columns, | |
| 402 | + List(String) so_far | |
| 403 | + )= | |
| 404 | + if columns is | |
| 405 | + { | |
| 406 | + [] then reverse(so_far), | |
| 407 | + [h . t ] then | |
| 408 | + since h is db_column(name, col_type, _), | |
| 409 | + components(t, [ name . so_far]) | |
| 410 | + }. | |
| 411 | + | |
| 412 | +public define String | |
| 413 | + generate_constructor | |
| 414 | + ( | |
| 415 | + String constructor_name, | |
| 416 | + List(DB_Model_Column) columns, | |
| 417 | + String indent | |
| 418 | + )= | |
| 419 | + indent+constructor_name+"(\n"+indent+" "+join(",\n"+indent+" ", components(columns, []))+")". | |
| 420 | + | |
| 421 | +public define String | |
| 422 | + to_Bind | |
| 423 | + ( | |
| 424 | + DB_Model_Field t, | |
| 425 | + String type_name, //name of the type | |
| 426 | + String name, //name of component into the type | |
| 427 | + Bool insert //true if insert time else false for update | |
| 428 | + ) = | |
| 429 | + if t is | |
| 430 | + { | |
| 431 | + //anubis(_T) then "constant_byte_array(0,0)", | |
| 432 | + p_key then "", | |
| 433 | + //binary then "constant_byte_array(0,0)", | |
| 434 | + boolean_field then "bind_Bool(\":v_"+name+"\", "+type_name+"."+name+")", | |
| 435 | + date_field(attrs) then "bind_Date(\":v_"+name+"\", "+type_name+"."+name+")", | |
| 436 | + time_field(attrs) then "bind_Time(\":v_"+name+"\", "+type_name+"."+name+")", | |
| 437 | + datetime_field(attrs) then if attrs is | |
| 438 | + { | |
| 439 | + none then "bind_Datetime(\":v_"+name+"\", "+type_name+"."+name+")", | |
| 440 | + auto_now then "bind_Datetime(\":v_"+name+"\", now)", | |
| 441 | + auto_now_add then | |
| 442 | + if insert then | |
| 443 | + "bind_Datetime(\":v_"+name+"\", now)" | |
| 444 | + else | |
| 445 | + "" | |
| 446 | + }, | |
| 447 | + foreign_key(_) then "bind_Int(\":v_"+name+"\", "+type_name+"."+name+")", | |
| 448 | + integer_field then "bind_Int(\":v_"+name+"\", "+type_name+"."+name+")", | |
| 449 | + char_field(Int size) then "bind_String(\":v_"+name+"\", "+type_name+"."+name+")", | |
| 450 | + text_field then "bind_String(\":v_"+name+"\", "+type_name+"."+name+")" | |
| 451 | + }. | |
| 452 | + | |
| 453 | +public define List(String) | |
| 454 | +/** | |
| 455 | + */ | |
| 456 | + to_Bind_list | |
| 457 | + ( | |
| 458 | + List(DB_Model_Column) columns, | |
| 459 | + String type_name, //name of the type | |
| 460 | + List(String) so_far, | |
| 461 | + Bool insert | |
| 462 | + )= | |
| 463 | + if columns is | |
| 464 | + { | |
| 465 | + [] then reverse(so_far), | |
| 466 | + [h . t ] then | |
| 467 | + since h is db_column(name, col_type, _), | |
| 468 | + with result = to_Bind(col_type, type_name, name, insert), | |
| 469 | + //we eliminate the empty string because during the join it will have an empty line | |
| 470 | + if result = "" then | |
| 471 | + to_Bind_list(t, type_name, so_far, insert) | |
| 472 | + else | |
| 473 | + to_Bind_list(t, type_name, [result . so_far], insert) | |
| 474 | + }. | |
| 475 | + | |
| 476 | +public define String | |
| 477 | + generate_Bind_list | |
| 478 | + ( | |
| 479 | + List(DB_Model_Column) columns, | |
| 480 | + String type_name, | |
| 481 | + String indent, | |
| 482 | + Bool insert | |
| 483 | + )= | |
| 484 | + indent+"[\n"+indent+" "+join(",\n"+indent+" ", to_Bind_list(columns, type_name, [], insert))+"]". | |
| 485 | + | |
| 486 | + | |
| 487 | +public define Maybe(String) | |
| 488 | + get_column_name | |
| 489 | + ( | |
| 490 | + DB_Model_Column col, | |
| 491 | + Bool insert //true if insert time else false for update | |
| 492 | + ) = | |
| 493 | + since col is db_column(name, col_type, _), | |
| 494 | + if col_type is | |
| 495 | + { | |
| 496 | + //anubis(_T) then "constant_byte_array(0,0)", | |
| 497 | + p_key then failure, | |
| 498 | + //binary then "constant_byte_array(0,0)", | |
| 499 | + boolean_field then success(name), | |
| 500 | + date_field(attrs) then success(name), | |
| 501 | + time_field(attrs) then success(name), | |
| 502 | + datetime_field(attrs) then if attrs is | |
| 503 | + { | |
| 504 | + none then success(name), | |
| 505 | + auto_now then success(name), | |
| 506 | + auto_now_add then | |
| 507 | + if insert then success(name) else failure | |
| 508 | + }, | |
| 509 | + foreign_key(_) then success(name), | |
| 510 | + integer_field then success(name), | |
| 511 | + char_field(Int size) then success(name), | |
| 512 | + text_field then success(name) | |
| 513 | + }. | |
| 514 | + | |
| 515 | +public define List(String) | |
| 516 | + columns_name | |
| 517 | + ( | |
| 518 | + List(DB_Model_Column) columns, | |
| 519 | + Bool insert, //true if insert time else false for update | |
| 520 | + List(String) so_far | |
| 521 | + ) = | |
| 522 | + if columns is | |
| 523 | + { | |
| 524 | + [] then reverse(so_far), | |
| 525 | + [h . t] then | |
| 526 | + if get_column_name(h, insert) is | |
| 527 | + { | |
| 528 | + failure then columns_name(t, insert, so_far) | |
| 529 | + success(result) then | |
| 530 | + if insert then | |
| 531 | + columns_name(t, insert, [result . so_far]) | |
| 532 | + else | |
| 533 | + columns_name(t, insert, [result+" = :v_"+result . so_far]) | |
| 534 | + } | |
| 535 | + }. | |
| 536 | + | |
| 537 | +public define String | |
| 538 | +/* | |
| 539 | + Generate the SQL "(xxx, yyy, ...) VALUES ( :v_xxx, :v_yyy, ...)" for the insert | |
| 540 | + SQL query. | |
| 541 | + */ | |
| 542 | + insert_values | |
| 543 | + ( | |
| 544 | + List(DB_Model_Column) columns, | |
| 545 | + String indent | |
| 546 | + )= | |
| 547 | + with columns_list = columns_name(columns, true, []), | |
| 548 | + indent+" ("+join(", ", columns_list)+")\n"+indent+"VALUES\n"+indent+" ("+prefixed_join(":v_", columns_list, ", ")+")". | |
| 549 | + | |
| 550 | + | |
| 551 | +public define String | |
| 552 | +/* | |
| 553 | + Generate the SQL "xxx = :v_xxx, yyy = :v_yyy, ..." for the update | |
| 554 | + SQL query. | |
| 555 | + */ | |
| 556 | + update_values | |
| 557 | + ( | |
| 558 | + List(DB_Model_Column) columns, | |
| 559 | + String indent | |
| 560 | + )= | |
| 561 | + with columns_list = columns_name(columns, false, []), | |
| 562 | + indent+" "+join(", ", columns_list). | |
| 563 | + | |
| 564 | + | |
| 565 | +public define Maybe(String) | |
| 566 | + get_VT_edit_entry | |
| 567 | + ( | |
| 568 | + DB_Model_Column col, | |
| 569 | + String type_name | |
| 570 | + ) = | |
| 571 | + since col is db_column(name, col_type, _), | |
| 572 | + if col_type is | |
| 573 | + { | |
| 574 | + //anubis(_T) then "constant_byte_array(0,0)", | |
| 575 | + p_key then success("primary_key(to_String("+type_name+"."+name+"))"), | |
| 576 | + //binary then "constant_byte_array(0,0)", | |
| 577 | + boolean_field then success("boolean(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+")"), | |
| 578 | + date_field(attrs) then success("date(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+")"), | |
| 579 | + time_field(attrs) then success("time(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+")"), | |
| 580 | + datetime_field(attrs) then if attrs is | |
| 581 | + { | |
| 582 | + none then success("datetime(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+")"), | |
| 583 | + auto_now then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".datetime)"), | |
| 584 | + auto_now_add then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".datetime)") | |
| 585 | + }, | |
| 586 | + foreign_key(_) then success("information(\"FOREIGN_TODO\", \""+name+"\", to_String("+type_name+"."+name+"))"), | |
| 587 | + integer_field then success("integer(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+")"), | |
| 588 | + char_field(Int size) then success("text(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+")"), | |
| 589 | + text_field then success("text_area(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+")") | |
| 590 | + }. | |
| 591 | + | |
| 592 | +public define String | |
| 593 | + edit_entries | |
| 594 | + ( | |
| 595 | + List(DB_Model_Column) columns, | |
| 596 | + String type_name, | |
| 597 | + String indent, | |
| 598 | + List(String) so_far | |
| 599 | + ) = | |
| 600 | + if columns is | |
| 601 | + { | |
| 602 | + [] then indent+" "+join(",\n"+indent+" ", reverse(so_far)), | |
| 603 | + [h . t] then | |
| 604 | + if get_VT_edit_entry(h, type_name) is | |
| 605 | + { | |
| 606 | + failure then edit_entries(t, type_name, indent, so_far) | |
| 607 | + success(result) then edit_entries(t, type_name, indent, [result . so_far]) | |
| 608 | + } | |
| 609 | + }. | |
| 610 | + | |
| 611 | +public define String | |
| 612 | + make_list_view_header | |
| 613 | + ( | |
| 614 | + List(String) list_view, | |
| 615 | + String indent | |
| 616 | + )= | |
| 617 | + indent+join(",\n"+indent, map((String text) |-> "text(\""+to_upper(text)+"\")", list_view)). | |
| 618 | + | |
| 619 | +public define Maybe(DB_Model_Column) | |
| 620 | + get_column_type | |
| 621 | + ( | |
| 622 | + List(DB_Model_Column) columns, //columns in wich we search | |
| 623 | + String name_to_find //Column name to find in previous list | |
| 624 | + )= | |
| 625 | + if columns is | |
| 626 | + { | |
| 627 | + [] then failure, | |
| 628 | + [h . t] then | |
| 629 | + since h is db_column(name, field, attr), | |
| 630 | + if name_to_find = name then | |
| 631 | + success(h) | |
| 632 | + else | |
| 633 | + get_column_type(t, name_to_find) | |
| 634 | + }. | |
| 635 | + | |
| 636 | +public define String | |
| 637 | + to_cell_view | |
| 638 | + ( | |
| 639 | + DB_Model_Column col, | |
| 640 | + String type_name | |
| 641 | + ) = | |
| 642 | + since col is db_column(name, col_type, _), | |
| 643 | + if col_type is | |
| 644 | + { | |
| 645 | + //anubis(_T) then "constant_byte_array(0,0)", | |
| 646 | + p_key then "link(to_String("+type_name+".id), to_String("+type_name+".id))", | |
| 647 | + //binary then "constant_byte_array(0,0)", | |
| 648 | + boolean_field then "text(to_String("+type_name+"."+name+"))", | |
| 649 | + date_field(attrs) then "text(to_String("+type_name+"."+name+"))", | |
| 650 | + time_field(attrs) then "text(to_String("+type_name+"."+name+"))", | |
| 651 | + datetime_field(attrs) then "text(to_String("+type_name+"."+name+"))" | |
| 652 | + foreign_key(foreign_table) then "text(get_"+foreign_table+"_show_string(db, "+type_name+"."+name+"))", | |
| 653 | + integer_field then "text(to_String("+type_name+"."+name+"))", | |
| 654 | + char_field(Int size) then "text("+type_name+"."+name+")", | |
| 655 | + text_field then "text("+type_name+"."+name+")" | |
| 656 | + }. | |
| 657 | + | |
| 658 | +public define String | |
| 659 | + to_cell_view | |
| 660 | + ( | |
| 661 | + List(DB_Model_Column) columns, | |
| 662 | + String column_name, | |
| 663 | + String data_name | |
| 664 | + )= | |
| 665 | + if get_column_type(columns, column_name) is | |
| 666 | + { | |
| 667 | + failure then "column name "+column_name+"doesn't exist", | |
| 668 | + success(column) then to_cell_view(column, data_name) | |
| 669 | + }. | |
| 670 | + | |
| 671 | +public define String | |
| 672 | + make_list_view_row | |
| 673 | + ( | |
| 674 | + DB_Model model, | |
| 675 | + List(String) list_view, | |
| 676 | + String data_name, | |
| 677 | + String indent | |
| 678 | + )= | |
| 679 | + since model is db_model(columns, _), | |
| 680 | + indent+join(",\n"+indent, map((String column_name) |-> to_cell_view(columns, column_name, data_name), list_view)). | ... | ... |