Sam Brannen
06c6af9b0d
Stop using Constants utility in IsolationLevelDataSourceRouter
...
See gh-30851
2023-07-31 16:08:47 +03:00
Sam Brannen
0eda44186a
Polish tests for configuration constants
...
See gh-30851
2023-07-31 16:08:47 +03:00
Sam Brannen
48eb477755
Assert LazyConnectionDataSourceProxy.setDefaultTransactionIsolation() values
...
See gh-30851
2023-07-31 15:11:52 +03:00
Sam Brannen
cc9278666d
Stop using Constants utility in LazyConnectionDataSourceProxy
...
See gh-30851
2023-07-31 13:56:49 +03:00
Juergen Hoeller
019c34f480
Introduce JdbcClient as a fluent facade for query/update execution
...
Delegates to JdbcTemplate/NamedParameterJdbcTemplate underneath the covers.
Supports parameter objects/records through SimplePropertySqlParameterSource.
Closes gh-30931
2023-07-25 18:10:30 +02:00
Sam Brannen
9571aa1c68
Stop using Constants utility in IsolationLevelDataSourceAdapter
...
See gh-30851
2023-07-19 18:05:41 +03:00
Sam Brannen
5ce8ffd197
Merge branch '6.0.x'
2023-07-15 13:11:03 +02:00
Sam Brannen
a34f9fa66c
Update copyright headers
2023-07-15 13:10:46 +02:00
Sam Brannen
70cf754a2f
Suppress warnings in tests
2023-07-15 13:02:16 +02:00
Sam Brannen
e6d360c1c6
Polishing
2023-07-15 12:58:18 +02:00
Juergen Hoeller
3fed2ec3a1
Add common SqlValue implementation for JDBC Array creation
...
Closes gh-1850
2023-07-13 00:28:32 +02:00
Sam Brannen
16b9640af2
Merge branch '6.0.x'
2023-07-12 11:50:11 +02:00
Sam Brannen
68f2b0ca59
Rely on auto-boxing in tests
2023-07-12 11:49:02 +02:00
Sébastien Deleuze
b3de1b8e95
Use consistently *KotlinTests naming for Kotlin tests
...
Closes gh-30837
2023-07-08 11:02:20 +02:00
Juergen Hoeller
35c7e3960e
Polishing
2023-07-07 13:46:57 +02:00
Sébastien Deleuze
8fb412ea74
Merge branch '6.0.x'
2023-07-08 11:11:37 +02:00
Juergen Hoeller
ddc3cf301a
Merge branch '6.0.x'
...
# Conflicts:
# spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java
2023-07-07 13:51:08 +02:00
Juergen Hoeller
2689bab652
Merge branch '6.0.x'
2023-06-03 17:19:06 +02:00
Juergen Hoeller
d2906253f1
Fall back to plain setObject call for non-supported SQL type
...
Closes gh-30556
2023-06-03 17:16:36 +02:00
Sam Brannen
7df2e2a8d2
Remove APIs deprecated for removal in 6.1
...
This is the first commit that removes deprecated APIs.
Subsequent commits will remove additional deprecated APIs.
See gh-29449
2023-04-19 17:23:49 +02:00
Krzysztof Krasoń
1734deca1e
Refactor AssertJ assertions into more idiomatic ones
...
This commit refactors some AssertJ assertions into more idiomatic and
readable ones. Using the dedicated assertion instead of a generic one
will produce more meaningful error messages.
For instance, consider collection size:
```
// expected: 5 but was: 2
assertThat(collection.size()).equals(5);
// Expected size: 5 but was: 2 in: [1, 2]
assertThat(collection).hasSize(5);
```
Closes gh-30104
2023-04-04 17:34:07 +02:00
Simon Baslé
90b0f451f0
Add a couple missing java.time types to StatementCreatorUtils
...
This commit adds mapping for two types from the `java.time` package,
complementing the types that are already translatable to Sql types
TIME, DATE and TIMESTAMP:
- `OffsetTime` maps to a `TIME_WITH_TIMEZONE`
- `OffsetDateTime` maps to a `TIMESTAMP_WITH_TIMEZONE`
This is in accordance with the B.4 table provided in the JDBC 4.2
specification.
When preparing statements, these `java.time` types use the `setObject`
method. Tests covering the 5 `java.time` classes have also been added.
See gh-28778
See gh-28527
Closes gh-30123
2023-04-04 16:51:24 +02:00
Juergen Hoeller
ca9439657e
Detect MSSQL code 2601 as duplicate key (aligned with sql-error-codes.xml)
...
Closes gh-29950
2023-02-09 14:59:09 +01:00
Sam Brannen
5f458e2578
Polish RowMapper tests
2023-02-07 19:05:38 +01:00
Sam Brannen
84bc1dfa89
Polish RowMapper tests
2023-02-03 17:47:50 +01:00
Sam Brannen
159a3e71f2
Clarify semantics of primitivesDefaultedForNullValue in BeanPropertyRowMapper
...
Closes gh-29923
2023-02-03 17:47:50 +01:00
Sam Brannen
3f148c2aaa
Avoid warnings / Polishing
2023-01-20 15:22:47 +01:00
Sam Brannen
0502d18e3d
Update copyright headers
2023-01-19 16:20:03 +01:00
Sam Brannen
c4c786596f
Migrate to Mockito.mock(T...) where feasible
2023-01-19 16:20:02 +01:00
Sam Brannen
11df955d88
Update copyright headers
2023-01-09 18:33:06 +01:00
Johnny Lim
62cf2f0a4f
Fix wrong asserted code in SQLExceptionSubclassTranslatorTests ( #29748 )
...
There was a typo in the test, covering the wrong SQLState code.
Polishes a644245 .
Relates to gh-29699.
2023-01-03 10:57:02 +01:00
Juergen Hoeller
254c3725e2
Polishing
2022-12-23 15:14:11 +01:00
Juergen Hoeller
a644245e0e
Check well-known database error codes in case of generic SQL state 23000
...
Closes gh-29699
2022-12-23 15:13:29 +01:00
Juergen Hoeller
4c69892f39
Detect SQL state 23505/40001 as DuplicateKeyException/CannotAcquireLockException
...
Favors PessimisticLockingFailureException over plain ConcurrencyFailureException.
Deprecates CannotSerializeTransactionException and DeadlockLoserDataAccessException.
Closes gh-29511
Closes gh-29675
2022-12-13 11:07:13 +01:00
Sam Brannen
ad60164911
Update copyright headers for source code changed since August 2022
...
The changes in this commit were performed using the newly introduced
update_copyright_headers.sh script.
2022-11-29 19:38:42 +01:00
Sam Brannen
7fcd1de8e3
Use AssertJ's isEmpty() instead of hasSize(0)
...
Achieved via global search-and-replace.
2022-11-22 17:11:50 +01:00
Sam Brannen
d5b0b2b1a1
User AssertJ's hasSize() for arrays
...
Achieved via global search-and-replace.
2022-11-22 17:03:45 +01:00
Sam Brannen
36f7597f25
Use AssertJ's hasSize() for collections and maps
...
Achieved via a global search-and-replace.
2022-11-22 16:50:10 +01:00
Sam Brannen
f26a7dee97
Fix broken tests, update copyright dates, and polish
...
See gh-29414
2022-11-08 20:07:53 +01:00
Kulwant Singh
b2c8546013
Rely on automatic boxing/unboxing in tests
...
Closes gh-29414
2022-11-08 19:38:03 +01:00
Sam Brannen
e058a6061a
Move DataFieldMaxValueIncrementerTests to the appropriate package
2022-11-08 18:02:19 +01:00
Mahmoud Ben Hassine
f9ed0721a8
Introduce DataFieldMaxValueIncrementer for SQL Server sequences
...
This commit introduces SqlServerSequenceMaxValueIncrementer to support
SQL Server sequences, complementing the existing
SqlServerMaxValueIncrementer for table-based support.
Closes gh-29447
2022-11-08 17:54:16 +01:00
Sam Brannen
210019cad1
Polish contribution
...
See gh-29379
2022-11-01 11:41:41 +01:00
Mahmoud Ben Hassine
39f24f0244
Introduce DataFieldMaxValueIncrementer for MariaDB
...
Closes gh-29379
2022-11-01 11:27:34 +01:00
Juergen Hoeller
aaa22ad07d
Remove square brackets with index/key expressions from generated SQL
...
See gh-27925
2022-10-19 18:23:49 +02:00
Juergen Hoeller
d4fac82d68
Preserve square brackets for index/key expressions
...
Closes gh-27925
2022-10-18 22:39:53 +02:00
Sam Brannen
ae368a20b8
Merge branch '5.3.x'
...
# Conflicts:
# spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonDecoderTests.kt
# spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonEncoderTests.kt
2022-10-08 14:06:41 +02:00
Johnny Lim
1c1a0afbed
Use AssertJ static imports consistently in 5.3.x
...
Closes gh-29282
2022-10-08 13:57:21 +02:00
Sébastien Deleuze
ff81d64fb5
Add reflection hint for EmbeddedDataSourceProxy#shutdown
...
This commit adds a reflection hint on
EmbeddedDatabaseFactory$EmbeddedDataSourceProxy#shutdown when
EmbeddedDatabaseFactory is reachable in order to allow its usage
as bean destroy method.
Closes gh-29259
2022-10-05 14:08:09 +02:00
Sam Brannen
261124f497
Remove flaky executesHugeScriptInReasonableTime() tests
...
These tests often fail on the CI server and do not provide any
meaningful information when they fail, since only a proper benchmark
would suffice. Furthermore, the test method was introduced 10 years
ago to address deficiencies in JDK 7 which no longer exist.
See gh-14415
2022-09-08 13:18:05 +02:00