Commit 7de986f5d920d7035d1fad160a37b97f52f9e3ae

Authored by David RENE
1 parent 451b436d

Add NO_NAME_MSG for Muscle message name

Add /database/db_types.anubis. This help to manage database type more safely
calexium_lib/CXM_message_constants.anubis
... ... @@ -5,8 +5,9 @@
5 5 * Time: 16:06
6 6 * (c) Calexium
7 7 *
8   - * To change this template use Tools | Options | Coding | Edit Standard Headers.
9 8 */
  9 +
  10 +public define Word32 _NO_NAME_MSG = 0x00000000.
10 11  
11 12 // **************** MAILBOX PROTOCOL ***************
12 13  
... ...
calexium_lib/database/db_types.anubis 0 → 100644
  1 +/*
  2 + * Created by PyramIDE.
  3 + * User: Totoro
  4 + * Date: 14/11/2011
  5 + * Time: 22:41
  6 + *
  7 + * To change this template use Tools | Options | Coding | Edit Standard Headers.
  8 + */
  9 +read tools/basis.anubis
  10 +
  11 +public type DB_id:
  12 + none,
  13 + db_id(Int value).
  14 +
  15 +public type DB_datetime:
  16 + datetime(String datetime).
  17 +
  18 +public type DB_date:
  19 + date(String date).
  20 +
  21 +public type DB_integer:
  22 + db_integer(Int value).
  23 +
  24 +
  25 +public define String
  26 + to_String
  27 + (
  28 + DB_id idx
  29 + )=
  30 + if idx is
  31 + {
  32 + none then "none",
  33 + db_id(idx) then abs_to_decimal(idx)
  34 + }.
  35 +
  36 +public define String
  37 + to_String
  38 + (
  39 + DB_date d
  40 + )=
  41 + d.date.
  42 +
  43 +public define String
  44 + to_String
  45 + (
  46 + DB_datetime d
  47 + )=
  48 + d.datetime.
  49 +
  50 +public define String
  51 + to_DBString
  52 + (
  53 + Bool value
  54 + )=
  55 + if value then "1" else "0".
  56 +
  57 +public type SQLite3_update_field:
  58 + field(String column, SQLite3Bind bind).
  59 +
... ...
calexium_lib/database/db_utils.anubis
... ... @@ -81,7 +81,7 @@ public define DbQueryResult
81 81 with t0 = unow,
82 82 if sql_query_timeout(db, sql_query, initial_bindings, 60, 100, (DbError _) |-> false) is
83 83 {
84   - error(sql_error) then logError("DB", db_error(sql_error,msg));
  84 + error(sql_error) then logError("DB", db_error(sql_error,msg) + " executing [" + sql_query + "]");
85 85 __logLongQueries(t0, sql_query);
86 86 error(sql_error),
87 87 ok(headers, cursor, reset) then
... ... @@ -124,7 +124,8 @@ public define SQLite3QueryResult
124 124 with t0 = unow,
125 125 if sql_query_timeout(db, sql_query, initial_bindings, 60, 100) is
126 126 {
127   - error(sql_error) then logError("DB", db_error(sql_error,msg));
  127 + error(sql_error) then logError("DB", db_error(sql_error,msg) /*+ " executing [" + sql_query + "]"*/);
  128 + //println(" executing [" + sql_query + "]");
128 129 __logLongQueries(t0, sql_query);
129 130 error(sql_error),
130 131 ok(headers, cursor, reset) then
... ...
calexium_lib/web/CXM_making_a_web_site.anubis
... ... @@ -3524,7 +3524,7 @@ define Printable_tree
3524 3524 {
3525 3525 [ ] then [ ],
3526 3526 [h . t] then if h is cell(options,element) then
3527   - ["<td ",format(reverse(normalize(options))),">",
  3527 + ["<td",format(reverse(normalize(options))),">",
3528 3528 format_element(element),
3529 3529 "</td>"
3530 3530 . format(t,format_element)]
... ... @@ -3558,7 +3558,7 @@ define Printable_tree
3558 3558 {
3559 3559 [ ] then [ ],
3560 3560 [h . t] then if h is row(options,cells) then
3561   - ["<tr ",format(reverse(options)),">",
  3561 + ["<tr",format(reverse(options)),">",
3562 3562 format(cells,format_element),
3563 3563 "</tr>\n"
3564 3564 . format(t,format_element)]
... ... @@ -3574,7 +3574,7 @@ define Printable_tree
3574 3574 {
3575 3575 empty then [ ],
3576 3576 header_row(options,cells) then
3577   - ["<thead> <tr ",format(reverse(options)),">",
  3577 + ["<thead> <tr",format(reverse(options)),">",
3578 3578 format(cells,format_element),
3579 3579 "</tr> </thead>\n"
3580 3580 ]
... ... @@ -3590,7 +3590,7 @@ define Printable_tree
3590 3590 {
3591 3591 empty then [ ],
3592 3592 footer_row(options,cells) then
3593   - ["<tfoot> <tr ",format(reverse(options)),">",
  3593 + ["<tfoot> <tr",format(reverse(options)),">",
3594 3594 format(cells,format_element),
3595 3595 "</tr> </tfoot>\n"
3596 3596 ]
... ... @@ -3890,18 +3890,18 @@ define Printable_tree
3890 3890 if element is
3891 3891 {
3892 3892 any_text(opts,t) then
3893   - ["<span ", format_text_options(opts), ">",t,"</span>"],
  3893 + ["<span", format_text_options(opts), ">",t,"</span>"],
3894 3894 any_preformated(opts,s) then
3895   - ["<span ", format_text_options(opts), "><pre>",s,"</pre></span>"],
  3895 + ["<span", format_text_options(opts), "><pre>",s,"</pre></span>"],
3896 3896 //["<pre>",s,"</pre>"],
3897 3897 any_paragraph(opts,e) then
3898   - ["<p ", format_text_options(opts), ">",format_element(e),"</p>\n"],
  3898 + ["<p", format_text_options(opts), ">",format_element(e),"</p>\n"],
3899 3899 any_image(opts, url, alt) then
3900 3900 ["<img alt=\"",alt,"\" src=\"",url,"\" ", format_attrs(opts)," />"],
3901 3901 any_image(opts, url, alt, w, h) then
3902 3902 ["<img alt=\"",alt,"\" src=\"",url,"\" width=\"",w,"\" height=\"",h,"\" ", format_attrs(opts)," />"],
3903 3903 any_table(opts,h_row, rows, f_row) then
3904   - ["<table ",format(reverse(opts),false),">",
  3904 + ["<table",format(reverse(opts),false),">",
3905 3905 format(h_row, format_element),
3906 3906 "<tbody>",format(rows,format_element),"</tbody>",
3907 3907 format(f_row, format_element),
... ...