From 8a452a68971d4c95001a3fbd8243afed3ca5d474 Mon Sep 17 00:00:00 2001 From: Fabrice Lecomte Date: Sun, 10 May 2020 21:45:50 +0200 Subject: [PATCH] Add ShadowJar compatibility and Query file can be define name with comment Add Migration and Query definition class Add Docker DB for tests --- .idea/runConfigurations/Check.xml | 2 +- .idea/runConfigurations/tests.xml | 4 +- docker-compose.yml | 25 + docker/postgresql/Dockerfile | 9 + docker/postgresql/extension.sh | 7 + docker/postgresql/postgresql.conf | 668 ++++++++++++++++++ docker/postgresql/setup.sh | 4 + .../fr/postgresjson/connexion/Requester.kt | 34 +- .../fr/postgresjson/definition/Function.kt | 10 +- .../fr/postgresjson/definition/Migration.kt | 35 + .../fr/postgresjson/definition/Query.kt | 25 + .../fr/postgresjson/definition/Resource.kt | 29 +- .../fr/postgresjson/migration/Migrations.kt | 81 +-- .../fr/postgresjson/utils/searchSqlFiles.kt | 46 ++ .../kotlin/fr/postgresjson/MigrationTest.kt | 23 +- .../kotlin/fr/postgresjson/RequesterTest.kt | 41 +- .../kotlin/fr/postgresjson/TestAbstract.kt | 2 +- src/test/resources/sql/query/Test/exec.sql | 1 + 18 files changed, 949 insertions(+), 97 deletions(-) create mode 100644 docker-compose.yml create mode 100644 docker/postgresql/Dockerfile create mode 100644 docker/postgresql/extension.sh create mode 100644 docker/postgresql/postgresql.conf create mode 100644 docker/postgresql/setup.sh create mode 100644 src/main/kotlin/fr/postgresjson/definition/Migration.kt create mode 100644 src/main/kotlin/fr/postgresjson/definition/Query.kt create mode 100644 src/main/kotlin/fr/postgresjson/utils/searchSqlFiles.kt diff --git a/.idea/runConfigurations/Check.xml b/.idea/runConfigurations/Check.xml index b8c0970..9faa42d 100644 --- a/.idea/runConfigurations/Check.xml +++ b/.idea/runConfigurations/Check.xml @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/.idea/runConfigurations/tests.xml b/.idea/runConfigurations/tests.xml index d7fb66f..ceb308e 100644 --- a/.idea/runConfigurations/tests.xml +++ b/.idea/runConfigurations/tests.xml @@ -1,6 +1,6 @@ - +