aboutsummaryrefslogtreecommitdiff
path: root/src/backenddb/merchant-0004.sql
diff options
context:
space:
mode:
authorpriscilla <priscilla.huang@efrei.net>2022-11-16 08:10:13 -0500
committerpriscilla <priscilla.huang@efrei.net>2022-11-16 08:10:13 -0500
commitdd78f3d2c4c3862344cde18c633a92e798ab24dd (patch)
treeff0c3da4b455261967c538a784af14df02d3242b /src/backenddb/merchant-0004.sql
parentec5700106a75b75310c365a92f23b4a1a55bba2c (diff)
template sql
Diffstat (limited to 'src/backenddb/merchant-0004.sql')
-rw-r--r--src/backenddb/merchant-0004.sql48
1 files changed, 1 insertions, 47 deletions
diff --git a/src/backenddb/merchant-0004.sql b/src/backenddb/merchant-0004.sql
index f18487cc..f77a693a 100644
--- a/src/backenddb/merchant-0004.sql
+++ b/src/backenddb/merchant-0004.sql
@@ -51,37 +51,6 @@ COMMENT ON COLUMN merchant_template.template_contract
IS 'The template contract will contains some additional information.'
-CREATE TABLE IF NOT EXISTS merchant_using_template
- (using_template_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
- ,merchant_serial BIGINT NOT NULL
- REFERENCES merchant_instances (merchant_serial) ON DELETE CASCADE
- ,subject VARCHAR
- ,amount_val INT8 VARCHAR
- ,amount_frac INT4 VARCHAR
- ,UNIQUE (merchant_serial, template_id)
- );
-COMMENT ON TABLE merchant_using_template
- IS 'Public template used by the customer (may be incomplete, frontend can override';
-COMMENT ON COLUMN merchant_using_template.subject
- IS 'Customer can write the subject of the payment';
-COMMENT ON COLUMN merchant_using_template.amount_val
- IS 'Current amount that needs to be enter by the customeer';
-
-
-CREATE TABLE IF NOT EXISTS merchant_using_template_response
- (using_template_response_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
- ,merchant_serial BIGINT NOT NULL
- REFERENCES merchant_instances (merchant_serial) ON DELETE CASCADE
- ,taler_url VARCHAR NOT NULL
- ,UNIQUE (merchant_serial, template_id)
- );
-COMMENT ON TABLE merchant_using_template_response
- IS 'This table is used when the customer needs to finish his payment';
-COMMENT ON COLUMN merchant_using_template.taler_url
- IS 'Returns an url when the user go through a browser';
-
-
-
-- C CODE
@@ -136,7 +105,7 @@ postgres_insert_template (void *cls,
GNUNET_PQ_query_param_string (template_id),
GNUNET_PQ_query_param_string (pd->template_description),
GNUNET_PQ_query_param_string (pd->image),
- GNUNET_PQ_query_param param2[],
+ GNUNET_PQ_query_param [],
GNUNET_PQ_query_param_end
};
@@ -148,21 +117,6 @@ postgres_insert_template (void *cls,
}
-{
- struct PostgresClosure *pg = cls2;
- struct GNUNET_PQ_QueryParam param2[] = {
- TALER_PQ_query_param_amount (&pd->amount),
- GNUNET_PQ_query_param_string (pd->summary),
- GNUNET_PQ_query_param_relativetime (&pd->pay_duration),
- GNUNET_PQ_query_param_uint32 (&pd->minimum_age),
-
- };
-
- check_connection (pg);
- return GNUNET_PQ_eval_prepared_non_select (pg->conn,
- "insert_template",
- params);
-}
/**
* Update details about a particular template. Note that the