Commit Graph

582 Commits

Author SHA1 Message Date
Jens Schauder
080d3af504 DATAJDBC-555 - Polishing.
Removed redundant content.
Change to active voice.
Formatting.

Original pull request: #225.
2020-06-10 10:35:49 +02:00
Mark Paluch
8ef047c3a6 DATAJDBC-555 - Document supported databases.
Original pull request: #225.
2020-06-10 10:35:39 +02:00
Mark Paluch
e560ca67de DATAJDBC-555 - Add common reference documentation sections.
Original pull request: #225.
2020-06-10 10:35:29 +02:00
Mark Paluch
66c6c8e881 DATAJDBC-555 - Polishing.
Fix formatting.

Original pull request: #225.
2020-06-10 10:34:47 +02:00
Mark Paluch
c4a0b86725 DATAJDBC-561 - Use standard Spring code of conduct.
Using https://github.com/spring-projects/.github/blob/master/CODE_OF_CONDUCT.md.
2020-06-09 16:05:51 +02:00
Mark Paluch
eeeb188117 DATAJDBC-560 - Fix Criteria mapping when composing a group from top-level criteria.
Using Criteria.from(…) with multiple Criteria objects now uses properly AND combination along with group nesting to render a correct criteria. Previously, the INITIAL combinator in groups caused a mapping exception.
2020-06-09 15:31:14 +02:00
Mark Paluch
81aba29fda DATAJDBC-546 - Skip property population if entity can be constructed entirely using a full constructor. 2020-05-28 13:54:30 +02:00
Mark Paluch
24ce2a9ba4 DATAJDBC-547 - Polishing.
Add scripts for DB2 after rebase.

Original pull request: #221.
2020-05-27 13:11:55 +02:00
Mark Paluch
ccfe820dab DATAJDBC-547 - Polishing.
Let SqlIdentifier implement Streamable<SqlIdentifier> to allow iteration of composed identifiers.
Adapt dialect to iteration changes.

Rewrite simple if blocks to using ternary operators.

Original pull request: #221.
2020-05-27 10:01:44 +02:00
Jens Schauder
d3e6db2cce DATAJDBC-547 - Fixes lock statement for fully qualified table names in PostgreSQL.
Original pull request: #221.
2020-05-27 10:01:39 +02:00
Jens Schauder
2336838e26 DATAJDBC-539 - Polishing.
Original pull request: #217.
2020-05-25 16:17:40 +02:00
Mark Paluch
c2386b6049 DATAJDBC-539 - Fix parameter wrapping for IN criteria.
We now no longer double-wrap parameters for IN criteria. Previously, collection arguments were wrapped into another collection which caused double-wrapped lists.

Original pull request: #217.
2020-05-25 16:17:20 +02:00
Jens Schauder
4ee9eb8df5 DATAJDBC-544 - Removes all Lombok from production code. 2020-05-20 15:44:03 +02:00
Jens Schauder
dedaf34614 DATAJDBC-545 - Fix support of setting properties via constructor. 2020-05-19 14:46:39 +02:00
Jens Schauder
8e63084162 DATAJDBC-412 - Polishing.
Added an integration test because you never can tell with databases.
2020-05-15 17:04:33 +02:00
Christoph Strobl
6f2bb59ceb DATAJDBC-412 - Support custom single value types in id.
Custom value types like outlined below can now server as id property

public class IdValue {
	String id;
}

public class DomainType {

	@Id
	IdValue id;
	String value;

	// ...
}
2020-05-15 15:30:41 +02:00
Mark Paluch
fc74fa9975 DATAJDBC-542 - Polishing.
Initialize map with capacity. Fix generics.

Original pull request: #218.
2020-05-14 10:42:12 +02:00
Jens Schauder
30a6fb5654 DATAJDBC-542 - Fixes access to Identifier parts by String.
Enabled access to identifier parts by String arguments in order to make usage with MyBatis feasable.
Properly pass identifier information to MyBatis for insert statements.

Original pull request: #218.
2020-05-14 10:42:01 +02:00
Mark Paluch
ae70d9593c DATAJDBC-528 - After release cleanups. 2020-05-12 12:40:30 +02:00
Mark Paluch
463df9d415 DATAJDBC-528 - Prepare next development iteration. 2020-05-12 12:40:28 +02:00
Mark Paluch
44fdfc27bb DATAJDBC-528 - Release version 2.0 GA (Neumann). 2020-05-12 12:28:23 +02:00
Mark Paluch
ee190a15a7 DATAJDBC-528 - Prepare 2.0 GA (Neumann). 2020-05-12 12:27:59 +02:00
Mark Paluch
d6ee1cc0c6 DATAJDBC-528 - Updated changelog. 2020-05-12 12:27:45 +02:00
Mark Paluch
850dc4c758 DATAJDBC-538 - Polishing.
Reformat code.

Original pull request: #216.
2020-05-11 14:32:23 +02:00
Jens Schauder
3c9290483a DATAJDBC-538 - Fixes lock acquisition for DB2.
The DB2 driver requires one to access the `ResultSet` resulting from a SELECT FOR UPDATE.

See also:
* https://github.com/schauder/db2-locks
* https://stackoverflow.com/questions/61681095/how-to-obtain-a-lock-in-db2-with-select-for-update-without-transferring-data

Original pull request: #216.
2020-05-11 14:32:11 +02:00
Mark Paluch
0448148bec DATAJDBC-493 - Polishing.
Reformat code. Introduce assertions.
2020-05-11 10:57:57 +02:00
Jens Schauder
c3fb6d0d51 DATAJDBC-534 - Adds integration test for count projection.
Original pull request: #215.
2020-05-07 08:42:04 +02:00
mhyeon-lee
bc6c88f055 DATAJDBC-534 - Derived Query support for count projection.
Original pull request: #215.
2020-05-07 08:39:22 +02:00
Jens Schauder
aa05b792c3 DATAJDBC-493 - Polishing.
Using `execute` instead of `query` since we are not interested in the results.
Refactoring of the concurrency tests.
Make the concurrency tests run with all databases.
Added support for DB2.
Moved AnsiDialect to the main sources so it can be referenced in other Dialects.

Original pull request: #196.
2020-05-06 16:18:04 +02:00
mhyeon-lee
04c29f4004 DATAJDBC-493 - Avoids deadlocks by acquiring lock on aggregate root table.
Introduces infrastructure to obtain locks and uses them to acquire locks on the table of the aggregate root before deleting references.
Without this lock deletes access non root entities before the aggregate root, which is the opposite order of updates and thus may cause deadlocks.

Original pull request: #196.
2020-05-06 16:18:04 +02:00
Mark Paluch
fa8b95c5f3 DATAJDBC-257 - Polishing.
Move container initialization from static initializer into createDataSource() to not trigger container start when loading the class.
Add TestExecutionListener to ignore tests if the license for a container was not accepted. Add Awaitility to delay test execution until the database is ready so we avoid strange failures due to a delayed container startup.

Fix generics, since tags, author tags. Reformat code.

Original pull request: #213.
2020-05-06 15:54:41 +02:00
Jens Schauder
4bf2b8d0a8 DATAJDBC-257 - Adds DB2 support.
Db2Dialect added in order to support DB2.
Added test configuration files.
Adapted some tests to make them properly work with DB2
QueryAnnotationIntegrationTests converted into an Hsqldb only test since it is next to impossible to make it work across databases since it heavily depends on database and driver specifics.

Removed license acceptance file from the repository in order to not accept a license in the name of someone forking the repository.
For the CI build an appropriate file gets created on the fly.

Original pull request: #213.
2020-05-06 15:49:07 +02:00
Mark Paluch
b0d37bda8a DATAJDBC-529 - Polishing.
Rearrange imports.

Original pull request: #212.
2020-05-05 13:48:53 +02:00
Jens Schauder
370ee4464e DATAJDBC-529 - Use specialized ResultSetExtractor for exists queries.
Exists queries do not look at the value returned in the ResultSet but just check if there is a row.

Original pull request: #212.
2020-05-05 13:45:19 +02:00
Greg Turnquist
2029a0c71d DATAJDBC-532 - Remove Travis CI. 2020-05-04 15:15:24 -05:00
Jens Schauder
ac88f1d4f9 DATAJDBC-530 - Polishing.
Original pull request: #210.
2020-05-04 09:19:35 +02:00
mhyeon-lee
f9bc40cc46 DATAJDBC-530 - The sorting property set as the property name.
Original pull request: #210.
2020-05-04 09:17:18 +02:00
Mark Paluch
8c70bbf7e0 DATAJDBC-517 - After release cleanups. 2020-04-28 15:11:43 +02:00
Mark Paluch
40037023f3 DATAJDBC-517 - Prepare next development iteration. 2020-04-28 15:11:42 +02:00
Mark Paluch
82f9e59b42 DATAJDBC-517 - Release version 2.0 RC2 (Neumann). 2020-04-28 15:03:53 +02:00
Mark Paluch
ba550a12d7 DATAJDBC-517 - Prepare 2.0 RC2 (Neumann). 2020-04-28 15:03:33 +02:00
Mark Paluch
1ad7044cd2 DATAJDBC-517 - Updated changelog. 2020-04-28 15:03:22 +02:00
Mark Paluch
6fc70b8e13 DATAJDBC-511 - Updated changelog. 2020-04-28 14:46:50 +02:00
Mark Paluch
3d4da895f9 DATAJDBC-495 - Updated changelog. 2020-04-28 11:59:00 +02:00
Jens Schauder
6420205eed DATAJDBC-524 - Fixed dependency cycles triggered by DATAJDBC-318.
Moved Identifier and IdentifierBuilder to ...jdbc.core.convert.
Moved RelationaAuditingCallback to ..mapping.event.

Improved DependencyTests to properly consider "relational" a main module.
2020-04-28 11:09:52 +02:00
Jens Schauder
d80614b4d8 DATAJDBC-318 - Fixed the generation of the select list.
The select list must include columns for 1:1 relationships.

The implementation is copied from SqlGenerator and will be unified in the near future.

Original pull request: #209.
2020-04-28 09:23:52 +02:00
Mark Paluch
aadbb667ed DATAJDBC-318 - Extend query method validation.
We now reject criteria predicates for collections, maps and references. The select list selects all columns until DATAJDBC-523 is solved.

Original pull request: #209.
2020-04-28 09:23:52 +02:00
Jens Schauder
fd98e16038 DATAJDBC-318 - Adding a failing test.
Added failing tests for entities with references.

Code deduplication.
Documentation wording.
Formatting.

Original pull request: #209.
2020-04-28 09:23:52 +02:00
Mark Paluch
999bf29321 DATAJDBC-318 - Initial support for query derivation.
Move JdbcRepositoryQuery into repository.query package. Split JdbcRepositoryQuery into AbstractJdbcQuery and StringBasedJdbcQuery.
Add QueryMapper for mapping of Criteria.
Initial support for query derivation.

Emit events and issue entity callbacks only for default RowMapper.
Custom RowMapper/ResultSetExtractor are in full control of the mapping and can issue events/callbacks themselves.

Update reference documentation.

Original pull request: #209.
2020-04-28 09:23:52 +02:00
Jens Schauder
2f3f00bd71 DATAJDBC-318 - Adapting DependencyTests.
Without this change we see cyclic dependencies between modules (i.e. subpackages).
The following subpackages had a cycle:

repository.query and repository.query.parser

PartTreeJdbcQuery and JdbcQueryCreator(repository.query from jdbc) depend on PartTree (repository.query.parser)

AbstractQueryCreator (repository.query.parser) depends on ParameterAccessor (repository.query from commons)

This change changes the definition of a module, bundling all the modules above into one module (repository).

Alternative changes that should fix the problem:
1. Move ParameterAccessor to a different (probably new package)
2. Move AbstractQueryCreator to a different (probably new package)
3. org.springframework.data.jdbc.repository.query to e.g. org.springframework.data.jdbc.repository.query.jdbc

Original pull request: #209.
2020-04-28 09:23:52 +02:00