Merge "[CPS] Add configurable params for topic"
authorToine Siebelink <toine.siebelink@est.tech>
Wed, 8 Mar 2023 18:07:13 +0000 (18:07 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 8 Mar 2023 18:07:13 +0000 (18:07 +0000)
cps-ri/src/main/java/org/onap/cps/spi/repository/TempTableCreator.java
cps-ri/src/main/resources/changelog/changelog-master.yaml
cps-ri/src/main/resources/changelog/db/changes/17-add-index-to-schema-set-yang-resources.yaml [new file with mode: 0644]
docs/architecture.rst

index 338b0b1..d798932 100644 (file)
@@ -60,6 +60,7 @@ public class TempTableCreator {
         final StringBuilder sqlStringBuilder = new StringBuilder("CREATE TEMPORARY TABLE ");
         sqlStringBuilder.append(tempTableName);
         defineColumns(sqlStringBuilder, columnNames);
+        sqlStringBuilder.append(" ON COMMIT DROP;");
         insertData(sqlStringBuilder, tempTableName, columnNames, sqlData);
         entityManager.createNativeQuery(sqlStringBuilder.toString()).executeUpdate();
         return tempTableName;
@@ -95,7 +96,7 @@ public class TempTableCreator {
                 sqlStringBuilder.append(",");
             }
         }
-        sqlStringBuilder.append(");");
+        sqlStringBuilder.append(")");
     }
 
     private static void insertData(final StringBuilder sqlStringBuilder,
index cb5392b..43a54ca 100644 (file)
@@ -1,6 +1,6 @@
 # ============LICENSE_START=======================================================
 # Copyright (c) 2021 Bell Canada.
-# Modifications Copyright (C) 2022 Nordix Foundation.
+# Modifications Copyright (C) 2022-2023 Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -47,4 +47,6 @@ databaseChangeLog:
   - include:
       file: changelog/db/changes/15-rename-column-yang-resource-table.yaml
   - include:
-      file: changelog/db/changes/16-insert-cm-handle-state.yaml
\ No newline at end of file
+      file: changelog/db/changes/16-insert-cm-handle-state.yaml
+  - include:
+      file: changelog/db/changes/17-add-index-to-schema-set-yang-resources.yaml
diff --git a/cps-ri/src/main/resources/changelog/db/changes/17-add-index-to-schema-set-yang-resources.yaml b/cps-ri/src/main/resources/changelog/db/changes/17-add-index-to-schema-set-yang-resources.yaml
new file mode 100644 (file)
index 0000000..bc16725
--- /dev/null
@@ -0,0 +1,15 @@
+databaseChangeLog:
+  - changeSet:
+      author: cps
+      id: 17
+      changes:
+        - createIndex:
+            columns:
+              - column:
+                  name: schema_set_id
+            indexName: FKI_SCHEMA_SET_YANG_RESOURCES_SCHEMA_SET_ID_FK
+            tableName: schema_set_yang_resources
+      rollback:
+        - dropIndex:
+            indexName: FKI_SCHEMA_SET_YANG_RESOURCES_SCHEMA_SET_ID_FK
+            tableName: schema_set_yang_resources
index acde1b1..8dde47a 100644 (file)
@@ -21,7 +21,7 @@ In this release CPS is no longer a stand alone component and is released along w
 Project page describing eventual scope and ambition is here:
 `Configuration Persistence Service Project <https://wiki.onap.org/display/DW/Configuration+Persistence+Service+Project>`_
 
-This page reflects the state for Istanbul-R9 release.
+This page reflects the state for the latest release.
 
 .. image:: _static/star.png
     :class: float-left