Code

store: Add the timeseries field to metrics.
[sysdb.git] / src / core / store.c
index eb58ad83b1ba2cd36b5fba803e42313758ea3d38..bf12a9378eb228e811a87ea268eb8fa403991672 100644 (file)
@@ -946,6 +946,11 @@ sdb_store_get_field(sdb_store_obj_t *obj, int field, sdb_data_t *res)
                        if (! res)
                                return 0;
                        return sdb_data_copy(res, &ATTR(obj)->value);
+               case SDB_FIELD_TIMESERIES:
+                       if (obj->type != SDB_METRIC)
+                               return -1;
+                       tmp.type = SDB_TYPE_BOOLEAN;
+                       tmp.data.boolean = METRIC(obj)->store.type != NULL;
                default:
                        return -1;
        }