Commit 1fb914b99b50133d1e5ecf42399b997683970ecd

Authored by David RENÉ
1 parent fa876ec4

[~] to_String from DB_id return NULL instead of none. This allow to use it direc…

…tly in SQL query instead of "none" which produce an error
[+] add to_SQL from DB_id wich return result as to_String
Showing 1 changed file with 12 additions and 1 deletions   Show diff stats
database/db_types.anubis
... ... @@ -87,10 +87,21 @@ public define String
87 87 )=
88 88 if idx is
89 89 {
90   - none then "none",
  90 + none then "NULL",
91 91 db_id(_idx) then abs_to_decimal(_idx)
92 92 }.
93 93  
  94 +public define String
  95 + to_SQL
  96 + (
  97 + DB_id idx
  98 + )=
  99 + if idx is
  100 + {
  101 + none then "NULL",
  102 + db_id(_idx) then abs_to_decimal(_idx)
  103 + }.
  104 +
94 105 public define Maybe(Int)
95 106 to_mb_Int
96 107 (
... ...