Commit Graph

388 Commits

Author SHA1 Message Date
Loïc LEFEVRE ef1cbf589d
HHH-18206 Switch to JDBC LOB APIs for Oracle Dialect (#8486)
HHH-18206 Switch to JDBC LOB APIs for Oracle Dialect
2024-06-02 18:29:52 +02:00
marko-bekhta 045053ff8a HHH-17030 Followup: move schema check to launcher listener 2024-05-31 15:22:00 +02:00
Christian Beikov ed2fdce0a6 HHH-15831 Support non-basic values in aggregate components 2024-05-23 19:56:29 +02:00
Vladimír Kuruc 6247dea9a6 HHH-18163 Fix for Informix foreign key on cascade delete syntax 2024-05-23 19:34:30 +02:00
Vladimír Kuruc 0c9fa65d22 HHH-18153 Checkstyle fixes 2024-05-23 19:32:28 +02:00
Vladimír Kuruc a3f8addd51 HHH-18153 Fix for Informix unique constraints on nullness columns 2024-05-23 19:32:28 +02:00
Christian Beikov 11d22531bb HHH-17884 Introduce special SqlTypes constants for ordinal based enums 2024-05-22 13:58:40 +02:00
LLEFEVRE 6a764d70e6 HHH-18142 Add Oracle Database 23ai support for DROP SEQUENCE IF EXISTS 2024-05-21 12:25:21 +02:00
LLEFEVRE fcc33f3fe1 HHH-18142 Add Oracle Database 23ai support for DROP SEQUENCE IF EXISTS 2024-05-21 12:25:21 +02:00
Marco Belladelli ce48a51eaa Fix CockroachDB timestampdiff errors caused by `round()` return type 2024-05-16 08:56:23 +02:00
Christian Beikov 5c6a2f4a7d HHH-17375 Introduce intersects predicate for easy array_intersects, the replacement of array_overlaps 2024-05-13 22:11:15 +02:00
Christian Beikov 64dd9e657c HHH-17375 Support casting array to string and add optional third argument to array_to_string for null element handling 2024-05-13 22:11:15 +02:00
Yanming Zhou df7f104689 HHH-18033 Fix LimitHandler detect wrong statement end if sql contains quoted semicolon 2024-05-13 10:20:16 +02:00
Marco Belladelli b051936204 Use round in CockroachDB timestampdiff pattern to avoid rounding errors 2024-05-09 08:49:00 +02:00
Yoann Rodière fa35e99543 HHH-18080 Fix default version handling in dialects when not using JDBC metadata
* Use the minimum supported version instead of '0.0.0'
* Don't warn about version '0.0.0'
2024-05-08 07:08:14 -05:00
Christian Beikov d1b30e1ab8 HHH-15862 Support basic array values in aggregate components 2024-05-07 21:00:12 +02:00
Christian Beikov 3ce6a1351a HHH-17421 Ensure that no follow-on locking happens on SQL Server and Sybase ASE 2024-05-07 08:16:49 +02:00
Marco Belladelli 7f00e1a59d HHH-18053 Fix CockroachDB `TemporalUnit.NATIVE` interval pattern 2024-05-06 10:37:37 +02:00
Christian Beikov 9011d22315 HHH-18043 Change the temporal arithmetic to use nanoseconds 2024-05-03 23:14:58 +02:00
Gavin King 72261fd806 HHH-18020 realign behavior of ClobJdbcType with BlobJdbcType
there was some organic divergence here
2024-05-02 20:18:27 +02:00
Christian Beikov 88bdfbfbd4 HHH-18046 Cast parameters used as arithmetic operands on DB2 2024-05-02 18:18:49 +02:00
Christian Beikov 5d4ffac58d HHH-18018 Use NO_PLAIN_PARAMETER for Derby functions that use the length function 2024-05-01 10:33:24 -05:00
Christian Beikov 969ecaae58 Fix SybaseASEDialect column length resolution 2024-04-23 17:08:18 +02:00
Christian Beikov 52adf4f664 HHH-17174 Fix empty query string 2024-04-18 18:16:30 +02:00
Andrea Boriero add62a188b Fix SybaseASEDialect column lenght resolution 2024-04-12 19:27:41 +02:00
Andrea Boriero 4893b6d3ab Fix LobSchemaUpdateTest failure for sybase and mssql legacy dialects 2024-04-12 11:46:07 -05:00
Yanming Zhou 95403bc083 Use Integer.MAX_VALUE instead for better readability 2024-04-12 13:42:47 +02:00
Vladimír Kuruc 9e8fe5ca07 HHH-14080 fix Dialect-Aware Rendering of Null Value Literals for InformixDialect 2024-03-27 13:33:30 +01:00
Christian Beikov 76ca5fb790 HHH-10619 Add test for JTA timeout handling 2024-03-27 13:26:09 +01:00
Gavin King 6441c60255 HHH-17859, HHH-17858 function() and column() functions 2024-03-17 11:14:57 +01:00
Gavin King 115ddffdbc fix constraint name extraction and 'on constraint' on MySQL 2024-03-04 20:52:50 +01:00
Christian Beikov 0163fceed9 HHH-15519 Fix bitwise operation tests on CockroachDB 2024-02-22 14:17:20 +01:00
Christian Beikov 647a1890e8 HHH-16048 Fix portable integer division for HANA and CockroachDB 2024-02-21 13:46:12 +01:00
Gavin King 5fe2b75d2d HHH-15519 make bitand(), bitor(), bitxor() portable
- add bitwise functions on SQL Server and Sybase
- add bitor(), bitxor() on Oracle
- add missing bitwise functions to HANA and h2
- fix broken bitxor() on Postgres
- add bitwise functions for EDB
2024-02-20 09:11:44 +01:00
Gavin King 3769d4c233 use requiresService() much more consistently
we should usually avoid the use of getService() unless
there is an explicit null test on the client side
2024-02-16 23:18:30 +01:00
Andrea Boriero 29f51ef9ca HHH-16454 PostgreSQL ILIKE Keyword is considered a column name when deducing alias injection points 2024-02-08 12:06:11 +01:00
Christian Beikov 5bd7e86e92 HHH-17662 Replace JdbcTypeConstructor uses for arrays with uniform resolve method 2024-02-05 14:33:35 +01:00
yjpark 98907e1ad4 HHH-17696 added missing @Override to AltibaseSqlAstTranslator.java 2024-02-05 13:34:17 +01:00
yjpark 7b0e511577 HHH-17696 Make Altibase Dialect compatible with Altibase 7.1 and fixes several test failures. 2024-02-05 13:34:17 +01:00
HJK181 c2b23508f7 HHH-17675 add enum type support to H2LegacyDialect 2024-01-25 11:14:57 +01:00
Christian Beikov 7ec3667802 Fix test failures on nightly test pipeline 2024-01-15 06:39:57 +01:00
Christian Beikov ea7c8c6836 HHH-17639 Make recursive CTE cycle detection emulation independent of collation 2024-01-15 06:37:20 +01:00
Marco Belladelli 2fce965730 HHH-17435 Allow input param as trim character and fix single quote 2024-01-12 12:52:53 +01:00
Jan Schatteman 446ad5fe91 HHH-17616 - Move resources that were still in src/java to src/resources (hibernate-community-dialects)
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2024-01-08 18:53:12 +01:00
Marco Belladelli 7c58fe9a16 HHH-17490 Fix not in and empty list parameter predicate 2024-01-05 18:45:50 +01:00
Jan Schatteman ec60a5ae1c HHH-14358 - Added test and fix to support null binding for PostgreSQL
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-12-22 19:27:03 +01:00
Marco Belladelli d72856fef0 HHH-17406 Retrieve arbitrary on-execution generated values efficiently 2023-12-22 17:55:50 +01:00
Christian Beikov 53dbc959e1 HHH-16138 Fix update statement join emulation for old DB2 versions 2023-12-22 11:54:44 +01:00
Christian Beikov 78f1be6fa1 HHH-16138 Support joins in SQM UPDATE/DELETE statements 2023-12-21 18:01:30 +01:00
Christian Beikov bb4ed4b000 HHH-17506 Support ON CONFLICT clause for HQL/Criteria inserts 2023-12-21 18:01:30 +01:00
Christian Beikov c931c86896 HHH-17506 Return exceptions instead of throwing them in SQLExceptionConversionDelegate 2023-12-21 18:01:30 +01:00
Christian Beikov ad283cdc4c HHH-17303 Fix test on PostgreSQL 2023-12-20 16:29:32 +01:00
Andrea Boriero 1e21da14cd HHH-17520 Schema creation fails with interval second data type on PostgreSQL 2023-12-13 15:44:29 +01:00
Marco Belladelli ac637ea8af HHH-17425 Introduce some new dialect-specific config params 2023-11-23 14:33:40 +01:00
yjpark 46b064633b HHH-17023 Implements AltibaseDialect 2023-11-14 14:51:35 +01:00
Marco Belladelli 3cfd85d8e2 HHH-17384 Fix `@NotFound` to-one association nullness handling 2023-11-10 09:31:46 +01:00
Christian Beikov adb86e7b7b HHH-17389 Support pg_hint_plan hints for PostgreSQL 2023-11-09 16:09:41 +01:00
Christian Beikov 016dc56208 HHH-17409 Support offset without limit in some LimitHandlers 2023-11-09 16:09:41 +01:00
Christian Beikov c700dcd8b6 HHH-17355 Smoothen some rough edges with parameter typing and PG12 support 2023-11-06 18:01:04 +01:00
Christian Beikov 79e3af5464 HHH-17355 Add array_to_string function 2023-11-06 18:01:04 +01:00
Christian Beikov c3e1815486 HHH-17355 Add array_positions and array_positions_list functions 2023-11-06 18:01:04 +01:00
Christian Beikov 1a5184e89b HHH-17355 Add array_fill function 2023-11-06 18:01:04 +01:00
Christian Beikov faf6345463 HHH-17355 Add array_trim function 2023-11-06 18:01:04 +01:00
Christian Beikov bfb9fcc0f6 HHH-17355 Unify array_contains and array_contains_all as well as deprecate FunctionRenderingSupport in favor of new FunctionRenderer contract 2023-11-06 18:01:04 +01:00
Christian Beikov 5506714611 HHH-17355 Rename array_contains_any to array_overlaps 2023-11-06 18:01:04 +01:00
Jan Schatteman 17771de2a7 HHH-17344 - Fix potential NPE
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-10-30 16:38:27 +01:00
Christian Beikov ae3c88ab66 HHH-17335 Add array_prepend and array_append functions 2023-10-25 18:58:44 +02:00
Christian Beikov 24fa18f954 HHH-17335 Add array_replace function 2023-10-25 18:58:44 +02:00
Christian Beikov 937116ed8a HHH-17335 Add array_slice function 2023-10-25 18:58:44 +02:00
Christian Beikov 950423e7dd HHH-17335 Add array_remove_index function 2023-10-25 18:58:44 +02:00
Christian Beikov 865365e6ec HHH-17335 Add array_remove function 2023-10-25 18:58:44 +02:00
Christian Beikov b8b8a874fd HHH-17335 Add array_set function 2023-10-25 18:58:44 +02:00
Christian Beikov 8c4ed1ef48 HHH-17335 Add array_get function 2023-10-25 18:58:44 +02:00
Christian Beikov d5404fdd49 HHH-17335 Add array_contains quantified functions 2023-10-25 18:58:44 +02:00
Christian Beikov d46fcf1abe HHH-17335 Add array_concat function 2023-10-25 18:58:44 +02:00
Christian Beikov 36b7374ba8 HHH-17335 Add array_length function 2023-10-25 18:58:44 +02:00
Christian Beikov 7f10a48469 HHH-17335 Add array_position function 2023-10-25 18:58:44 +02:00
Christian Beikov 65fb449776 HHH-17335 Add array_contains function 2023-10-25 18:58:44 +02:00
Christian Beikov 2cb4652688 HHH-16780 Add array_agg and array constructor function 2023-10-18 17:38:25 +02:00
Christian Beikov f13264d71d Fix HANA test failures 2023-10-13 14:23:22 +02:00
Jan Schatteman ed84eddcb6 HHH-17090 - Remove support for Oracle versions older than 19
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-10-13 12:36:57 +02:00
Jan Schatteman ec639cd1f7 HHH-17097 - Remove support for MariaDB versions older than 10.4
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-10-13 12:36:57 +02:00
Jan Schatteman 1a1604be2f HHH-17095 - Remove support for SQL Server versions older than 2012
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-10-13 12:36:57 +02:00
Jan Schatteman f12ef0fa79 HHH-17094 - Remove support for MySQL versions older than 8.0
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-10-13 12:36:57 +02:00
Christian Beikov 5bab35eb96 HHH-17176 Map SDO_ORDINATE_ARRAY to BigDecimal[] for Oracle 2023-10-10 09:50:57 +02:00
Christian Beikov bc02c7781d HHH-17276 Be more forgiving when determining lobness 2023-10-09 18:30:18 +02:00
Christian Beikov cb0aad7c7c HHH-17276 Expose size based lob-ness in DdlType and retain info in runtime model 2023-10-05 22:31:54 +02:00
Hendrik Schreiber 9db13eed69 HHH-17245 Removed author tag for Vlad Mihalcea, as he is not one of the authors of this class.
See https://github.com/hibernate/hibernate-orm/pull/7363#issuecomment-1732135727
2023-09-26 17:30:05 +02:00
Hendrik Schreiber 82d5d07750 HHH-17245 Better conform to SQLite/Xerial driver limitations.
Added getAlterTableToAddUniqueKeyCommand(), which always returns "", 
because SQLite does not support unique constraints in ALTER TABLE 
statements (see here). 
Added getDefaultUseGetGeneratedKey(), which always returns false, as the 
Xerial driver does support GET_GENERATED_KEYS.
2023-09-26 17:30:05 +02:00
Christian Beikov 59d254cae1 HHH-17242 Partly revert original solution to retain correct expression types 2023-09-26 15:45:04 +02:00
Christian Beikov 47316da04b HHH-17242 Improve temporal arithmetic SQL rendering 2023-09-22 16:38:06 +02:00
Christian Beikov dd9a51a53a Implement sane collection of skip/require dialect annotations 2023-09-07 14:43:31 +02:00
Christian Beikov d4accd0233 Make use of connection pooling in most tests 2023-09-06 14:57:05 +02:00
Christian Beikov e73a1cdccb HHH-16945 Cast to varbinary for tuple distinct count on SQL Server to avoid collation issues 2023-09-06 10:06:05 +02:00
Jan Schatteman 213660001c HHH-15177 - Remove support for PostgreSQL versions older than 11
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2023-08-28 14:37:40 +02:00
Gavin King 72e092f67f HHH-16989 fix 'cast(string as String(10))', 'cast(string as Binary(10))' on MySQL 2023-08-19 10:40:05 +02:00
Christian Beikov b2fda37773 Use try-with-resources to ensure scroll and stream tests close underlying resources 2023-08-15 19:36:43 +02:00
marko-bekhta 3365c6f585 HHH-17016 Cast to the correct MySQL dialect 2023-08-01 10:32:35 +02:00
Christian Beikov e83008e75d Fix DB2 10.5 testsuite issues 2023-07-25 15:47:08 +02:00
Christian Beikov eb562d5078 HHH-16984 Disable use of arrays for batch and multi-loader on H2 2023-07-24 17:15:19 +02:00
Gavin King 49f890d781 move NullOrdering to the Dialect package where its usages are 2023-07-05 13:23:15 +02:00
Christian Beikov a098abff42 Handle timeout exception for older H2 versions and igonre a test for Cockroach 2023-06-26 17:49:18 +02:00
Sanne Grinovero 0fb5895d08 Automated cleanup: suboptimal string handling (thanks IntelliJ) 2023-06-26 14:38:59 +01:00
Christian Beikov 98e028c51d HHH-14483 Split insert-values statement if dialect doesn't support values lists 2023-06-21 18:24:33 +02:00
Marco Belladelli cbac1b82c0 HHH-16773 Fix functional dependency support for TiDB and Cockroach 2023-06-20 14:21:23 +02:00
Marco Belladelli e5d59b64fd HHH-16773 Introduce support for group/order by PK functional dependency 2023-06-16 14:06:54 +02:00
Christian Beikov 2fb7cdd08b HHH-16697 Fix auto type discovery for aggregate functions on Oracle 2023-06-13 20:59:58 +02:00
Gavin 37c071fa20 better formatting for 'merge' and 'case' 2023-06-06 16:08:05 +02:00
Christian Beikov 2cc1362df7 HHH-15929 Handle the possibility of different JdbcMappings for the same column 2023-06-05 16:49:04 +02:00
Gavin eb959722f9 HHH-16651 introduce new setting to globally enable the use of subselect fetching
and lay foundation for making this settable on the Session
2023-05-22 18:45:28 +02:00
Jarkko Hyöty 6c8bb03c93 HHH-16433 Fix forced follow on locking with order by 2023-05-19 11:31:49 +02:00
Christian Beikov bee160e9f2 HHH-16541 Don't report supportsSkipLocked() for Sybase 2023-05-17 16:22:31 +02:00
Christian Beikov 7823b48a3a HHH-16541 Fix Sybase test issues and HSQLDB hanging 2023-05-17 11:41:18 +02:00
Christian Beikov 031098a248 HHH-16541 Don't consider uninitialized LazyTableGroup for follow-on locking emulation. Fix lock mode upgrade for follow-on locking 2023-05-16 12:58:25 -05:00
Christian Beikov eb6e848de3 HHH-15726 Fix treat disjunction handling and improve pushdown 2023-05-15 10:07:08 +02:00
Marco Belladelli 4e9a643346 Fix several tests failing on Oracle 11 and some others on older dbs 2023-05-15 09:27:35 +02:00
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