Commit Graph

1007 Commits

Author SHA1 Message Date
Mark Paluch
df92c8b184 DATACASS-560 - Allow INSERT with null values through InsertOptions.insertNulls.
We now allow the configuration whether null values of entity objects should be inserted as tombstones using INSERT statements. By default, this option is disable. Enabling tombstones allows upsert usage through INSERT statements as null values get inserted in Cassandra. This option is useful if an object should be persisted in its whole state. Inserting nulls causes tombstones to be created and can have a negative impact on performance.

This change allows SimpleRepository and SimpleCassandraRepository to use CassandraTemplate directly allowing emission of lifecycle events.
2018-06-11 15:15:38 +02:00
Mark Paluch
f20a11073e DATACASS-563 - Run time column type tests conditionally.
Run time column type tests only on Cassandra 3.10 and higher as earlier Cassandra versions do not support integer for updating/setting time columns.
2018-06-05 09:57:29 +02:00
Mark Paluch
31c373376d DATACASS-555 - Polishing.
Add Javadoc. Tweak Javadoc for consistency. Refactor SimpleReactivePreparedStatementCreator into newReactivePreparedStatementCreator(…) method. Reformat code.

Original pull request: #133.
2018-06-05 09:45:32 +02:00
CodeSmell
6150282e1d DATACASS-555 - Use CqlTemplate.newPreparedStatementCreator for creation of PreparedStatementCreator.
Original pull request: #133.
2018-06-05 09:45:32 +02:00
Mark Paluch
e462c7165a DATACASS-561 - Polishing.
Fix typos. Use uppercase CQL keywords. Remove outdated sections. Align reactive and imperative documentation wording.

Original pull request: #132.
2018-06-04 15:39:35 +02:00
Jay Bryant
a0ceb25edd DATACASS-561 - Full editing pass on reference documentation.
Original pull request: #132.
2018-06-04 15:39:35 +02:00
Jay Bryant
5a2c190d4c DATACASS-562 - Add coverpage for epub documentation output.
Original pull request: #132.
2018-06-04 14:10:43 +02:00
Christoph Strobl
7cbb864185 DATACASS-545 - After release cleanups. 2018-05-17 10:09:35 +02:00
Christoph Strobl
be6536e3c4 DATACASS-545 - Prepare next development iteration. 2018-05-17 10:09:34 +02:00
Christoph Strobl
29870a830d DATACASS-545 - Release version 2.1 M3 (Lovelace). 2018-05-17 09:51:42 +02:00
Christoph Strobl
9080d64622 DATACASS-545 - Prepare 2.1 M3 (Lovelace). 2018-05-17 09:50:48 +02:00
Christoph Strobl
7f8b174509 DATACASS-545 - Updated changelog. 2018-05-17 09:50:40 +02:00
John Blum
64d464a1b9 DATACASS-484 - Polish.
Resolves PR #125.
2018-05-17 00:18:06 -07:00
Mark Paluch
f123624b3d DATACASS-484 - Add Kotlin extensions for Template API.
We now provide Kotlin extensions for imperative, asynchronous, and reactive Template API interfaces.

CqlOperations and CassandraOperations expose Kotlin-friendly methods accepting KClasses and leveraging reified generics. We also provide Kotlin-friendly method renames for methods such as in that do not require quoting in Kotlin code.

operations.query(Person::class).inTable("my_table").asType<User>().all()

operations.select<Person>(query(where("firstname").isEqualTo("Walter") and where("lastname").isEqualTo("White")))
2018-05-17 00:10:31 -07:00
Mark Paluch
57a6faeab6 DATACASS-484 - Prepare Java-based types for Kotlin extensions.
Introduce static empty Query and Update objects.

Remove unused type argument from ReactiveUpdateOperation.
2018-05-17 00:10:08 -07:00
John Blum
05a5b4aa28 DATACASS-553 - Adapt to SpEL Extension API changes in Spring Data Commons. 2018-05-14 13:06:46 -07:00
Mark Paluch
6b250c6e47 DATACASS-540 - Updated changelog. 2018-05-08 15:27:19 +02:00
Mark Paluch
bf4dc741aa DATACASS-539 - Updated changelog. 2018-05-08 12:22:50 +02:00
Mark Paluch
d60fb9c928 DATACASS-546 - Polishing.
Remove unnecessary throws declarations. Reformat code.
2018-04-23 11:26:10 +02:00
Mark Paluch
7cba0e2260 DATACASS-546 - Consider user-type dependencies during schema drop.
We now consider user-type dependencies while dropping user-defined types. User types can utilize other user-defined types and dropping a type that is in use causes the drop operation to fail. We're introspecting user types reported by Cassandra and construct a dependency graph that is used to determine the proper drop order.
2018-04-23 11:26:10 +02:00
Mark Paluch
d3126cadd0 DATACASS-549 - Add Criteria.ne(…) and Criteria.isNotNull() operators. 2018-04-19 12:18:00 +02:00
Mark Paluch
367259b898 DATACASS-548 - Upgrade to Cassandra Java Driver 3.5.0. 2018-04-19 11:58:21 +02:00
Mark Paluch
3aad62627f DATACASS-547 - Resolve converter ambiguities.
We now properly annotate read and writing converters to indicate proper conversion directions.
2018-04-19 10:06:31 +02:00
Mark Paluch
1a5ded6b91 DATACASS-524 - After release cleanups. 2018-04-13 15:08:33 +02:00
Mark Paluch
2f72d4f274 DATACASS-524 - Prepare next development iteration. 2018-04-13 15:08:32 +02:00
Mark Paluch
a490f736d5 DATACASS-524 - Release version 2.1 M2 (Lovelace). 2018-04-13 14:30:57 +02:00
Mark Paluch
8cfbd4b167 DATACASS-524 - Prepare 2.1 M2 (Lovelace). 2018-04-13 14:30:01 +02:00
Mark Paluch
9eab52e1a2 DATACASS-524 - Updated changelog. 2018-04-13 14:29:51 +02:00
John Blum
bad5119d9b DATACASS-302 - Polish.
Resolve gh-127.
2018-04-10 23:10:17 -07:00
Mark Paluch
2e20a21843 DATACASS-302 - Support Cassandra time columns.
We now support Cassandra time columns via LocalTime types (JSR-310, Joda and ThreeTenBackport) in domain classes, queries and updates.

@Table
class Schedule {

  @Id String id;

  LocalTime scheduledAt;

}
2018-04-10 23:07:09 -07:00
Oliver Gierke
3285b8020b DATACASS-542 - Adapt to API changes in Spring Data Commons.
Related tickets: DATACMNS-1275.
2018-04-09 14:45:26 +02:00
Ivan Sopov
b90682add2 DATACASS-541 - Remove links to decommissioned Planet Cassandra.
Planet Cassandra was decommissioned on October 31st, 2016.
For more information - https://www.datastax.com/2016/10/take-a-bow-planet-cassandra.

Original pull request: #126.
2018-04-06 14:30:59 +02:00
Mark Paluch
d2f2498ae4 DATACASS-532 - Updated changelog. 2018-04-04 17:12:49 +02:00
Mark Paluch
69d22c50c3 DATACASS-519 - Updated changelog. 2018-04-04 15:16:20 +02:00
Oliver Gierke
f52d3c1728 DATACASS-537 - Removed explicit declaration of Jackson libraries. 2018-03-27 19:27:36 +02:00
John Blum
48077f8b0e DATACASS-523 - Polish. 2018-03-26 15:52:45 -07:00
Mark Paluch
dd718ae234 DATACASS-523 - Documentation. 2018-03-26 15:52:38 -07:00
Mark Paluch
fbfe2bdfbe DATACASS-523 - Extend converter to map TupleValue to domain objects.
We now support mapped tuple values via @Tuple and @Element(1) annotations. Mapped tuple values can be embedded within table entities and user-defined. Mapped tuples can contain user-defined types, collection types and simple property types and are supported with schema generation.

	@Tuple
	class Address {

		@Element(0) String city;

		@Element(1) String street;

		@Element(2) int sortOrder;
	}
2018-03-26 15:52:31 -07:00
Oliver Gierke
e63a5b65fb DATACASS-535 - Polishing. 2018-03-14 10:18:31 +01:00
Oliver Gierke
e3e1fa4f4a DATACASS-535 - Added project.root configuration to make JavaDoc generation work again.
Related ticket: https://github.com/spring-projects/spring-data-build/issues/527.
2018-03-14 10:18:23 +01:00
Mark Paluch
e19be1c77a DATACASS-533 - Export composable repositories via CDI.
We now export composable repositories through our CDI extension. Repositories can now be customized either by a single custom implementation (as it was before) and by providing fragment interfaces along their fragment implementation.

This change aligns CDI support with the existing RepositoryFactory support we provide within a Spring application context.
2018-03-12 16:33:48 +01:00
Mark Paluch
56df77efdf DATACASS-106 - Polishing.
Add AfterConvertEvent, introduce base class for AbstractDeleteEvent. Turn table name in mapping events to non-nullable. Replace guessTableName(…) with getTableName(…) and table name extraction from statements. Pass table name to converter mapper function for event propagation. Refactor tests to base class and test operations accessor.

Introduce lifecycle events and ProjectionFactory to AsyncCassandraTemplate.

Extend JavaDoc, add author and since tags. Reduce copyright year to inception year of new classes. Extend reference documentation.

Original pull request: #123.
2018-03-06 09:35:32 +01:00
Lukasz Antoniak
774d6b2732 DATACASS-106 - Support persistence lifecycle callbacks.
We now support persistence lifecycle callbacks via Spring's ApplicationEvents. Events are fired upon select, insert, update, delete, and truncate statements. The following events are available:

* BeforeSaveEvent: Before inserting/updating a row in the database, via insert(…) and update(…).
* AfterSaveEvent: After inserting/updating a row in the database, via insert(…) and update(…).
* BeforeDeleteEvent: Before deleting row from the database, via delete(…) and truncate(…).
* AfterDeleteEvent: After deleting row from the database, via delete(…) and truncate(…).
* AfterLoadEvent: After retrieving a row from the database, via select(…), slice(…), and stream(…).
* AfterConvertEvent: After converting a row from the database to a POJO, via select(…), slice(…), and stream(…).

Original pull request: #123.
2018-03-06 09:35:23 +01:00
Mark Paluch
7e7bc5121b DATACASS-526 - Updated changelog. 2018-02-28 11:17:33 +01:00
Mark Paluch
44bab73068 DATACASS-485 - Polishing.
Adjust tests to run on Cassandra 2.x.
2018-02-26 15:12:30 +01:00
Mark Paluch
367b66f37e DATACASS-155 - Polishing.
Add author and since tags. Add nullable annotations. Apply timestamp to DELETE statements. Extend tests.

Original pull request: #122.
2018-02-26 14:22:29 +01:00
Lukasz Antoniak
742798f3a3 DATACASS-155 - Support TIMESTAMP in WriteOptions.
We now allow configuration of the write timestamp for INSERT/UPDATE/DELETE statements.

Original pull request: #122.
2018-02-26 14:16:31 +01:00
Mark Paluch
17fa198499 DATACASS-530 - Upgrade to Cassandra Java Driver 3.4.0. 2018-02-22 09:15:38 +01:00
Mark Paluch
0658f64661 DATACASS-528 - Upgrade to Cassandra 3.11.2. 2018-02-22 08:53:28 +01:00
Mark Paluch
3869d939b8 DATACASS-527 - Fix reactive CassandraTemplate example. 2018-02-22 08:17:20 +01:00