diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9265703..88d39177 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,27 +4,27 @@ on: branches: - master pull_request: - types: [opened, synchronize, reopened] + types: [ opened, synchronize, reopened ] jobs: unit-tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm --prefix users/authservice ci - - run: npm --prefix users/userservice ci - - run: npm --prefix gatewayservice ci - - run: npm --prefix webapp ci - - run: npm --prefix users/authservice test -- --coverage - - run: npm --prefix users/userservice test -- --coverage - - run: npm --prefix gatewayservice test -- --coverage - - run: npm --prefix webapp test -- --coverage - - name: Analyze with SonarCloud - uses: sonarsource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm --prefix users/authservice ci + - run: npm --prefix users/userservice ci + - run: npm --prefix gatewayservice ci + - run: npm --prefix webapp ci + - run: npm --prefix users/authservice test -- --coverage + - run: npm --prefix users/userservice test -- --coverage + - run: npm --prefix gatewayservice test -- --coverage + - run: npm --prefix webapp test -- --coverage + - name: Analyze with SonarCloud + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5e2bd52..e0bcd4f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,57 +2,57 @@ name: Deploy on release on: release: - types: [published] + types: [ published ] jobs: unit-tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm --prefix users/authservice ci - - run: npm --prefix users/userservice ci - - run: npm --prefix gatewayservice ci - - run: npm --prefix webapp ci - - run: npm --prefix users/authservice test -- --coverage - - run: npm --prefix users/userservice test -- --coverage - - run: npm --prefix gatewayservice test -- --coverage - - run: npm --prefix webapp test -- --coverage - - name: Analyze with SonarCloud - uses: sonarsource/sonarcloud-github-action@master - env: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm --prefix users/authservice ci + - run: npm --prefix users/userservice ci + - run: npm --prefix gatewayservice ci + - run: npm --prefix webapp ci + - run: npm --prefix users/authservice test -- --coverage + - run: npm --prefix users/userservice test -- --coverage + - run: npm --prefix gatewayservice test -- --coverage + - run: npm --prefix webapp test -- --coverage + - name: Analyze with SonarCloud + uses: sonarsource/sonarcloud-github-action@master + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} e2e-tests: - needs: [unit-tests] + needs: [ unit-tests ] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm --prefix users/authservice install - - run: npm --prefix users/userservice install - - run: npm --prefix gatewayservice install - - run: npm --prefix webapp install - - run: npm --prefix webapp run build - - run: npm --prefix webapp run test:e2e + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm --prefix users/authservice install + - run: npm --prefix users/userservice install + - run: npm --prefix gatewayservice install + - run: npm --prefix webapp install + - run: npm --prefix webapp run build + - run: npm --prefix webapp run test:e2e docker-push-webapp: name: Push webapp Docker Image to GitHub Packages runs-on: ubuntu-latest permissions: contents: read packages: write - needs: [e2e-tests] + needs: [ e2e-tests ] steps: - - uses: actions/checkout@v4 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v5 - env: - API_URI: http://${{ secrets.DEPLOY_HOST }}:8000 - with: + - uses: actions/checkout@v4 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@v5 + env: + API_URI: http://${{ secrets.DEPLOY_HOST }}:8000 + with: name: arquisoft/wiq_es04b/webapp username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -65,12 +65,12 @@ jobs: permissions: contents: read packages: write - needs: [e2e-tests] + needs: [ e2e-tests ] steps: - - uses: actions/checkout@v4 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v5 - with: + - uses: actions/checkout@v4 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@v5 + with: name: arquisoft/wiq_es04b/authservice username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -82,47 +82,47 @@ jobs: permissions: contents: read packages: write - needs: [e2e-tests] + needs: [ e2e-tests ] steps: - - uses: actions/checkout@v4 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v5 - with: - name: arquisoft/wiq_es04b/userservice - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: ghcr.io - workdir: users/userservice + - uses: actions/checkout@v4 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@v5 + with: + name: arquisoft/wiq_es04b/userservice + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: ghcr.io + workdir: users/userservice docker-push-gatewayservice: name: Push gateway service Docker Image to GitHub Packages runs-on: ubuntu-latest permissions: contents: read packages: write - needs: [e2e-tests] + needs: [ e2e-tests ] steps: - - uses: actions/checkout@v4 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v5 - with: - name: arquisoft/wiq_es04b/gatewayservice - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: ghcr.io - workdir: gatewayservice + - uses: actions/checkout@v4 + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@v5 + with: + name: arquisoft/wiq_es04b/gatewayservice + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: ghcr.io + workdir: gatewayservice deploy: name: Deploy over SSH runs-on: ubuntu-latest - needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp] + needs: [ docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp ] steps: - - name: Deploy over SSH - uses: fifsky/ssh-action@master - with: - host: ${{ secrets.DEPLOY_HOST }} - user: ${{ secrets.DEPLOY_USER }} - key: ${{ secrets.DEPLOY_KEY }} - command: | - wget https://raw.githubusercontent.com/arquisoft/wiq_es04b/master/docker-compose.yml -O docker-compose.yml - wget https://raw.githubusercontent.com/arquisoft/wiq_es04b/master/.env -O .env - docker compose down - docker compose --profile prod up -d + - name: Deploy over SSH + uses: fifsky/ssh-action@master + with: + host: ${{ secrets.DEPLOY_HOST }} + user: ${{ secrets.DEPLOY_USER }} + key: ${{ secrets.DEPLOY_KEY }} + command: | + wget https://raw.githubusercontent.com/arquisoft/wiq_es04b/master/docker-compose.yml -O docker-compose.yml + wget https://raw.githubusercontent.com/arquisoft/wiq_es04b/master/.env -O .env + docker compose down + docker compose --profile prod up -d diff --git a/.gitignore b/.gitignore index 8bbe72a8..95f3dff6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,87 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ +*.lck node_modules coverage -docs/build \ No newline at end of file +docs/build +.idea/compiler.xml +.idea/encodings.xml +.idea/jarRepositories.xml +.idea/misc.xml +.idea/vcs.xml +database/hsqldb/build/antivy-setup.xml +database/hsqldb/build/build-dist.gradle +database/hsqldb/build/build-dist.xml +database/hsqldb/build/build-docbook.xml +database/hsqldb/build/build.gradle +database/hsqldb/build/build.hsqldb.cmd +database/hsqldb/build/build.hsqldbtest.cmd +database/hsqldb/build/build.javadoc.cmd +database/hsqldb/build/build.sqltool.cmd +database/hsqldb/build/build.test.suite.cmd +database/hsqldb/build/build.xml +database/hsqldb/build/cfdistro.bash +database/hsqldb/build/clean.test.suite.cmd +database/hsqldb/build/dbuInstallSheetsWrapper.groovy +database/hsqldb/build/dependencies.gradle +database/hsqldb/build/DocBookUtil.groovy +database/hsqldb/build/gradle/wrapper/gradle-wrapper.jar +database/hsqldb/build/gradle/wrapper/gradle-wrapper.properties +database/hsqldb/build/gradlew +database/hsqldb/build/gradlew.bat +database/hsqldb/build/gui-initial.setting +database/hsqldb/build/gui-welcome.txt +database/hsqldb/build/hsqldb.bnd +database/hsqldb/build/ivy.xml +database/hsqldb/build/ivysettings-sample.xml +database/hsqldb/build/jdkcodeswitch.list +database/hsqldb/build/mvn-pub.gradle +database/hsqldb/build/rng-catalog-template.xml +database/hsqldb/build/run.test.suite.cmd +database/hsqldb/build/setenv.cmd +database/hsqldb/build/settings.gradle +database/hsqldb/build/test.dbmd.convert.properties +database/hsqldb/build/test.properties +database/hsqldb/build/test.xml +target/classes/application.properties +target/classes/com/uniovi/controllers/CustomErrorController.class +target/classes/com/uniovi/controllers/HomeController.class +target/classes/com/uniovi/entities/AppUser.class +target/classes/com/uniovi/WiqEs04bApplication.class +target/classes/static/css/custom.css +target/classes/templates/error.html +target/classes/templates/fragments/footer.html +target/classes/templates/fragments/head.html +target/classes/templates/fragments/nav.html +target/classes/templates/index.html diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..13566b81 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..cb28b0e3 Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..5f0536eb --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/README.md b/README.md index 1a2b35ea..061b7c03 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_wiq_es04b&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Arquisoft_wiq_es04b) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_wiq_es04b&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Arquisoft_wiq_es04b) -This is a base repo for the [Software Architecture course](http://arquisoft.github.io/) in [2023/2024 edition](https://arquisoft.github.io/course2324.html). +This is a base repo for the [Software Architecture course](http://arquisoft.github.io/) +in [2023/2024 edition](https://arquisoft.github.io/course2324.html). This repo is a basic application composed of several components. @@ -39,7 +40,8 @@ First, start the database. Either install and run Mongo or run it using docker: You can also use services like Mongo Altas for running a Mongo database in the cloud. -Now, launch the auth, user and gateway services. Just go to each directory and run `npm install` followed by `npm start`. +Now, launch the auth, user and gateway services. Just go to each directory and run `npm install` followed +by `npm start`. Lastly, go to the webapp directory and launch this component with `npm install` followed by `npm start`. @@ -47,23 +49,28 @@ After all the components are launched, the app should be available in localhost ## Deployment -For the deployment, we have several options. +For the deployment, we have several options. -The first and more flexible is to deploy to a virtual machine using SSH. This will work with any cloud service (or with our own server). +The first and more flexible is to deploy to a virtual machine using SSH. This will work with any cloud service (or with +our own server). -Other options include using the container services that most cloud services provide. This means, deploying our Docker containers directly. +Other options include using the container services that most cloud services provide. This means, deploying our Docker +containers directly. -We are going to use the first approach, creating a virtual machine in a cloud service and after installing docker and docker-compose, deploy our containers there using GitHub Actions and SSH. +We are going to use the first approach, creating a virtual machine in a cloud service and after installing docker and +docker-compose, deploy our containers there using GitHub Actions and SSH. ### Machine requirements for deployment -The machine for deployment can be created in services like Microsoft Azure or Amazon AWS. These are in general the settings that it must have: +The machine for deployment can be created in services like Microsoft Azure or Amazon AWS. These are in general the +settings that it must have: - Linux machine with Ubuntu > 20.04. - Docker and docker-compose installed. - Open ports for the applications installed (in this case, ports 3000 for the webapp and 8000 for the gateway service). -Once you have the virtual machine created, you can install **docker** and **docker-compose** using the following instructions: +Once you have the virtual machine created, you can install **docker** and **docker-compose** using the following +instructions: ```ssh sudo apt update @@ -79,11 +86,14 @@ sudo chmod +x /usr/local/bin/docker-compose ### Continuous delivery (GitHub Actions) -Once we have our machine ready, we could deploy by hand the application, taking our docker-compose file and executing it in the remote machine. +Once we have our machine ready, we could deploy by hand the application, taking our docker-compose file and executing it +in the remote machine. -In this repository, this process is done automatically using **GitHub Actions**. The idea is to trigger a series of actions when some condition is met in the repository. +In this repository, this process is done automatically using **GitHub Actions**. The idea is to trigger a series of +actions when some condition is met in the repository. -As you can see, unitary tests of each module and e2e tests are executed before pushing the docker images and deploying them. Using this approach we avoid deploying versions that do not pass the tests. +As you can see, unitary tests of each module and e2e tests are executed before pushing the docker images and deploying +them. Using this approach we avoid deploying versions that do not pass the tests. The deploy action is the following: @@ -107,11 +117,14 @@ deploy: ``` This action uses three secrets that must be configured in the repository: + - DEPLOY_HOST: IP of the remote machine. - DEPLOY_USER: user with permission to execute the commands in the remote machine. - DEPLOY_KEY: key to authenticate the user in the remote machine. -Note that this action logs in the remote machine and downloads the docker-compose file from the repository and launches it. Obviously, previous actions have been executed which have uploaded the docker images to the GitHub Packages repository. +Note that this action logs in the remote machine and downloads the docker-compose file from the repository and launches +it. Obviously, previous actions have been executed which have uploaded the docker images to the GitHub Packages +repository. ### 🚀 TEAM diff --git a/database/hsqldb/bin/runManagerSwing.bat b/database/hsqldb/bin/runManagerSwing.bat new file mode 100644 index 00000000..9a42b3c0 --- /dev/null +++ b/database/hsqldb/bin/runManagerSwing.bat @@ -0,0 +1,2 @@ +cd ..\data +@java -classpath ..\lib\hsqldb.jar org.hsqldb.util.DatabaseManagerSwing %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/database/hsqldb/bin/runServer.bat b/database/hsqldb/bin/runServer.bat new file mode 100644 index 00000000..19c0dff1 --- /dev/null +++ b/database/hsqldb/bin/runServer.bat @@ -0,0 +1,2 @@ +cd ..\data +@java -classpath ../lib/hsqldb.jar org.hsqldb.server.Server %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/database/hsqldb/bin/runWebServer.bat b/database/hsqldb/bin/runWebServer.bat new file mode 100644 index 00000000..d9091188 --- /dev/null +++ b/database/hsqldb/bin/runWebServer.bat @@ -0,0 +1,2 @@ +cd ..\data +@java -classpath ..\lib\hsqldb.jar org.hsqldb.server.WebServer %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/database/hsqldb/data/test.lck b/database/hsqldb/data/test.lck new file mode 100644 index 00000000..d08d2b77 Binary files /dev/null and b/database/hsqldb/data/test.lck differ diff --git a/database/hsqldb/data/test.log b/database/hsqldb/data/test.log new file mode 100644 index 00000000..dd542e3b --- /dev/null +++ b/database/hsqldb/data/test.log @@ -0,0 +1,3 @@ +/*C1*/SET SCHEMA SYSTEM_LOBS +INSERT INTO BLOCKS VALUES(0,2147483647,0) +COMMIT diff --git a/database/hsqldb/data/test.properties b/database/hsqldb/data/test.properties new file mode 100644 index 00000000..918179e2 --- /dev/null +++ b/database/hsqldb/data/test.properties @@ -0,0 +1,5 @@ +#HSQL Database Engine 2.7.2 +#Mon Feb 19 20:12:00 CET 2024 +tx_timestamp=1 +modified=yes +version=2.7.2 diff --git a/database/hsqldb/data/test.script b/database/hsqldb/data/test.script new file mode 100644 index 00000000..d5ddda2c --- /dev/null +++ b/database/hsqldb/data/test.script @@ -0,0 +1,44 @@ +SET DATABASE UNIQUE NAME HSQLDB8DC2C840C9 +SET DATABASE DEFAULT RESULT MEMORY ROWS 0 +SET DATABASE EVENT LOG LEVEL 0 +SET DATABASE TRANSACTION CONTROL LOCKS +SET DATABASE DEFAULT ISOLATION LEVEL READ COMMITTED +SET DATABASE TRANSACTION ROLLBACK ON CONFLICT TRUE +SET DATABASE TEXT TABLE DEFAULTS '' +SET DATABASE SQL NAMES FALSE +SET DATABASE SQL RESTRICT EXEC FALSE +SET DATABASE SQL REFERENCES FALSE +SET DATABASE SQL SIZE TRUE +SET DATABASE SQL TYPES FALSE +SET DATABASE SQL TDC DELETE TRUE +SET DATABASE SQL TDC UPDATE TRUE +SET DATABASE SQL SYS INDEX NAMES TRUE +SET DATABASE SQL CONCAT NULLS TRUE +SET DATABASE SQL UNIQUE NULLS TRUE +SET DATABASE SQL CONVERT TRUNCATE TRUE +SET DATABASE SQL AVG SCALE 0 +SET DATABASE SQL DOUBLE NAN TRUE +SET FILES WRITE DELAY 500 MILLIS +SET FILES BACKUP INCREMENT TRUE +SET FILES CACHE SIZE 10000 +SET FILES CACHE ROWS 50000 +SET FILES SCALE 32 +SET FILES LOB SCALE 32 +SET FILES DEFRAG 0 +SET FILES NIO TRUE +SET FILES NIO SIZE 256 +SET FILES LOG TRUE +SET FILES LOG SIZE 50 +SET FILES CHECK 1 +SET DATABASE COLLATION SQL_TEXT PAD SPACE +CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e' +ALTER USER SA SET LOCAL TRUE +CREATE SCHEMA PUBLIC AUTHORIZATION DBA +ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1 +SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC +GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CARDINAL_NUMBER TO PUBLIC +GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.YES_OR_NO TO PUBLIC +GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CHARACTER_DATA TO PUBLIC +GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.SQL_IDENTIFIER TO PUBLIC +GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.TIME_STAMP TO PUBLIC +GRANT DBA TO SA diff --git a/database/hsqldb/doc-src/changelist_2_0.txt b/database/hsqldb/doc-src/changelist_2_0.txt new file mode 100644 index 00000000..b86a10c3 --- /dev/null +++ b/database/hsqldb/doc-src/changelist_2_0.txt @@ -0,0 +1,535 @@ +March 2023 - version 2.7.2 +== version 2.7.2 is a release with minor enhancements and corrections + +20 Oct 2022 - version 2.7.1 +-- version 2.7.1 jar requires JRE 11 or later - tested up to Java 17 +-- version 2.7.1 alternative jar requires JRE 8 or later +-- CVE-2022-41853 disallow calling java methods - setting the hsqldb.method_class_names is required for accessing java methods +-- enhancements to RECURSIVE CTE's + +30 May 2022 - version 2.7.0 +-- version 2.7.0 jar requires JRE 11 or later - tested up to Java 17 +-- version 2.7.0 alternative jar requires JRE 8 or later +-- added support for JSON constructor functions +-- added support for microsecond precision CURRENT_TIMESTAMP and similar functions +-- added support for GRANT and REVOKE on all objects in a schema +-- added support for CSV file data import and export +-- added support for regional time zones such as 'America/New_York' in conversions +-- added SET DATABASE SQL MAX RECURSIVE (sql.max_recursive) setting +-- changed the default for SET DATABASE SQL SYS INDEX NAMES (sql.sys_index_names) to true +-- changed the properties reported by JDBC DatabaseMetaDat::getClientInfoProperties() method +-- improved JDBC DatabaseMetaDat::getTablePrivileges() method to cover fine-grained privileges +-- improved error messages for SQL settings statements +-- improved documentation +-- added some minor enhancements +-- fixed a number of reported regressions and bugs (see tracker) + +21 October 2021 - version 2.6.1 +-- version 2.6.1 is a bug fix release +-- added sql.lowercase_ident property for extra compatibility with PostgreSQL and MySQL unquoted identifier names +-- fixed an issue with performance of large updates in mvcc transaction mode +-- fixed an issue with query timeout settings +-- fixed a number of minor issues and regressions + +21 March 2021 - version 2.6.0 +-- Version 2.6.0 marks the 20th anniversary of HyperSQL. +-- The project maintainer would like to thank core developers Blaine Simpson, Campbell Burnet and Robert Preston for their contribution over many years, +-- and all developers and users who contributed code, made useful suggestions, or reported issues. +-- version 2.6.0 main jar contains the module org.hsqldb and can be used as a Java module +-- version 2.6.0 jar requires JRE 11 or later - tested up to Java 16 RC +-- version 2.6.0 alternative jar requires JRE 8 or later +-- version 2.3.9 jar can be compiled with Java 6 (or 7) for JRE 6 and 7 and fully compatible with 2.6.0 except for the new JDBC features +-- The DatabaseManager class is no longer included in the Jars. Use DatabaseManagerSwing instead. +-- added support for additional REGEXP_ functions. +-- added support for adding extra columns to FOREIGN KEY indexes; see ALTER CONSTRAINT in the Guide +-- added support for RECURSIVE_TABLE in WITH RECURSIVE queries +-- added system role SCRIPT_OPS for export / import of database structure and data +-- added extensive features to the collection classes in org.hsqldb.lib (maps, lists, queues etc.) which can also be used in user apps +-- improved MySQL syntax support for ENUM +-- fixed a number of regression in 2.5.1, e.g. use of MODULE for LOCAL TEMPORARY tables, truncated microsecond precision of java.sql.Timestamp values +-- fixed several minor issues +-- removed all use of Java (up to JDK 16) deprecated methods +-- revamped Ant and Gradle builds, now updated to latest Gradle + +24 June 2020 - version 2.5.1 +-- version 2.5.1 jar requires JRE 8 or later - tested up to Java 14 +-- version 2.5.1 can be compiled with Java 9 or later as org.hsqldb Java module jar +-- version 2.3.8 jar can be compiled with Java 6 (or 7) for JRE 6 and 7 and fully compatible with 2.5.1 except for the new JDBC features +-- added support for GROUPING SETS, ROLLUP and CUBE grouping operations +-- added support for PERFORM CHECK ALL TABLE INDEX to check all CACHED table data and indexes +-- added support for use of PostgreSQL ODBC driver to access a HyperSQL Server +-- added support for calling stored procedures with INTERVAL parameters via JDBC CallableStatement +-- added support for TRANSACTION_UTC, ASCIISTR UNISTR functions +-- added support for reuse of memory space for lobs in mem: databases +-- changed behaviour of WITH RECURSIVE with UNION ALL for compatibility with other systems +-- improved role-based, row-level data access control with more complex filter expressions that can be applied to separate actions +-- improved MySQL syntax support in the ON DUPLICATE KEY UPDATE clause +-- improved loading of text files with null or empty fields into TEXT tables with columns defined as NOT NULL with DEFAULT +-- many minor enhancements +-- fixed issue with ALTER COLUMN data type modification between SMALLINT and INTEGER in CACHED tables +-- fixed an issue (regression) in some server shutdown cases +-- fixed an issue (regression) in some cases when JDBC connection timeout is used +-- fixed several minor issues +-- changed and improved how file spaces are set up for existing cached tables +-- removed legacy support for opening version 1.8 databases +-- removed legacy support for non-incremental internal backup of the .data file + +- 1 June 2019 - version 2.5.0 +-- version 2.5.0 jar requires JRE 8 or later - tested up to Java 12 +-- version 2.5.0 can be compiled with Java 9 or later as org.hsqldb Java module jar +-- version 2.3.7 is released as a separate jar for JRE 6 and 7 and fully compatible except for the new JDBC features +-- added Temporal System-Versioned tables feature +-- added offline distributed database feature based on System-Versioned tables +-- added role-based, row-level data access control +-- added new properties, memory_lobs and hsqldb_tx_interrupt_rollback +-- changed effect of Thread interrupts by user application in in-process database, transaction is rolled back if hsqldb_tx_interrupt_rollback is true +-- changed return type of the UUID() function to UUID; the SYS_GUID() function will continue to return a BINARY(16) value. +-- improved reporting of line number in compile error messages for routines +-- improved syntax compatibility modes +-- fixed issue with formatting of some TIMESTAMP nanoseconds returned by the TO_TIMESTAMP function +-- fixed issue with TIMESTAMPDIFF with TIMESTAMP WITH TIME ZONE +-- fixed issue with IN (UNNEST(NUMERIC ARRAY)) +-- fixed issue with transaction size reported in INFORMATION_SCHEMA.SYSTEM_SESSIONS +-- fixed issue with storing plus or minus infinity DOUBLE values +-- fixed issue with CREATE DOMAIN ... COLLATE not persisting +-- fixed issue with CREATE TYPE with custom COLLATION +-- fixed an issue with multiple FOR loops in SQL routines +-- fixed several minor issues +-- changed calls to Java methods deprecated in JDK 9 - 12 +-- removed Java 5 code switch and build options + +20 May 2018 - version 2.4.1 +-- version 2.4.1 jar requires JRE 8 or later +-- version 2.3.6 is released as a separate jar for JRE 1.6 and fully compatible except for the new JDBC features +-- added support for EXPLAIN REFERENCES FROM | TO object statement +-- added support for HEX, UNHEX, TO_BASE64 and FROM_BASE64 functions +-- added support for deployment in docker containers that do not support file rename +-- added support for generated keys in update and merge +-- improved CHECKPOINT DEFRAG to allow very large data files +-- fixed issue with some temp table queries +-- fixed issue with some SELECT ... INTO in routines +-- fixed issue with parsing some TEXT TABLE source files +-- fixed issue with auto-generated identity values in MERGE statements +-- fixed issue for WITH named non-recursive subqueries in routines +-- fixed issue with some WITH recursive queries +-- fixed issue with duplicate values in UNNEST used with IN predicates +-- fixed issue with WHEN clause in Java TRIGGER declarations +-- fixed several issues with implementation of JAVA 8 JDBC method +-- fixed some issues with transaction management +-- fixed several minor bugs + +9 April 2017 - version 2.4.0 +-- version 2.4.0 jar requires JRE 8 +-- version 2.3.5 is released as a separate jar for JRE 1.6 and fully compatible except for the new JDBC features +-- added support for new JAVA 8 JDBC methods to ResultSet and Statement classes +-- added support for several functions SINH COSH TANH NEXT_DAY DATEPART DATENAME EOMONTH NEWID SYS_GUID +-- added support for execution of DDL statements concurrently with other transactions +-- added support for table spaces for CACHED tables, which helps file space reuse after dropping tables or mass deletes +-- improved support for WITH named subqueries in routines, allowing parameters to be referenced +-- improved support for WITH RECURSIVE named subqueries to be used in other subqueries +-- improved support for UUID in ResultSet to return a Java UUID with getObject() +-- improved support for UUID in PreparedStatement setObject() with VARCHAR parameters +-- improved use of allow_empty_batch connection property +-- improved field param setting of DATEADD DATEDIFF TIMESTAMPADD TIMESTAMPDIFF functions +-- improved ORA, MSS and MYS syntax compatibility modes for type names and functions +-- fixed issue with cancel() method of java.sql.Statement with in-process connections +-- fixed issue with the timeout setting of java.sql.Statement +-- fixed issue with duplicate row with INSERT followed by UPDATE and ROLLBACK in MEMORY tables +-- fixed issue with dropping indexes and constraints in MEMORY tables +-- fixed issue with queries on DECIMAL or NUMERIC columns containing very large values +-- fixed issue with ResultSet when calling next() multiple times was not followed by a get(...) call +-- fixed issue with temp table indexes +-- core code refactor of iterator for rows of tables and results +-- fixed several minor bugs + +16 May 2016 - version 2.3.4 +-- added support for storing live Java Objects in mem: databases with sql.live_object connection property +-- added support for UUID data type +-- added support for CREATE SYSNONYM FOR, for tables, views and sequences +-- added support for ON UPDATE CURRENT_TIMESTAMP for auto updated TIMESTAMP columns +-- added REGEXP_REPLACE function +-- added support for PERIOD and CONTAINS, EQUALS, PRECEDES and SUCCEEDS predicates in SQL +-- added support for UTF-16 text source files for TEXT tables +-- added support for the cancel() method of JDBC Statement and PreparedStatement +-- added support for END STATEMENT to end long-running statements +-- added support for CallableStatement parameter reference by name +-- added date range checks to setDate and setTimestamp methods in PreparedStatement +-- added support for lowercase patterns for TO_DATE etc. +-- added support for VARCHAR string literals with sql.char_literal property +-- improved MYS syntax mode for INSERT, REPLACE and ON DUPLICATE KEY UPDATE +-- improved DB2 syntax mode for queries +-- extensive review and improvement of transaction management in muti-threaded access +-- fixed issue with user application Thread.interrupt disabling in-process database session +-- fixed regression with interaction of FK constraints with ON DELETE CASCADE and NO ACTION +-- fixed regression with opening database with CACHED table with files_readonly +-- fixed issue with SEQUENCE increment in multi-row inserts +-- fixed issue with incorrect results in multiple LEFT JOIN with NATURAL or USING +-- fixed issue with ClobInputStream +-- fixed issue with missing references to views used in routines +-- fixed issue with .lobs file space reuse at CHECKPOINT +-- fixed issue with readonly session blocking in MVLOCKS mode +-- fixed several minor bugs + +28 June 2015 - version 2.3.3 +-- extensive review and improvement of concurrent updates +-- fixed an issue with CHECKPOINT DEFRAG that could cause minor inconsistencies +-- fixed a rarely occuring error immediately after CHECKPOINT +-- fixed regression with comparison of TIMESTAMP values when one value is WITH TIME ZONE and the other WITHOUT +-- fixed reporting of DISTINCT and DOMAIN types in JDBC DatabaseMetaData getColumns results +-- fixed issue with new FK constraints, existing rows are now checked +-- fixed restrictions with FK constraints with NO ACTION, all valid outcomes are now allowed +-- fixed regression in 2.3.2, multiple rows with partial null values could not be inserted in UNIQUE indexes +-- fixed issue with removal of IDENTITY when using ALTER COLUMN +-- fixed issue with getExportedKeys reporting wrong DEFERABILITY +-- fixed issue with CURRENT VALUE FOR usage +-- fixed issue with LIKE with parametric escape character +-- fixed an issue with CACHED table persistence +-- fixed issue with TEMP table with ON COMMIT PRESERVE ROWS and RESULT MEMORY ROWS setting +-- fixed several minor bugs +-- improved usage of DECLARE CURSOR and DECLARE TABLE in SQL routines +-- improved ORA, PGS, MSS and MYS syntax compatibility modes for CREATE TABLE and other statements +-- added support for MYS syntax INSERT IGNORE, REPLACE and ON DUPLICATE KEY UPDATE +-- added support for ALTER CONSTRAINT RENAME TO +-- added support for LIMIT in DELETE and UPDATE statements +-- added support for DELETE in MERGE statement + +12 February 2014 - version 2.3.2 +-- fixed several minor issues +-- fixed bug with incomplete rollback of MVCC transaction that inserts and updates the same row +-- fixed issue with parsing of long BIT strings in SQL +-- fixed issue with SQL triggers when columns were added or dropped from a table with SQL triggers +-- fixed issue with an index added to a TEMP table with ON COMMIT PRESERVE ROWS and containing data +-- added URL property hsqldb.digest which can be used with alternative secure hash algorithms for passwords +-- changed the class used for offline backup and restore to org.hsqldb.lib.tar.DbBackupMain +-- extended the scope of SET DATABASE SQL REFERENCES TRUE to catch ambiguity with identical table aliases +-- extended support for the DEFAULT keyword used in INSERT and UPDATE to apply to columns with no default +-- improved support for recursive queries +-- improved ORA and MYS syntax compatibility modes + +08 October 2013 - version 2.3.1 +-- fixed several minor issues +-- fixed bug with some queries using ORDER BY DESC on indexed columns used in conditions +-- fixed issue with NPE is some complex subqueries +-- improved JDBCPool to be created with DataSourceFactory +-- added support for LIKE with parametric escape character +-- added support for routine SIGNAL messages using variables + +08 July 2013 - version 2.3.0 +-- improved data exception error messages +05 July svn 5259 snapshot 52 +-- added connection property, close_result +30 June - svn 5256 snapshot 51 +-- added INSTR function +15 May - svn 5241 snapshot +-- added support for backup of database as set of files BACKUP DATABASE TO AS FILES +12 April - svn 5228 snapshot +-- added TIMESTAMP_WITH_ZONE function +-- fixed issue with AT