From a655c67aa1def9fa5a8924eb6299fb272d6b8f87 Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Mon, 2 Sep 2024 00:16:18 +0100 Subject: Implement ancestor axis in SQL Currenty ancestor axis is implemented in Java using regex, which then sends a second SQL query to fetch ancestors. Implementing ancestor axis in SQL is more efficient, and is needed for limiting/paginating Cps Path Query results. Issue-ID: CPS-2416 Signed-off-by: danielhanrahan Change-Id: I0d8933f86c5a422f366ad7c417a17e263a13960f --- .../cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy | 1 + 1 file changed, 1 insertion(+) (limited to 'integration-test/src/test') diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy index 5c2a4fc665..3b49cfc415 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy @@ -224,6 +224,7 @@ class QueryServiceIntegrationSpec extends FunctionalSpecBase { 'ancestor with parent that does not exist' | '//books/ancestor::parentDoesNoExist/categories' || [] 'ancestor does not exist' | '//books/ancestor::ancestorDoesNotExist' || [] 'ancestor combined with contains condition' | '//books[contains(@title,"Mat")]/ancestor::bookstore' || ["/bookstore"] + 'ancestor is the same as search target' | '//books/ancestor::books' || [] } def 'Query for attribute by cps path of type ancestor with #scenario descendants.'() { -- cgit 1.2.3-korg