Use native query to delete data nodes 84/132984/5
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Mon, 23 Jan 2023 12:51:15 +0000 (12:51 +0000)
committersourabh_sourabh <sourabh.sourabh@est.tech>
Mon, 23 Jan 2023 16:33:54 +0000 (16:33 +0000)
commit7421c69ac9765cc390c8d50911e354a6c241e243
tree32a3a512576721d6c775465c90fd936953f0d26e
parentc6bebbcfc4dbef5e91245b5f69714b238c0515af
Use native query to delete data nodes

- Used hashcode to remove child fragment based on it's xpath
- Used native query to delete fragment by altering fragment_parent_id_fkey CONSTRAINT.

Issue-ID: CPS-1439

Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: If19c449818e18f8fd666503b7346704eeb4a95d0
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
cps-ri/src/main/java/org/onap/cps/spi/entities/FragmentEntity.java
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java
cps-ri/src/main/java/org/onap/cps/spi/repository/FragmentNativeRepository.java [new file with mode: 0644]
cps-ri/src/main/java/org/onap/cps/spi/repository/FragmentNativeRepositoryImpl.java [new file with mode: 0644]
cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceSpec.groovy
cps-ri/src/test/groovy/org/onap/cps/spi/performance/CpsDataPersistenceServiceDeletePerfTest.groovy