Commit Graph

546 Commits

Author SHA1 Message Date
Jens Schauder
94958f5eb6 Polishing.
Code style and formatting.

Original pull request #2036
See #2031
2025-05-08 12:09:04 +02:00
Mark Paluch
becc753e2f Polishing.
Deprecate original DialectResolver and JdbcArrayColumns as they've been in the wrong package and introduce replacements in the dialect package. Let deprecated types extend from their replacements to retain compatibility.

Make instance holders final, fix Javadoc typos, update reference docs.

Original pull request #2036
See #2031
2025-05-08 12:09:04 +02:00
mipo256
7698d487ba Introduced new JDBC dialect counterparts.
Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>

Commit message edited by Jens Schauder

Original pull request #2036
Closes #2031
2025-05-08 12:08:36 +02:00
Mikhail Fedorov
58a3f01ccd Fix performance bug with large number of unnamed parameters
On some occasions where col in (:args) contain a really lot args, 10k+ for instance, this commit fixes a performance (high CPU) bug by NOT traversing the whole map in basically O(n^2) manner

Signed-off-by: Mikhail Fedorov <mfedorov761@gmail.com>

Squashed by Jens Schauder

Original pull request #2050
2025-05-07 10:31:02 +02:00
Jens Schauder
520d6a7d4d Polishing.
Added author tags.

Original pull request: #2049
See #2025
2025-05-06 16:06:29 +02:00
Daeho Kwon
e88f4fe299 Adopt to deprecated QueryMethod constructor.
Original pull request: #2049
Closes: #2025
2025-05-06 16:05:55 +02:00
Mark Paluch
0aecfcee73 Polishing.
Extract SequenceEntityCallbackDelegate from IdGeneratingBeforeSaveCallback. Renameto IdGeneratingEntityCallback and move callback to convert package.

Align return values and associate generated sequence value with the entity. Fix test. Add ticket references to tests.

Extract documentation partials.

See #1955
Original pull request: #2028
2025-04-24 09:51:02 +02:00
mipo256
d6121cbfe2 R2DBC @Sequence annotation support.
Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>

See #1955
Original pull request: #2028
2025-04-24 09:42:24 +02:00
Mark Paluch
1f2e69452b Fix integration tests.
See #2003
Original pull request: #2005
2025-04-09 15:28:58 +02:00
Mark Paluch
e27a05880f Fix typo in sequence selection.
See #2003
Original pull request: #2005
2025-04-09 11:48:04 +02:00
Mark Paluch
eb25cc3ed4 Move Sequence to RelationalPersistentProperty.
Sequence details are now maintained on the property level instead of using the entity level. This is a more accurate representation of the underlying model and that properties are annotated and not entities. It also allows future extension of expanding sequence support to general properties.

Extract delegate for sequence generation. Move types to org.springframework.data.jdbc.core.convert to resolve package cycles.

See #2003
Original pull request: #2005
2025-04-09 10:45:47 +02:00
Mark Paluch
d0e43be314 Polishing.
Refine assignment flow and use early returns where possible. Cache empty MapSqlParameterSource. Reduce dependency on RelationalMappingContext using a lower-level abstraction signature. Simplify names. Use default value check from Commons. Fix log warning message. Add missing since tags.

Remove superfluous annotations and redundant code. Tweak documentation wording.

Closes #2003
Original pull request: #2005
2025-04-09 10:31:15 +02:00
mipo256
0fc3187916 Omit Sequence value generation when identifier value is provided or the entity is not new.
Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>

Closes #2003
Original pull request: #2005
2025-04-09 10:30:42 +02:00
Jens Schauder
ba9021243c Remove usage of Slf4J.
Closes #2009
2025-03-11 10:27:01 +01:00
Jens Schauder
a7a9fbca5d Polishing.
Refining documentation.

Original pull request #2008
2025-03-10 15:20:17 +01:00
mipo256
1c15a8bade Clarify lack of @Lock support for String-based queries.
Original pull request #2008

Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>

Commit message edited.
2025-03-10 15:19:19 +01:00
luckygc
9b9a60c6d8 Fix typo SqlGenerator.java
Original pull request #1987

Signed-off-by: luckygc <chenwwecm@gmail.com>

Commit message edited.
2025-02-11 12:59:08 +01:00
Jens Schauder
8c017fc56b Polishing.
Reference issues in tests comments.
Removed `DisabledOnDatabase`
IdGeneration default methods related to sequence generation are now internally consistent.
Formatting and naming.
IdGeneration offers simple support by default.
Fix exception in oracle integration test setup
Use SqlIdentifier for sequence names
Remove SEQUENCE id source
Added documentation

See #1923
Original pull request #1955
2025-02-05 08:53:32 +01:00
Mikhail2048
d1c996008c Support for ID generation by sequence.
Ids can be annotated with @Sequence to specify a sequence to pull id values from.

Closes #1923
Original pull request #1955

Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>

Some accidential changes removed.
Signed-off-by: schauder <jens.schauder@broadcom.com>
2025-02-04 17:03:19 +01:00
Jens Schauder
b51c77b50a Polishing.
Minor formatting and references to GH issues.

See #1714
Original pull request #1963
2025-01-16 10:46:37 +01:00
Sergey Korotaev
ea296429df Add Stream support to JdbcAggregateOperations
See #1714
Original pull request #1963

Signed-off-by: Sergey Korotaev <sergey.evgen.kor2501@gmail.com>
2025-01-16 10:46:25 +01:00
Jens Schauder
feb630abfa Invoke callbacks for find by Query methods.
Callback handlers are now properly called for findAll/One with Query parameter.

Closes #1979
2025-01-13 09:40:15 +01:00
Jens Schauder
dfd8123a07 Simplified EntityRowMapper.
Removes an unused field and moves operations into  constructor, to make the mapRow method simpler.

Closes #1974
2025-01-08 15:05:45 +01:00
Mark Paluch
8b157aa779 Extend license header copyright years to 2025.
See #1973
2025-01-08 10:04:52 +01:00
Jens Schauder
bce51f44ba Polishing.
Moved Kotlin files to kotlin source directory.

Minor formatting.

See #1961
Original pull request #1962
2024-12-18 14:18:56 +01:00
Felix Desyatirikov
8d1e0e1578 Add Kotlin extensions to JdbcAggregateOperations.
Closes #1961
Original pull request #1962
2024-12-18 14:17:55 +01:00
Jens Schauder
73d6788067 Polishing.
Fix merge problems.

Execute tests only for HsqlDb.

Refactoring to use lists instead of streams.
We try to avoid the latter, since they are prone to cause performance issues.

Minor refactorings.

See #771
See #230
Original pull request #1486
2024-12-18 12:39:52 +01:00
Nikita Konev
1515a3af42 Support derived delete.
Closes #771
See #230
Original pull request #1486
2024-12-18 12:39:43 +01:00
Jens Schauder
6eed53fd3c Remove code duplication.
Mainly reimplements the changes undone in 49e343fe8a.
The check for presence of the ID property is implemented for all variants for save, as it should.

See #1924
Original pull request #1925
2024-11-18 13:28:06 +01:00
Jens Schauder
49e343fe8a Fix Callback order.
This undos the changes to `JdbcAggregateTemplate` done by 7cf81ae.
Since we are in the RC phase I opt against trying to redo the refactoring

Closes #1924
2024-10-29 09:47:31 +01:00
Jens Schauder
a351a66fcb Polishing.
Using records in tests.
Removing "public" modifier in tests.

See #1924
2024-10-29 09:47:31 +01:00
Jens Schauder
593d73ab16 Fix SQL generation for query with sorting.
Closes #1919
2024-10-25 15:24:23 +02:00
Mark Paluch
73e503338d Polishing.
Eliminate potential NoSuchElementException from unchecked Optional.get usage. Simplify stream. Return Staged value, fix Nullability annotations.

See #1907
Original pull request: #1920
2024-10-25 14:56:54 +02:00
Jens Schauder
a7d7adaaf2 Fix id setting for partial updates of collections of immutable types.
We gather immutable entities of which the id has changed, in order to set them as values in the parent entity.
We now also gather unchanged entities.
So they get set with the changed one in the parent.

Closes #1907
Original pull request: #1920
2024-10-25 14:56:54 +02:00
Tran Ngoc Nhan
f2d62ad7e7 Polishing.
Pattern matching usage.
Diamond operator usage.
Remove unused import.
isEmpty usage.

Original pull request #1912
2024-10-21 09:10:13 +02:00
Mark Paluch
8c6364b4bf Polishing.
Simplify R2DBC expression handling. Use new ValueExpression API instead of holding parameter binding duplicates.

Reformat code. Add author tags.

See #1904
Original pull request: #1906
2024-10-09 13:35:18 +02:00
Marcin Grzejszczak
d526cd3a22 Add support for Value Expressions for Repository Query methods.
Closes #1904
Original pull request: #1906
2024-10-09 13:35:16 +02:00
Mark Paluch
8622d70ba4 Polishing.
Refine tests. Extend comment for future-me.

See #1900
Original pull request: #1903
2024-10-02 15:08:11 +02:00
Jens Schauder
ae8651869e Do not convert binary data in List<byte[]> to array SQL type.
byte[] is mapped to BINARY data and is not considered tuple data.

The explicit check for byte[] is not very nice but matches the special handling in MappingJdbcConverter.writeJdbcValue

Closes #1900
Original pull request: #1903
2024-10-02 15:08:10 +02:00
Jens Schauder
b3040a1044 Removes superfluous EnabledOnDatabase.
Closes #1902
2024-10-01 15:57:04 +02:00
Mark Paluch
7cf81aed35 Polishing.
Replace code duplications with doWithBatch(…) method. Return most concrete type in DefaultDataAccessStrategy and MyBatisDataAccessStrategy.

See #1623
Original pull request: #1897
2024-10-01 09:10:59 +02:00
Jens Schauder
c4f62e9f56 Return List instead of Iterable in JDBC Repositories and JdbcAggregateOperations.
Closes #1623
Original pull request: #1897
2024-10-01 09:10:58 +02:00
Jens Schauder
4d5a382a73 Polishing.
Original pull request #1901
2024-09-30 12:20:11 +02:00
Mikhail2048
08daf47842 Refactoring.
Clarified nullabillity for Identifier.
Removed usage of deprecated constructor for StringBasedJdbcQuery.

Original pull request #1901
2024-09-30 12:18:43 +02:00
Tran Ngoc Nhan
146e5495df Minor refactoring.
Original pull request #1895
2024-09-24 09:09:08 +02:00
Tran Ngoc Nhan
9277792d87 Polishing.
Original pull request #1894
2024-09-23 09:20:47 +02:00
Mark Paluch
033ac1f95a Polishing.
Refactor JdbcLookupStrategy to not generally require BeanFactory. Reintroduce deprecated setBeanFactory(…) method.

See #1872
Original pull request: #1874
2024-09-16 09:10:12 +02:00
Jens Schauder
d2bb64f4ca StringBasedJdbcQuery no longer requires BeanFactory.
The lookup is now performed by the `RowMapperFactory`.

Closes #1872
Original pull request: #1874
2024-09-16 09:10:12 +02:00
Jens Schauder
9e91a0e7a5 Polishing.
Fix Javadoc.

See #1872
Original pull request: #1874
2024-09-16 09:10:12 +02:00
Jens Schauder
615c79cb3e Polishing.
See #1873
Original pull request #1875
2024-09-12 09:24:43 +02:00