From 95dbeac75031ffe989a8fe0ed2ce31a1351f5dc5 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 6 Nov 2014 00:19:49 +0100 Subject: [PATCH] data: Add to-string support for array types. --- src/include/core/data.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- 2.30.2