From: zacheiss Date: Mon, 20 Oct 2003 19:42:10 +0000 (+0000) Subject: Implement glic query for returning the container associated with a given X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/6e442c4594b9e7db2c90b3dcc7e3b13b09c5ed15 Implement glic query for returning the container associated with a given list. --- diff --git a/server/queries2.c b/server/queries2.c index f3331872..e29cc732 100644 --- a/server/queries2.c +++ b/server/queries2.c @@ -3834,6 +3834,24 @@ static char *gcli_fields[] = { "containername", "listname", }; +static struct validate glic_validate = +{ + VOlist0, + 1, + NULL, + NULL, + 0, + 0, + 0, + 0, + 0, +}; + +static char *glic_fields[] = { + "listname", + "containername", "listname", +}; + /* Generalized Query Definitions */ /* Multiple versions of the same query MUST be listed in ascending @@ -7750,6 +7768,23 @@ struct query Queries[] = { NULL, }, + { + /* G_GLIC - GET_LIST_CONTAINER, v9 */ + "get_list_container", + "glic", + 9, + RETRIEVE, + "c", + CONTAINERS_TABLE, + "c.name, l.name FROM containers c, list l", + glic_fields, + 2, + "l.list_id = %d AND l.list_id = c.list_id and c.list_id != 0", + 1, + NULL, + &glic_validate, + }, + }; int QueryCount = (sizeof(Queries) / sizeof(struct query));