Elffuss BraidHub

kikocis/EDC public

main · 849 BRenderedRawPermalink
1# SQL Contract Definition
2
3Provides SQL persistence for contract definitions.
4
5## Prerequisites
6
7Please apply this [schema](src/main/resources/contract-definition-schema.sql) to your SQL database.
8
9## Entity Diagram
10
11![ER Diagram](docs/er.png)
12
13## Create a flexible query API to accommodate `QuerySpec`
14
15_For the first version, only the `limit` and `offset` arguments from the `QuerySpec` will be used._
16
17For subsequent versions it is recommended to re-use the `Clause` interface and its implementors, that were originally
18implemented for CosmosDB, and create an equivalent set of clauses for SQL. Thus, there would be a `Limit-`, `Offset-`
19, `Order-` and `WhereClause` for SQL.
20
21That way, dialect-dependent variants can be implemented should the need arise, because the actual SQL statement is
22encoded in those clauses, offering a fluent Java API.