]> andersk Git - moira.git/blobdiff - server/qfollow.pc
Modify queries that effect the services table (asvc, dsvc, gvc).
[moira.git] / server / qfollow.pc
index 6bfee37ce458a4e5532143a9691f11086f94037e..ef387eaea5ae8c20fb104ae2abcb271d5e904587 100644 (file)
@@ -280,6 +280,28 @@ int set_zephyr_modtime(struct query *q, char *argv[], client *cl)
   return MR_SUCCESS;
 }
 
+/* sets the modtime on an entry in services table, where argv[0] contains
+ * the service name.
+ */
+
+int set_service_modtime(struct query *q, char *argv[], client *cl)
+{
+  EXEC SQL BEGIN DECLARE SECTION;
+  char *service, *protocol, *entity;
+  int who;
+  EXEC SQL END DECLARE SECTION;
+
+  entity = cl->entity;
+  who = cl->client_id; 
+
+  service = argv[0];
+  protocol = argv[1];
+
+  EXEC SQL UPDATE services SET modtime = SYSDATE, modby = :who,
+    modwith = :entity WHERE name = :service AND protocol = :protocol;
+
+  return MR_SUCCESS;
+}
 
 /* fixes the modby field.  This will be the second to last thing in the
  * argv, the argv length is determined from the query structure.  It is
This page took 0.038608 seconds and 4 git commands to generate.