Skip to content
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

Refactored deegree-dialect-mssql module and upgraded JDBC driver for SQL Server #1445

Merged
merged 4 commits into from
Feb 8, 2023

Conversation

tfr42
Copy link
Member

@tfr42 tfr42 commented Dec 29, 2022

Fixes #1322. PR includes refactoring of classes from the commons moved to mssql dialect module, fixed usage of profiles in deegree-webservices module and upgraded jdbc driver to v10.2. for support of MS SQL Server 2019.

Todo

@tfr42 tfr42 added enhancement enhancement or improvement dependencies Pull requests that update a dependency (library) modules deegree sub-modules labels Dec 29, 2022
@tfr42 tfr42 added this to the 3.5 milestone Dec 29, 2022
@tfr42
Copy link
Member Author

tfr42 commented Dec 30, 2022

Usage:
Setup with docker:

docker pull mcr.microsoft.com/mssql/server:2019-latest
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Pass_w0rd" -p 1433:1433 --name sqlserver -d  mcr.microsoft.com/mssql/server:2019-latest

Create a database connection:

<DataSourceConnectionProvider
  xmlns="http://www.deegree.org/connectionprovider/datasource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.deegree.org/connectionprovider/datasource http://schemas.deegree.org/jdbc/datasource/3.5/datasource.xsd">

  <!-- Creation / lookup of javax.sql.DataSource instance -->
  <DataSource javaClass="org.apache.commons.dbcp2.BasicDataSource" />

  <!-- Configuration of DataSource properties -->
  <Property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
  <Property name="url" value="jdbc:sqlserver://192.168.178.31:1433;databaseName=deegree;encrypt=false;"/>
  <Property name="username" value="sa" />
  <Property name="password" value="Pass_w0rd" />
  <Property name="poolPreparedStatements" value="true" />
  <Property name="maxTotal" value="10" />
  <Property name="maxIdle" value="10" />

</DataSourceConnectionProvider>

See https://learn.microsoft.com/en-en/sql/t-sql/spatial-geometry/spatial-types-geometry-transact-sql?view=sql-server-ver16 for examples with geometry types.

@copierrj copierrj merged commit 6c002b8 into deegree:main Feb 8, 2023
@lgoltz lgoltz deleted the cleanupMssqlDialect-1322 branch August 17, 2023 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency (library) enhancement enhancement or improvement modules deegree sub-modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleaning up the MSSQL dialect module
2 participants