Skip to content

Releases: Sandthorn/sandthorn

snapshot support

14 Jun 19:56
Compare
Choose a tag to compare

An initial release that supports memory stored snapshots, next step is to create external snapshot stores that makes snapshots lasts between restart of the main application.

replace the property attribute_deltas array with hash in events

25 May 11:09
Compare
Choose a tag to compare

The new event structure

:aggregate_type => "SandthornProduct",
:aggregate_version => 1,
:aggregate_id => "da932773-dd06-43dc-8c0c-61837f009226",
:sequence_number => 1,
:event_name => "new",
:timestamp => "2014-04-08 12:22:09 UTC",
:event_data => {
  :name => {
    :old_value => "the old value",
    :new_value => "the new value"
  },
  :price => {
    :old_value => "the old value",
    :new_value => "the new value"
  }
}

where the change is in the :event_data. The old structure looked like this and are no longer valid

:event_data => {
  :attribute_deltas => [
    {
      :attribute_name => "name",
      :old_value => null,
      :new_value => "Morgan"},
    {
      :attribute_name => "price",
      :old_value => null,
      :new_value => "Morgan"
    }
  ]
}

The reason for the change is that its now easier to access the properties in the event_data via a key. Before the attribute_deltas had to be iterated one by one to find the property of interest.

1.0.0

31 May 14:54
Compare
Choose a tag to compare

Lot of cleaning has been made to remove internal interfaces that were SQL specific. It should now be more straight forward to implement new drivers to support different storage models.

stateless_events and contructor_events

13 Apr 16:50
Compare
Choose a tag to compare

use .all and .find interface from driver

29 Mar 08:07
Compare
Choose a tag to compare

Start using the .find and .all interface. This version of Sandthorn is dependent on version >= 3.1of sandthorn_driver_sequel.

Serialization moved to driver

11 Feb 19:24
Compare
Choose a tag to compare

The serialization mechanism are since Sandthorn version 0.11.0 moved to the drivers and the only driver that´s supported is version 3.0.0 of the SandthornDriverSequel. To use a previous version of Sandthorn you need to specify version 2.x of the SandthornDriverSequel.

::default_attributes

03 Feb 10:01
Compare
Choose a tag to compare

Its possible to add a default_attributes method on an aggregate and set default values to new and already created aggregates.

The default_attributes method will be run before initialize on Class.new and before the events when an aggregate is rebuilt. This will make is possible to add default attributes to an aggregate during its hole life cycle.

events method in AggregateRoot

26 Jan 08:17
Compare
Choose a tag to compare

Sandthorn::AggregateRoot::events

An abstraction over commit that creates events method that can be used to create private event methods.

Create event even if no attribute change in aggregate

19 Oct 19:07
Compare
Choose a tag to compare

Previously no event was created if no attribute changed in a aggregate, now an event is always created on a .commit This make it possible to generate event that is not state related.

Bounded Context

29 Sep 07:46
Compare
Choose a tag to compare

The DDD concept Bounded Context are introduced.

It´s possible to map aggregate types to a driver on Sandthorn.configure.