Commit e87afa6d6cfb2d0a6dff55576bb57e79661964eb
1 parent
2cff260c
add to_JsonValue for DB_id
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
database/db_types.anubis
| ... | ... | @@ -13,6 +13,7 @@ transmit calexium_lib/database/types/db_date.anubis |
| 13 | 13 | transmit calexium_lib/database/types/db_time.anubis |
| 14 | 14 | transmit calexium_lib/database/types/db_datetime.anubis |
| 15 | 15 | transmit calexium_lib/database/types/db_integer.anubis |
| 16 | +transmit calexium_lib/web/CXM_json.anubis | |
| 16 | 17 | |
| 17 | 18 | /* DB_id will is deprecated. Please use next version below all upper case */ |
| 18 | 19 | //public type DB_id: |
| ... | ... | @@ -34,6 +35,17 @@ public define String |
| 34 | 35 | db_id(_idx) then abs_to_decimal(_idx) |
| 35 | 36 | }. |
| 36 | 37 | |
| 38 | +public define JsonValue | |
| 39 | + to_JsonValue | |
| 40 | + ( | |
| 41 | + DB_id idx | |
| 42 | + )= | |
| 43 | + if idx is | |
| 44 | + { | |
| 45 | + none then json_string("none"), | |
| 46 | + db_id(_idx) then json_int(_idx) | |
| 47 | + }. | |
| 48 | + | |
| 37 | 49 | public define String |
| 38 | 50 | String s + DB_id idx = |
| 39 | 51 | s + to_String(idx) | ... | ... |