Commit Graph

222 Commits

Author SHA1 Message Date
Jan Schatteman 2e97374660 HHH-16567 - Remove support for CockroachDB versions older than 22.1
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-05-09 20:40:05 +02:00
Gavin a56942ce3b HHH-16535 introduce @Array annotation 2023-05-02 14:40:00 +03:00
Christian Beikov 53c7ef470a HHH-16533 Fix issues with jConnect driver related to temporal literals. Also improve truncation and casting SQL 2023-05-02 11:16:04 +02:00
Gavin 473984f1eb HHH-16125 introduce JdbcTypeConstructor instead of using JdbcTypes as their own factories
previously, there was a global instance of ArrayJdbcType registered by the Dialects, in
an inconsistent state, that acted as a factory for correctly-initialized instances
2023-05-02 10:47:28 +03:00
Gavin 07268d6568 HHH-16125 Oracle array support using varray types 2023-05-01 17:37:19 +02:00
Gavin 783e0772e6 fix rendering of in (...) lists
they are not function calls
2023-05-01 17:24:15 +03:00
Gavin 7514f8ad00 HHH-16125 introduce SqlTypes.NAMED_ENUM to make pg enums non-default
and clean up the impl of enums
2023-04-29 15:42:56 +02:00
Gavin fb9c007bdd HHH-16125 attempt to support PostgreSQL enum types 2023-04-29 15:42:56 +02:00
Marco Belladelli f7eb58341e Fix in-array predicate rendering for cockroachdb 2023-04-28 11:11:26 +02:00
Christian Beikov 203f28e14c HHH-16528 Revert SybaseDialect NameQualifierSupport to CATALOG only and fix ansinull option for jconnect 2023-04-28 10:30:43 +02:00
Christian Beikov aad0c55f9b HHH-15833 Disable named parameters for jConnect JDBC driver 2023-04-28 10:30:43 +02:00
Marco Belladelli c86c2b8300 HHH-16392 Add column qualifier support to Dialect 2023-04-28 10:22:26 +02:00
Christian Beikov 199201482d HHH-16271 Fix generated keys issues with Sybase JConn and insert-select statements 2023-04-26 11:51:15 +02:00
Christian Beikov 31f1a30c7d Fix issues with nightly tests 2023-03-30 15:43:51 +02:00
Christian Beikov e1d926356f HHH-16404 SkipFirstLimitHandler calls insertAfterSelect with parameter in wrong order 2023-03-30 14:26:23 +02:00
Christian Beikov eb9e16c83f HHH-16317 Don't use InstantAsTimestampWithTimeZoneJdbcType for PG-JDBC and MSSQL due to a bug 2023-03-23 11:59:53 +01:00
Christian Beikov 41bec6d5f9 HHH-16287 Consider hibernate.timezone.default_storage for OffsetTime typing and storage 2023-03-23 11:59:53 +01:00
Christian Beikov 0b68a36f8b HHH-16333 Handle converters properly in BasicPluralType 2023-03-22 17:27:26 +01:00
Marco Belladelli c3fa3ae777 HHH-16320 Handle json columns with native ddl type on H2 2023-03-17 10:21:41 +01:00
Christian Beikov 39f4fdda5e HHH-16316 Move version specific dialects of unsupported versions to hibernate-community-dialects 2023-03-17 10:12:34 +01:00
Christian Beikov 2c666c3835 HHH-15766 Add query spec parenthesis also when order by is used within query group 2023-03-06 09:43:11 +01:00
Christian Beikov 8d93c0ca33 HHH-16224 Refactor discovery of exact JDBC drivers, avoid static state in specialized types 2023-03-03 15:13:01 +01:00
Sanne Grinovero cf2e723d6f HHH-16228 Dialect instance might be wrapped when doing instanceof checks for capabilities
To properly support the idea of wrapping the Dialect, we need
to take this into account whenever an `instanceof` is used
to check for Dialect capabilities.
Also some code is casting to the expected Dialect.
2023-02-27 22:53:31 +00:00
Marco Belladelli b16ad226ba HHH-16185 Custom trunc/truncate implementation that handles both numeric and datetimes 2023-02-27 17:01:45 +01:00
Marco Belladelli 789c131c2d HHH-16185 Implement portable date_trunc function emulation and tests 2023-02-27 17:01:45 +01:00
Sanne Grinovero b328b1a3fb HHH-16221 Improve extensibility of CockroachDB and PostgreSQL dialects 2023-02-23 14:58:53 +00:00
Gavin King 958cdfb09f remove an obsolete constructor no longer called by Quarkus
and delete the stupid InformixDialectTestCase
2023-02-08 21:39:56 +01:00
Christian Beikov 16ca1a0595 HHH-15443 Allow JdbcType to wrap read and write expressions 2023-01-27 14:26:42 -06:00
Marco Belladelli 12c69c8528 Fix wrong version check in from dual for select only for MySQL 2023-01-24 09:05:04 +01:00
Gavin 8f29ae95c9 more javadoc for Dialect.getFractionalSecondPrecisionInNanos() 2023-01-14 15:14:04 +01:00
Gavin 56774f80d7 fix handling of typestamp arithmetic on Sybase
this was a total inconsistent mess that made no sense
2023-01-14 15:14:04 +01:00
Christian Beikov 80b638aeca Introduce getSingleJdbcMapping() and getJdbcMapping(int) to improve JdbcMappingContainer accesses 2023-01-13 09:04:15 +01:00
Marco Belladelli b5d58e69ae HHH-15928 Check distinct and sub-queries for SQLServer fetch / offset 2023-01-12 17:22:58 +01:00
Marco Belladelli 73da49626d Fix select without from in old versions of MySQL and MariaDB 2023-01-12 17:21:05 +01:00
Marco Belladelli ab86055565 HHH-15890 Fix shouldEmulateFetchClause method for DB2(i)SqlAstTranslator 2023-01-09 19:01:44 +01:00
Marco Belladelli 54402da721 HHH-15985 Custom trunc and round function for PostgreSQL and Cockroach 2023-01-06 15:48:09 +01:00
Gavin ab48dc9ba1 remove an email address I missed 2023-01-05 20:21:01 +01:00
Gavin 1fd45b607c thorough jdoc review and trivial changes to Dialect 2023-01-05 11:19:16 +01:00
Gavin ecf4d30c50 make Dialect implement TypeContributor and FunctionContributor
there is little *concrete* benefit to this change, and it's slightly break-y but:

- it removes a dependence on the @Incubating type QueryEngine from Dialect
- we eat our own dogfood, that is, use our own abstractions
- it appears that this was how it was *originally* intended to be
2023-01-04 19:38:24 +01:00
Gavin 196d7a1b5a resolve an issue with ArgumentsValidator and access to the MappingMetamodel
(ideally we should never access the MappingMetamodel from ArgumentsValidator)
2023-01-04 17:05:32 +01:00
Gavin e3ed3028c4 Revert "disable fragile test"
This reverts commit 2d3b787fc0.
2023-01-04 17:05:32 +01:00
Marco Belladelli 9369fbd597 Fix date_trunc function for DB2 10 2023-01-04 16:41:14 +01:00
Gavin 2d3b787fc0 disable fragile test 2023-01-03 21:06:49 +01:00
Gavin b7b5fb7559 avoid the use of TypeConfiguration.getServiceRegistry() 2023-01-03 21:06:49 +01:00
Gavin e8f899ffbc avoid the use of TypeConfiguration.getSessionFactory() which is not very typesafe
continue sorting out issues with lifecycle of SessionFactoryImpl and friends
2023-01-03 21:06:49 +01:00
Gavin 91c69d72a7 work on jdoc of Dialect (mostly just formatting) 2023-01-03 21:06:49 +01:00
Gavin 1991e7d6a7 clean imports 2022-12-30 00:46:36 +01:00
Gavin c6f0be990c yet more work on the API documentation
- and get rid of people's email addresses, they don't belong in the code
2022-12-29 15:03:09 +01:00
Gavin 2355f98586 HHH-14526 tolerate dupe tables in JOINED inheritance with discriminator
and also support @DiscriminatorOptions for JOINED inheritance
2022-12-26 18:22:06 +01:00
Christian Beikov 4901d2bb61 HHH-15464 Allow JdbcType to expose the type code to use for DDL 2022-12-22 17:25:13 +01:00
Christian Beikov a094d4c5d5 HHH-15463 Adjust JdbcType based on DDL capacity for varchar/varbinary like types 2022-12-22 17:25:13 +01:00
Gavin 023e73cb46 promote trunc() / truncate() to the list of standard HQL functions
also support the single-argument form of round() for consistency
2022-12-21 14:25:35 +01:00
Marco Belladelli d862f2d52e HHH-15868 Fix db2's atan2 function requiring inverted argument order 2022-12-21 13:38:43 +01:00
Christian Beikov 7007bafe55 HHH-15872 Add ColumnOrderingStrategy SPI and handle record structs specially 2022-12-20 20:17:23 +01:00
Andrea Boriero 1f630e4a5d HHH-15805 Subquery with where condition on a column with columnDefinition results in wrong SQL grammer 2022-12-20 18:55:17 +01:00
Gavin 679ed3bbee add select generator test for Postgres, MySQL, EDB 2022-12-20 01:38:55 +01:00
Marco Belladelli 8bbb1edb30 Fix some failing tests 2022-12-16 16:18:08 +01:00
Marco Belladelli fc7bdce2c8 HHH-15736 Add escape logic to cockroach and fix mysql 5.7 2022-12-15 12:14:39 +01:00
Sanne Grinovero cacba9a205 HHH-15867 Avoid runtime services lookup for JdbcServices and BatchBuilder 2022-12-14 21:48:06 +00:00
Christian Beikov bc36eb3eeb HHH-15327 Support mapping aggregate embeddables as struct/json 2022-12-14 19:02:43 +01:00
Marco Belladelli f1b9909fb6 HHH-15736 Handle backslash escapes in like patterns 2022-12-14 17:25:16 +01:00
Christian Beikov dfa3981a52 Make stored procedure and function calls through ProcedureCall API more portable 2022-12-14 11:21:06 +01:00
Christian Beikov 371d2f1d49 Move getCheckCondition to BasicType and add variant to JdbcType for Oracle Booleans and other future uses 2022-12-12 20:13:52 +01:00
Christian Beikov a9be2e1584 Fix temporal round in tests and render calendar with milliseconds precision 2022-12-08 16:15:40 +01:00
Karel Maesen 7a1f2542c1 HHH-15814 add methods for current time selection to CockroachLegacy Dialect 2022-12-07 22:35:53 +01:00
Mark Rotteveel 9290f8b754 HHH-15812 Firebird dialect improvements 2022-12-06 11:38:51 +01:00
Sanne Grinovero 329ccaa7a1 HHH-15791 Avoid excessive Session casts to EventSource 2022-12-02 09:40:53 +00:00
Marco Belladelli be9358e02f HHH-15785 Fix javadoc errors 2022-12-01 14:51:28 +01:00
Steve Ebersole a9ac98b364 HHH-15393 - Improve write-paths to use mapping model
HHH-15723 - Fix foreign-key modeling
2022-11-28 14:25:40 -06:00
Gavin 12aa8bd431 add some comments for the next poor soul who wrestles with unique constraints 2022-11-27 12:38:45 +01:00
Gavin 5172d8798f HHH-15762 work around weird semantics of null in unique index on DB2/T-SQL 2022-11-27 02:14:38 +01:00
Gavin 3ba90c004c HHH-15762 nicer DDL for unique constraints
- prefer 'unique' in 'create table' except in migrations
- also ignore unique=true for PK column
- introduce AlterTableUniqueDelegate and CreateTableUniqueDelegate
- fix the tests / delete test that makes no sense now
- improve javadoc of UniqueDelegate
2022-11-26 13:40:40 +01:00
Marco Belladelli 9c0b30f99d HHH-15760 various small html fixes javadoc 2022-11-26 09:49:56 +01:00
Marco Belladelli f38dd28043 HHH-15760 mass replace self-closing tags in javadoc 2022-11-26 09:49:56 +01:00
Christian Beikov 276b7a6f95 HHH-15748 Use JSON DDL type on Oracle 21+ and BLOB on 12+ 2022-11-25 10:11:12 +01:00
Christian Beikov 67d751d81d Cleanup embeddable expression handling and resolving of column references 2022-11-23 20:44:33 +01:00
Christian Beikov 4914d14a43 HHH-15626 Move old databases to nightly pipeline and add some SQL Server 2022 features 2022-11-18 11:06:39 +01:00
Christian Beikov 90a752a0ee HHH-15328 Add support for CTE WITH clause 2022-11-10 13:25:21 +01:00
Gavin King 61c128000b HHH-15672 introduce Generated(UPDATE) for properties only generated on update 2022-11-08 12:36:38 +01:00
Gavin King bb0541d754 remove more usages of some deprecated methods 2022-10-29 23:32:05 +02:00
Christian Beikov 940f15b63e HHH-15528 Add Cockroach to Jenkins nightly test matrix and fix issues 2022-10-21 09:51:16 +02:00
Jan Schatteman 0baefce734 HHH-15561 - Fixed and added test for issue
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-10-14 23:26:16 +02:00
Christian Beikov f13230803d HHH-15590 Test that JdbcLiteralFormatter works for all supported java types 2022-10-13 15:21:51 +02:00
Christian Beikov 6b6cd51edf HHH-15592 Fix NPE for uses of JdbcExceptionHelper.extractSqlState 2022-10-12 15:48:20 +02:00
Gavin King f5a5990d03 try to make var_xxx() and sdtev_xxx() more portable 2022-10-08 21:27:43 +02:00
Gavin King 477f1e7af6 HHH-15588 promote sinh(), cosh(), and tanh() 2022-10-08 18:58:42 +02:00
Gavin King 20b905507f HHH-15584 use count_big() on Sybase and SQL Server 2022-10-07 17:03:37 +02:00
Christian Beikov fa89e3e5fa HHH-15531 Use dense_rank instead of row_number when query uses distinct 2022-10-06 08:37:15 +02:00
Christian Beikov 5f2d5e3938 HHH-15578 Add min/max emulation for uuid on PostgreSQL 2022-10-05 11:44:52 +02:00
Christian Beikov 12df6317ec HHH-15548 Fix schema validation issues on PostgreSQL with Instant type 2022-10-04 16:21:58 +02:00
Gavin King 6e94b35ee1 HHH-15549 remove mapping of NUMBER(1,0) to BOOLEAN on Oracle
This just seems wrong to me. We have no way to say that a NUMBER(1,0)
column isn't a single-digit number.

Simplify the other mappings for NUMBER(n,0).
2022-10-02 12:12:33 +02:00
Gavin King 04302caba0 fix SqlTypes.LONG32VARXXXX types and add a test
also fix a bug in initialization of JdbcTypeFamilyInformation

fix incorrect mapping for "long" types on Derby

use default for nicer-looking switch statements

improve some Javadoc
2022-10-01 12:57:30 +02:00
Jan Schatteman bb5aa62927 HHH-15487 - Remove support for PostgreSQL versions older than 10
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-09-21 19:57:32 +02:00
Jan Schatteman 89a98f2dc7 HHH-15489 - Remove support for Oracle versions older than 11.2
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-09-21 17:52:03 +02:00
Jan Schatteman 4f9ff5cfd1 HHH-15511 - fix version determination also for the CockroachDB legacy dialect
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-09-20 17:59:17 +02:00
Jan Schatteman e0e85c3398 HHH-15490 - Remove support for HSQLDB versions older than 2.6.1
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-09-20 08:58:37 +02:00
Gavin King 7740121449 clean up old code + deprecate LockOptions.getAliasLockIterator() 2022-09-16 13:21:44 +02:00
Jan Schatteman 3dec1ca4dc HHH-15447 - Remove references to deprecated dialects
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-09-12 16:05:00 +02:00
Jan Schatteman ec49356c77 HHH-15181 / HHH-15197 / HHH-15198
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-09-07 17:00:57 +02:00
Jan Schatteman 11fb9440ef HHH-15192 - Remove support for Sybase ASE versions older than 16
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2022-09-07 16:51:57 +02:00