index 8533fc705e6467b91840ce97b86cc20a09f14b14..4272ec04f1285e71f0493b7d216d1be717ecaa66 100644 (file)
--- a/src/include/parser/ast.h
+++ b/src/include/parser/ast.h
sdb_ast_node_t super;
int obj_type;
char *hostname; /* optional */
+ int parent_type; /* optional */
+ char *parent; /* optional */
char *name;
+ /* whether to include the full object, that is,
+ * including all attributes and all children */
+ bool full;
sdb_ast_node_t *filter; /* optional */
} sdb_ast_fetch_t;
#define SDB_AST_FETCH(obj) ((sdb_ast_fetch_t *)(obj))
#define SDB_AST_FETCH_INIT \
- { { SDB_OBJECT_INIT, SDB_AST_TYPE_FETCH, -1 }, -1, NULL, NULL, NULL }
+ { { SDB_OBJECT_INIT, SDB_AST_TYPE_FETCH, -1 }, -1, NULL, -1, NULL, NULL, 0, NULL }
/*
* sdb_ast_list_t represents a LIST command.
/* metric specific */
char *store_type;
char *store_id;
+ sdb_time_t store_last_update;
/* attribute specific */
sdb_data_t value;
#define SDB_AST_STORE(obj) ((sdb_ast_store_t *)(obj))
#define SDB_AST_STORE_INIT \
{ { SDB_OBJECT_INIT, SDB_AST_TYPE_STORE, -1 }, \
- -1, NULL, -1, NULL, NULL, 0, NULL, NULL, SDB_DATA_INIT }
+ -1, NULL, -1, NULL, NULL, 0, NULL, NULL, 0, SDB_DATA_INIT }
/*
* sdb_ast_timeseries_t represents a TIMESERIES command.
* takes ownership of the strings and the filter node.
*/
sdb_ast_node_t *
-sdb_ast_fetch_create(int obj_type, char *hostname, char *name,
- sdb_ast_node_t *filter);
+sdb_ast_fetch_create(int obj_type, char *hostname,
+ int parent_type, char *parent, char *name,
+ bool full, sdb_ast_node_t *filter);
/*
* sdb_ast_list_create:
sdb_ast_node_t *
sdb_ast_store_create(int obj_type, char *hostname,
int parent_type, char *parent, char *name, sdb_time_t last_update,
- char *store_type, char *store_id, sdb_data_t value);
+ char *store_type, char *store_id, sdb_time_t store_last_update,
+ sdb_data_t value);
/*
* sdb_ast_timeseries_create: