cds-dbs
cds-dbs copied to clipboard
feat: static deep operations
Currently all deep operations are calculated on the fly and rely on reading the current state of the database and calculating the difference. This PR targets to no longer calculate the deep operation every time and instead prepares all action based up on the metadata. Creating a js
function for SQLite
and a SQL
procedure for HANA
.
For the INSERT
case it is only possible that all deep operations will with INSERT
statements as well. As it is required that the root entry does not exist in the database and therefor all compositions
cannot exist on the database either.
For the UPDATE
and UPSERT
case it is required to split it into the correct UPDATE
. UPSERT
and DELETE
queries. As the entries might already exist on the database and require to be removed accordingly.