aboutsummaryrefslogtreecommitdiff
path: root/src/backenddb/merchant-0004.sql
diff options
context:
space:
mode:
authorpriscilla <priscilla.huang@efrei.net>2022-11-16 11:47:29 -0500
committerpriscilla <priscilla.huang@efrei.net>2022-11-16 11:47:29 -0500
commit2b9b937f7fcb96f7ef5c8d22f747391244eb6c6b (patch)
treebaa31b4b64e9e3c39d039b68aaad59698827176e /src/backenddb/merchant-0004.sql
parentdf0e9fd8702e0dc133c61b836571b10c04da80a8 (diff)
template C code
Diffstat (limited to 'src/backenddb/merchant-0004.sql')
-rw-r--r--src/backenddb/merchant-0004.sql34
1 files changed, 12 insertions, 22 deletions
diff --git a/src/backenddb/merchant-0004.sql b/src/backenddb/merchant-0004.sql
index 8e8574e9..eebe2889 100644
--- a/src/backenddb/merchant-0004.sql
+++ b/src/backenddb/merchant-0004.sql
@@ -53,17 +53,14 @@ COMMENT ON COLUMN merchant_template.template_contract
-- C CODE
-
-
/**
- * Delete information about a template. Note that the transaction must
- * enforce that no stocks are currently locked.
+ * Delete information about a template.
*
* @param cls closure
* @param instance_id instance to delete product of
* @param template_id template to delete
* @return DB status code, #GNUNET_DB_STATUS_SUCCESS_NO_RESULTS
- * if locks prevent deletion OR template unknown
+ * if template unknow.
*/
static enum GNUNET_DB_QueryStatus
postgres_delete_template (void *cls,
@@ -87,8 +84,8 @@ postgres_delete_template (void *cls,
* Insert details about a particular template.
*
* @param cls closure
- * @param instance_id instance to insert product for
- * @param template_id product identifier of template to insert
+ * @param instance_id instance to insert template for
+ * @param template_id template identifier of template to insert
* @param pd the template details to insert
* @return database result code
*/
@@ -115,24 +112,17 @@ postgres_insert_template (void *cls,
params);
}
-
-
/**
- * Update details about a particular template. Note that the
- * transaction must enforce that the sold/stocked/lost counters
- * are not reduced (i.e. by expanding the WHERE clause on the existing
- * values).
+ * Update details about a particular template.
*
* @param cls closure
- * @param instance_id instance to lookup template for
- * @param template_id template to lookup
- * @param[out] pd set to the template details on success, can be NULL
+ * @param instance_id instance to update template for
+ * @param template_id template to update
+ * @param pd update to the template details on success, can be NULL
* (in that case we only want to check if the template exists)
- * @return database result code, #GNUNET_DB_STATUS_SUCCESS_NO_RESULTS if the
- * non-decreasing constraints are not met *or* if the template
+ * @return database result code, #GNUNET_DB_STATUS_SUCCESS_NO_RESULTS if the template
* does not yet exist.
*/
-
static enum GNUNET_DB_QueryStatus
postgres_update_template (void *cls,
const char *instance_id,
@@ -225,8 +215,9 @@ lookup_templates_cb (void *cls,
}
}
+
/**
- * Lookup all of the template the given instance has configured.
+ * Lookup all of the templates the given instance has configured.
*
* @param cls closure
* @param instance_id instance to lookup template for
@@ -265,14 +256,13 @@ postgres_lookup_templates (void *cls,
return qs;
}
-
/**
* Lookup details about a particular template.
*
* @param cls closure
* @param instance_id instance to lookup template for
* @param template_id template to lookup
- * @param[out] pd set to the product details on success, can be NULL
+ * @param[out] pd set to the template details on success, can be NULL
* (in that case we only want to check if the template exists)
* @return database result code
*/