From df15cf4f664f85e110f8a835780f5e53a159f7e3 Mon Sep 17 00:00:00 2001 From: totoro Date: Tue, 26 Apr 2016 09:14:44 +0200 Subject: [PATCH] deprecate the DB_id to DB_ID --- database/db_types.anubis | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/database/db_types.anubis b/database/db_types.anubis index e421bbb..aace0c5 100644 --- a/database/db_types.anubis +++ b/database/db_types.anubis @@ -8,9 +8,14 @@ transmit tools/basis.anubis transmit tools/ISO-8601.anubis +/* DB_id will is deprecated. Please use next version below all upper case */ public type DB_id: none, db_id(Int value). + +public type DB_ID: + none, + pk(Int value). public type DB_datetime: db_datetime(String datetime). //Date and time in ISO8601 format "YYYY-MM-DD hh:mm:ss" @@ -35,7 +40,7 @@ public define String none then "none", db_id(_idx) then abs_to_decimal(_idx) }. - + public define Int to_Int ( @@ -50,6 +55,30 @@ public define Int public define String to_String ( + DB_ID idx + )= + if idx is + { + none then "none", + pk(_idx) then abs_to_decimal(_idx) + }. + +public define Int + to_Int + ( + DB_ID idx + )= + if idx is + { + none then (Int)-1, + pk(_idx) then _idx + }. + + + +public define String + to_String + ( DB_date d )= date(d). -- libgit2 0.21.4