Mark Struberg
d6a64bebcd
OPENJPA-2866 Oracle GenerationType#IDENTITY support
...
we will now create a column definition
"GENERATED ALWAYS AS IDENTITY"
for auto-increment columns.
2021-04-10 12:27:37 +02:00
Mark Struberg
59a8586855
OPENJPA-2865 use java.time handling from JDBC driver
2021-04-09 14:26:51 +02:00
Mark Struberg
683e78045c
OPENJPA-2863 use MICROS for TIMESTAMP precision in Oracle
...
Default type for Oracle is TIMESTAMP(6) but somehow we did only
round to 3 fraction digits in the past.
Can be tweaked to the old value via DBDictionary config in persistence.xml
2021-04-08 14:55:28 +02:00
Mark Struberg
a68835381e
OPENJPA-2864 use Timestamp precision from Column if set
2021-04-08 14:54:22 +02:00
Mark Struberg
0fc957a02b
OPENJPA-2861 fix Raw handling
...
Raw did loose the internal type. Once 'interned' to Raw the type was always String.class.
And this broke quite a few return type situations in quite a nasty way.
2021-04-06 22:30:10 +02:00
Mark Struberg
5fd5de9fb8
OPENJPA-2862 select SUM return types fixed
...
As per spec section 4.8.5 Aggregate Functions in the SELECT
clause we need to handle a few types in a special way
2021-04-06 22:29:16 +02:00
Mark Struberg
3647e4e257
OPENJPA-2665 typed Collection
...
no functional change
2021-04-06 12:01:11 +02:00
Mark Struberg
044c7d27b1
OPENJPA-2860 PostgreSQL >= 10 supports setQueryTimeout
2021-04-05 18:16:48 +02:00
Mark Struberg
1fb5234574
OPENJPA-2665 use modern for loops
...
no functional change, just java lang updates
2021-04-05 08:47:46 +02:00
Mark Struberg
d73e2e72f0
collapse Exceptions and use Diamond style
2021-04-04 18:32:35 +02:00
Mark Struberg
a7708636e3
remove unecessary boxing/unboxing - no functional change
2021-04-04 17:54:25 +02:00
Mark Struberg
b0ba9c3e60
code cleanup without functional change
...
* remove unecessary valueOf
* remove ;;
* remove unused imports
* remove unnecessary casts
* etc
2021-04-04 17:09:04 +02:00
Mark Struberg
9458d1720b
remove obsolete commented out code and modifiers
2021-04-04 16:22:26 +02:00
Mark Struberg
515756b823
OPENJPA-2648 map long to BIGINT
2021-04-04 15:11:28 +02:00
Mark Struberg
1c30090c8c
OPENJPA-2859 use DOUBLE instead of NUMERIC
...
by default NUMERIC has no fraction digits, so rather use
DOUBLE data type which is a 64bit double value.
2021-04-04 13:51:21 +02:00
Mark Struberg
7f92be5e2b
OPENJPA-2858 update dbcp2 to 2.8.0
2021-04-03 22:57:06 +02:00
Mark Struberg
e68083e8d0
move to org.junit.Assert
2021-04-03 18:04:22 +02:00
Mark Struberg
8d3acdc11e
OPENJPA-2857 handle sqlState 70100 as QueryTimeoutException
2021-04-03 16:08:13 +02:00
Mark Struberg
ab8090f556
OPENJPA-2856 improve MariaDB TIME handling
...
* java.sql.Time parameters must be on date Jan 1st 1970, otherwise MariaDB won't find anything in the DB
* from > 10 onwards MariaDB supports up to 6 fractions in TIME as well.
2021-04-03 08:42:28 +02:00
Mark Struberg
53cc83eb7e
OPENJPA-1303 "KEY" is also a reserved word for columns
2021-04-02 18:00:03 +02:00
Mark Struberg
6861dd1d02
OPENJPA-1303 differentiate btw COLUMN and COLUMN_DEF rules
...
Column names and Column definitions (the types, e.g. VARCHAR(20) ) have
different rules. We now can properly specify both of em.
2021-04-02 12:01:02 +02:00
Mark Struberg
2a3fc73861
OPENJPA-2855 revert PK name handling
...
Seems this got broken as side effect of dd9bce0cc9
which was for OPENJPA-2816. We need to check HerdDB again
2021-04-01 21:19:59 +02:00
Mark Struberg
a3bf818402
remove unused import
2021-04-01 19:28:16 +02:00
Mark Struberg
c3bbb92557
OPENJPA-2854 fix OffsetTime handling for PostgreSQL
...
PostgreSQL doesn't natively support OffsetTime. While it has a column type
time with time zone it actually only stores the time as UTC time.
2021-04-01 17:02:25 +02:00
Mark Struberg
e9f3f9cdfc
OPENJPA-2883 fix handling of java.sql.Time on MSSQL
2021-03-31 19:11:08 +02:00
Mark Struberg
68aa6a3d17
OPENJPA-1303 KEY is also an invalid column name
2021-03-31 09:38:44 +02:00
Mark Struberg
6a47c4c033
OPENJPA-1303 ColumnDefIdentifierRule did not use invalidColumnWordSet
2021-03-31 00:29:51 +02:00
Mark Struberg
d48f439bc8
OPENJPA-2182 fix invalidColumnWordSet handling
...
invalidColumnWordSet should get populated with the list of reserved words
if not explicitly configured otherwise.
2021-03-30 20:52:31 +02:00
Mark Struberg
1a8bcfb6b1
OPENJPA-2849 fix UnaryOp to use DBDictionary
...
UnaryOps should use the DBDictionary to resolve the requested data whenever possible.
Previously we always have been requesting JDBC native types when doing max(), min(), etc.
But this returns values of types which we potentially cannot handle.
2021-03-30 14:38:14 +02:00
Mark Struberg
8283ea0fb2
OPENJPA-2850 use VARBINARY(MAX) instead BLOB column type
2021-03-30 09:19:57 +02:00
Mark Struberg
9c9138603d
OPENJPA-2814 fix mem leak in ForeignKey
...
detected by Gregory Jevardat, thanks!
2021-03-29 18:26:35 +02:00
Mark Struberg
c7c13d3e8b
OPENJPA-2848 duplicate DROP SEQUENCE stmt
...
txs to Christian Tu for the patch!
2021-03-28 19:58:28 +02:00
Enrico Olivelli
117f75ce0b
fix checkstyle
2020-10-28 11:09:58 +01:00
Enrico Olivelli
a998255a1e
add test cases
2020-10-28 09:45:49 +01:00
Enrico Olivelli
bb35ca7129
add test case and set supportsCascadeUpdateAction=false
2020-10-27 17:10:33 +01:00
Enrico Olivelli
02e91440e5
OPENJPA-2836 HerdDBDictionary: enable ForeignKeys and Unique Indexes
2020-10-27 14:51:18 +01:00
Romain Manni-Bucau
629ebaefce
useless import
2020-10-01 10:52:41 +02:00
Romain Manni-Bucau
758b866706
Merge pull request #75 from eolivelli/fix/OPENJPA-2832
...
OPENJPA-2832 DROP COLUMN does not use delimiters and always add double quotes
2020-09-30 12:25:03 +02:00
Romain Manni-Bucau
049c2ef163
Merge pull request #71 from eolivelli/fix/OPENJPA-2820-delim
...
OPENJPA-2820 Track when a DBIdentifier is already delimited in order to save memory allocations and cpu
2020-09-30 12:24:21 +02:00
Enrico Olivelli
61f11a7088
add test
2020-09-28 18:12:03 +02:00
Enrico Olivelli
b24a6a239c
OPENJPA-2832 DROP COLUMN does not use delimiters and always add double quotes
2020-09-28 17:50:54 +02:00
Enrico Olivelli
e95dbc8a0b
add tests
2020-09-21 13:28:56 +02:00
Enrico Olivelli
963ed59ad4
remove useless conversion and extension point
2020-09-18 16:35:14 +02:00
Enrico Olivelli
dd9bce0cc9
OPENJPA-2816 Add HerdDB DBDictionary - more fixes
2020-09-18 16:26:51 +02:00
Romain Manni-Bucau
33fc72ac85
[OPENJPA-2831] import [collections4] used classes and drop the dependency
2020-09-16 12:17:13 +02:00
Romain Manni-Bucau
a38684b323
[OPENJPA-2830] ensure we don't drop a SQL statement when running action executeScript
2020-09-15 17:57:24 +02:00
Romain Manni-Bucau
8dbdc14321
[OPENJPA-2829] ensure empty lines are ignored for executeScript action
2020-09-15 16:57:43 +02:00
Mark Struberg
f92c85314d
OPENJPA-2795 add documentation and PostgreSQL support
...
Postgres also doesn't automatically create a foreign key index.
2020-08-31 16:09:17 +02:00
Robert Mayer
c13f0b0e13
This fixes OPENJPA-2795 in that generation of indizes for @ManyToOne relations that are also foreign keys can optionally be turned on if so desired. Default behaviour of OpenJPA is unchanged.
...
This commit contains two new features:
1) A new DB-specific flag DBDictionary#indexPhysicalForeignKeys so that indices for foreign keys will be generated for
database systems that don't automatically create an index for foreign keys.
2) A new boolean property MappingDefaults.IndexPhysicalForeignKeys that will turn the feature from 1) on or off.
By default MappingDefaults.IndexPhysicalForeignKeys is false so that the feature from 1) is disabled.
Note: DBDictionary#indexPhysicalForeignKeys works similar to the pre-existing flag DBDictionary#indexLogicalForeignKeys.
Note: this commit enables FK indices for Oracle and MS SQLServer. Other database systems may benefit, too, and should also be changed.
2020-08-31 16:08:53 +02:00
Enrico Olivelli
bc63cd2e45
OPENJPA-2820
2020-07-23 10:14:46 +02:00