-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MS SQLServer support to JDBC device registry #2317
base: master
Are you sure you want to change the base?
Conversation
757c58e
to
2e01f13
Compare
@lhotari Would you mind creating a separate PR for the last 2 commits (Include |
5a6771b
to
2e01f13
Compare
@kaniyan thanks for the feedback. I moved those commits out to new PRs #2321 and #2322 as you have suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. With a small note on the naming … and big question mark on the "license acceptance".
site/documentation/content/admin-guide/jdbc-device-registry-config.md
Outdated
Show resolved
Hide resolved
@@ -0,0 +1 @@ | |||
mcr.microsoft.com/mssql/server:2017-CU12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea what this means.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.testcontainers.org/modules/databases/mssqlserver/ explains it. I'll remove that file and use the code based method for accepting the Docker container EULA.
@ctron I have address the review comments. Please review the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.testcontainers.org/modules/databases/mssqlserver/ explains it. I'll remove that file and use the code based method for accepting the Docker container EULA.
So that would be a no-go for me. Unless I misunderstood the situation:
Everyone running the Hono tests now would automatically accept this EULA. Which definitely is not the case, as people aren't actively accepting anything when running Hono tests. And we are not confirming that with the end user.
@ctron do you think that it would be possible to accept the EULA in CI (Github Actions Workflow) ? In that case I could modify the default build to skip the MS SQL Server tests unless a certain flag is given. |
I have no idea. And I would forward this question to the EMO (Eclipse Management Organization). |
@lhotari I am not sure about the outcome of the discussion around the SQL Server license issue. Regardless of that, the fixes for the PostgreSQL dialect are very valuable FMPOV. Would you mind splitting the PR up into two parts, one dealing with fixes for PostgreSQL and another one for adding support for SQL server? We could then go on and merge the first PR while dealing with the licensing issues. @ctron WDYT? Does that make sense to you as well? |
Yes, I'll remove the SQL server parts. Works for me. |
@sophokles73 @ctron I have moved the Postgres specific parts to a new PR, that is #2375 . |
- include Microsoft SQLServer driver - port DDL scripts to SQLServer syntax - CREATE TABLE table_name IF NOT EXISTS -> IF OBJECT_ID('table_name', 'U') IS NULL CREATE TABLE table_name - BOOLEAN -> BIT - TEXT -> NTEXT (for unicode support) - TIMESTAMP -> DATETIME2 - CHAR/VARCHAR -> NVARCHAR - support Unicode - char -> varchar to get rid of issues with trailing spaces - Implement upsert queries for MS SQLServer - using MERGE syntax, https://docs.microsoft.com/en-us/sql/t-sql/statements/merge-transact-sql - Test MS SQLServer with Testcontainers - Use code to accept MS SQL Server Docker image license - see https://www.testcontainers.org/modules/databases/mssqlserver/ for more info Signed-off-by: Lari Hotari <[email protected]>
ba4c352
to
bd3c925
Compare
I have rebased the changes. |
Motivation
Changes
IF OBJECT_ID('table_name', 'U') IS NULL
CREATE TABLE table_name
https://docs.microsoft.com/en-us/sql/t-sql/statements/merge-transact-sql
for more info
Notice
SQLServer requires
SelectMethod=Cursor
in JDBC URL. This was needed to support the "SELECT ... FOR UPDATE" syntax used in JDBC device registry.