forked from hibernate/hibernate-orm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HHH-10148 - SpatialDialect for SqlServer2012
- Loading branch information
Showing
22 changed files
with
446 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
hibernate-spatial/databases/mysql8/resources/hibernate.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# Hibernate, Relational Persistence for Idiomatic Java | ||
# | ||
# License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
# See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
# | ||
|
||
hibernate.dialect org.hibernate.spatial.dialect.mysql.MySQL56SpatialDialect | ||
hibernate.connection.driver_class com.mysql.jdbc.Driver | ||
hibernate.connection.url jdbc:mysql://localhost:3306/hibern8 | ||
hibernate.connection.username hibernateormtest | ||
hibernate.connection.password hibernateormtest | ||
|
||
|
||
hibernate.connection.pool_size 5 | ||
|
||
hibernate.show_sql true | ||
hibernate.format_sql true | ||
|
||
hibernate.max_fetch_depth 5 | ||
|
||
hibernate.cache.region_prefix hibernate.test | ||
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
hibernate-spatial/databases/oracle12c_spatial_native/matrix.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
*/ | ||
jdbcDependency "com.oracle:ojdbc7:12.1.0.2.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
hibernate-spatial/databases/sqlserver2012_spatial/matrix.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
*/ | ||
repositories { | ||
mavenLocal( ) | ||
} | ||
|
||
jdbcDependency 'com.microsoft.sqlserver:mssql-jdbc:6.4.0.jre8' |
23 changes: 23 additions & 0 deletions
23
hibernate-spatial/databases/sqlserver2012_spatial/resources/hibernate.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# Hibernate, Relational Persistence for Idiomatic Java | ||
# | ||
# License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
# See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
# | ||
|
||
hibernate.dialect org.hibernate.spatial.dialect.sqlserver.SqlServer2012SpatialDialect | ||
hibernate.connection.driver_class com.microsoft.sqlserver.jdbc.SQLServerDriver | ||
hibernate.connection.url jdbc:sqlserver://localhost:1433;databaseName=TestDb | ||
hibernate.connection.username hibern8 | ||
hibernate.connection.password hibern8Pass | ||
|
||
|
||
hibernate.connection.pool_size 5 | ||
|
||
hibernate.show_sql true | ||
hibernate.format_sql true | ||
|
||
hibernate.max_fetch_depth 5 | ||
|
||
hibernate.cache.region_prefix hibernate.test | ||
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/usr/bin/env bash | ||
|
||
WD=$(dirname $0) | ||
|
||
docker run -h db2server_db2_22 \ | ||
--name db2_11 \ | ||
-p 50000:50000 -p 55000:55000\ | ||
--privileged=true \ | ||
--env-file db2_11_env \ | ||
-v ${WD}/../../../hibernate-spatial-docker-dbs/db2_11 \ | ||
--detach ibmcom/db2express-c:latest | ||
|
||
#The followin steps need to be executed | ||
#(This will need to end up in a script) | ||
# | ||
## First connect to the docker and switch to user db2inst | ||
# docker exec -i -t db2 /bin/bash | ||
# | ||
# su - db2inst1 | ||
|
||
# | ||
## create the database with 8K pagesize , connect to it and enable | ||
# | ||
#db2 create database hibern8 pagesize 8 k | ||
|
||
#db2 connect to hibern8 | ||
|
||
#db2se enable_db hibern8 | ||
|
||
## generate the ewkt.sql script: | ||
#cat > ewkt.sql <<EOF | ||
#create or replace function db2gse.asewkt(geometry db2gse.st_geometry) | ||
#returns clob(2G) | ||
#specific db2gse.asewkt1 | ||
#language sql | ||
#deterministic | ||
#no external action | ||
#reads sql data | ||
#return 'srid=' || varchar(db2gse.st_srsid(geometry)) || ';' || db2gse.st_astext(geometry); | ||
# | ||
#create or replace function db2gse.geomfromewkt(instring varchar(32000)) | ||
#returns db2gse.st_geometry | ||
#specific db2gse.fromewkt1 | ||
#language sql | ||
#deterministic | ||
#no external action | ||
#reads sql data | ||
#return db2gse.st_geometry( | ||
#substr(instring,posstr(instring,';')+1, length(instring) - posstr(instring,';')), | ||
#integer(substr(instring,posstr(instring,'=')+1,posstr(instring,';')-(posstr(instring,'=')+1)))); | ||
# | ||
#create transform for db2gse.st_geometry ewkt ( | ||
# from sql with function db2gse.asewkt(db2gse.st_geometry), | ||
# to sql with function db2gse.geomfromewkt(varchar(32000)) ); | ||
# | ||
#drop transform db2_program for db2gse.st_geometry; | ||
#create transform for db2gse.st_geometry db2_program ( | ||
# from sql with function db2gse.asewkt(db2gse.st_geometry), | ||
# to sql with function db2gse.geomfromewkt(varchar(32000)) ); | ||
#EOF | ||
|
||
## run the ewkt.sql script (see hibernate documentation) | ||
#db2 -tvf ./ewkt.sql | ||
|
||
|
||
### generate the EPSPG:4326 SRS | ||
#db2se create_srs hibern8 \ | ||
# -srsName EPSG4326 \ | ||
# -srsId 4326 \ | ||
# -coordsysName GCS_WGS_1984 \ | ||
# -xOffset -180 \ | ||
# -xScale 1000000 \ | ||
# -yOffset -90 \ | ||
# -zOffset 0 \ | ||
# -zScale 1 \ | ||
# -mOffset 0 \ | ||
# -mScale 1 | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
LICENSE=accept | ||
DB2INSTANCE=db2inst1 | ||
DB2INST1_PASSWORD=Eeyoim4Y | ||
DBNAME= | ||
BLU=false | ||
ENABLE_ORACLE_COMPATIBILITY=false | ||
UPDATEAVAIL=NO | ||
TO_CREATE_SAMPLEDB=false | ||
REPODB=false | ||
IS_OSXFS=false | ||
PERSISTENT_HOME=true | ||
HADR_ENABLED=false | ||
ETCD_ENDPOINT= | ||
ETCD_USERNAME= | ||
ETCD_PASSWORD= |
Oops, something went wrong.