From: Sebastian Harl Date: Wed, 5 Nov 2014 23:19:49 +0000 (+0100) Subject: data: Add to-string support for array types. X-Git-Tag: sysdb-0.6.0~26 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=95dbeac75031ffe989a8fe0ed2ce31a1351f5dc5;p=sysdb.git data: Add to-string support for array types. --- diff --git a/src/include/core/data.h b/src/include/core/data.h index 9ab5cda..cf4e27e 100644 --- a/src/include/core/data.h +++ b/src/include/core/data.h @@ -59,7 +59,14 @@ enum { : ((t) == SDB_TYPE_STRING) ? "STRING" \ : ((t) == SDB_TYPE_DATETIME) ? "DATETIME" \ : ((t) == SDB_TYPE_BINARY) ? "BINARY" \ - : ((t) == SDB_TYPE_REGEX) ? "REGEX" : "UNKNOWN") + : ((t) == SDB_TYPE_REGEX) ? "REGEX" \ + : ((t) == (SDB_TYPE_ARRAY | SDB_TYPE_INTEGER)) ? "[]INTEGER" \ + : ((t) == (SDB_TYPE_ARRAY | SDB_TYPE_DECIMAL)) ? "[]DECIMAL" \ + : ((t) == (SDB_TYPE_ARRAY | SDB_TYPE_STRING)) ? "[]STRING" \ + : ((t) == (SDB_TYPE_ARRAY | SDB_TYPE_DATETIME)) ? "[]DATETIME" \ + : ((t) == (SDB_TYPE_ARRAY | SDB_TYPE_BINARY)) ? "[]BINARY" \ + : ((t) == (SDB_TYPE_ARRAY | SDB_TYPE_REGEX)) ? "[]REGEX" \ + : "UNKNOWN") union sdb_datum; typedef union sdb_datum sdb_datum_t;