Commit graph

419 commits

Author SHA1 Message Date
Greg Burd
26f41dab75 Add notion of statement cache to UnitOfWork. Ignore call to useKeyspace when session isn't valid. 2018-01-17 12:38:33 -05:00
Greg Burd
1da822ce57 Fix build. Change scripts to use /usr/bin/env so that they work on NiXOS. Revert abort() logic. 2018-01-16 13:10:12 -05:00
Greg Burd
1ef50ae179 Allow an init path that doesn't require a non-null Cassandra/DataStax session/cluster context. 2018-01-16 11:59:51 -05:00
Greg Burd
26c67e391a Review related fixes. 2018-01-15 11:28:04 -05:00
Greg Burd
3554b7ecb5 Add isDone() method on UnitOfWork. 2018-01-14 12:51:49 -05:00
Greg Burd
7b4e46431f Update DataStax driver version. 2017-12-14 10:19:38 -05:00
Greg Burd
60b040e7a9 Always start the timer. 2017-12-11 16:04:28 -05:00
Greg Burd
7a470bd5d7 Formatting. 2017-11-15 22:39:50 -05:00
Greg Burd
0827291253 Spoil futures not completed before an abort/commit of the UOW they belong too. Track read set for Entity/Drafted model objects. 2017-11-15 13:56:03 -05:00
Greg Burd
50f656bc8a Fix commit.andThen() logic. 2017-11-15 09:16:15 -05:00
Greg Burd
9df97b3e44 WIP: commit.exceptionally() is working but somehow in the process I broke commit.andThen(). 2017-11-14 22:37:37 -05:00
Greg Burd
33b4b35912 Formatting. 2017-11-14 15:42:16 -05:00
Greg Burd
1eccb631f3 Fix logic that was failing to cache results on cache miss. 2017-11-14 15:26:16 -05:00
Greg Burd
e932d0dcf2 Check to ensure value not null. 2017-11-14 10:06:13 -05:00
Greg Burd
618a7ea380 Draft instances map is mutable and so are collection values inside the map, this makes the UPDATE logic straight forward when mutating in-cache draft objects. Also, fix one or two logic bugs with isAssignableFrom(). 2017-11-14 09:55:03 -05:00
Greg Burd
7a56059036 Fix misuse of Drafted interface in tests. WIP fixing use of immutable collections in UPDATE/draft logic. 2017-11-13 15:55:24 -05:00
Greg Burd
33d2459538 Sometimes there are no filters. 2017-11-13 11:01:30 -05:00
Greg Burd
a63a1be4b6 Paranoia. 2017-11-13 10:47:48 -05:00
Greg Burd
d30361538c Operations now default to non-idempotent unless explictly set in the statement or if they contain fields that are idempotent (e.g. @Column(idempotent=true) or part of the primary key for the row). 2017-11-13 10:36:16 -05:00
Greg Burd
a993af6c29 Enable toggle for showing values in logged CQL statements. Default to true. 2017-11-12 22:32:58 -05:00
Greg Burd
39a8643103 Fix a few things. 2017-11-12 21:37:59 -05:00
Greg Burd
c025dc35a7 Formatting. 2017-11-12 20:14:31 -05:00
Greg Burd
d19a9c741d Fixing a few corners of caching when using drafted entity objects. Working out kinks in merge logic for entity instances in UOWs. 2017-11-10 22:48:40 -05:00
Greg Burd
6ff188f241 Move statement logging into Operation, cover special case for batches. Cleanup UOW commit logging a bit. 2017-11-09 15:03:30 -05:00
Greg Burd
2f0801d36f Fix test to see if select is of Fun<?> type. 2017-11-09 13:32:16 -05:00
Greg Burd
b4dca9c710 finish up batch feature for now 2017-11-08 21:11:58 -05:00
Greg Burd
41e5d8c1e5 wip: working on batch update times. 2017-11-08 15:40:56 -05:00
Greg Burd
5570a97dff Improved support for batched statements. 2017-11-08 13:50:39 -05:00
Greg Burd
a198989a76 Cleanup. 2017-11-07 23:01:43 -05:00
Greg Burd
eb22e3c72e Added batch() to perform mutations as a batch at the commit of a unit of work. Lots of fixes. 2017-11-07 21:23:33 -05:00
Greg Burd
a79e7dacf1 Cache data from MaterializedViews under their parent name. Add some relationship constraints that can decorate getters in model classes and be used in some cases to better cache data. 2017-11-06 13:49:34 -05:00
Greg Burd
fe47531984 Formatting. 2017-11-03 13:32:57 -04:00
Greg Burd
a600c0bd23 Correct logic error. 2017-11-03 11:41:09 -04:00
Greg Burd
b777e9c051 Remove redundant dependency. 2017-11-03 10:42:46 -04:00
Greg Burd
0b86d33725 Change ALLOW FILTERING logic and session cache merge a bit. 2017-11-03 08:49:31 -04:00
Greg Burd
690cd1e064 Formatting. 2017-11-02 16:32:09 -04:00
Greg Burd
ef4f9054ac Formatting. 2017-11-02 16:23:45 -04:00
Greg Burd
465c7d6f2a Don't reset is first index every iteration 2017-11-02 16:12:46 -04:00
Greg Burd
864c4af5af We only transition to allow filtering and only if we've not already set it. 2017-11-02 16:09:47 -04:00
Greg Burd
d1fe54b0ce Add ALLOW FILTERING in the cases Cassandra requires it based on query. More result info formatting. 2017-11-02 15:46:49 -04:00
Greg Burd
962145bf46 Formatting. 2017-11-02 15:08:58 -04:00
Greg Burd
e4cda1a268 Re-enable (for now) the addition of ALLOW FILTERING to SELECT statements that include a filter column indexed by a non-standard index type (e.g. SASI, Lucene, etc.) as that's required and mysterious to end users. 2017-11-02 15:05:43 -04:00
Greg Burd
377191f12a No longer add allowFiltering based on entity properties, force user to add as required. Add information about Cassandra execution to the UOW log line when DEBUG. Throw errors when execution doesn't complete properly. 2017-11-02 14:46:55 -04:00
Greg Burd
792d2b6598 Find proper stack frame to use for purpose. 2017-11-02 10:42:15 -04:00
Greg Burd
2ee300e420 Formatting. 2017-11-01 16:19:07 -04:00
Greg Burd
13eaa7e7ea Change how we find the frame to use for the UOW's purpose. 2017-11-01 16:17:00 -04:00
Greg Burd
5905663c58 Cached values were being updated to their database-specific values (Enum -> String) rather than their intended values. 2017-11-01 14:24:03 -04:00
Greg Burd
857eadff45 Avoid complications with merges in the session cache, evict and then update. 2017-11-01 11:09:14 -04:00
Greg Burd
e1884cf52d Remove the 'final' from HelenusSession. 2017-11-01 09:57:58 -04:00
Greg Burd
09a7fbc405 Address some issues identified by FindBugs. 2017-10-31 21:10:15 -04:00