You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR: #1322 adds a Postgresql table to serve as a signed document's repository.
Create supporting queries for that table in the catalyst-gateway/bin/src/db/event/signed_docs path.
Follow the structure for query implementation as shown in the catalyst-gateway/bin/src/db/event/config path.
The query operations that will be required initially are:
There will be other query options, this function should take an enum type as a parameter, which contains the required variables. The Enum type then can emit the necessary WHERE clause to append to the query, Results should always be sorted by id and then ver.
None of these endpoints is to take any raw SQL, it is to construct it from defined and controlled parameters.
For example, it is impermissible to pass a "WHERE" query string to any of these functions.
Each of these queries is to be an independent PR of this ticket.
As these functions require a PostgreSQL database to function, and data injected within it, they do not need unit tests. They will be tested via integration tests which are outside the scope of this ticket. However, any sub-functions which do not have a dependency on external IO should have appropriate unit tests.
The text was updated successfully, but these errors were encountered:
stevenj
changed the title
Add Basic Database Queries to support the signed_docs table.
๐ ๏ธ [TASK] : Add Basic Database Queries to support the signed_docs table.
Dec 4, 2024
PR: #1322 adds a Postgresql table to serve as a signed document's repository.
Create supporting queries for that table in the
catalyst-gateway/bin/src/db/event/signed_docs
path.Follow the structure for query implementation as shown in the
catalyst-gateway/bin/src/db/event/config
path.The query operations that will be required initially are:
catalyst-gateway/event-db/queries/insert_signed_documents.sql
query make a function forcat-gateway
serviceย #1375(id,ver)
does not exist, then add the new record. Return success.catalyst-gateway/event-db/queries/select_signed_documents.sql.jinja
query make a function forcat-gateway
serviceย #1376payload
andraw
fields.ver
should be able to be optional, in which case get thelatest
ver of the givenid
catalyst-gateway/event-db/queries/select_signed_documents_2.sql.jinja
query make a function forcat-gateway
serviceย #1377id
id
andver
type
author
type
andauthor
id
and thenver
.type
,id
,ver
None of these endpoints is to take any raw SQL, it is to construct it from defined and controlled parameters.
For example, it is impermissible to pass a "WHERE" query string to any of these functions.
Each of these queries is to be an independent PR of this ticket.
As these functions require a PostgreSQL database to function, and data injected within it, they do not need unit tests. They will be tested via integration tests which are outside the scope of this ticket. However, any sub-functions which do not have a dependency on external IO should have appropriate unit tests.
The text was updated successfully, but these errors were encountered: