Releases: dogmatiq/persistencekit
Releases · dogmatiq/persistencekit
Version 0.10.0
Added
- Added
journal.Interval
type, to represent a half-open range of positions. - Added
journal.RecordNotFoundError
,ValueNotFoundError
andConflictError
.
Changed
- [BC]
journal.Journal.Bounds()
now returns anInterval
instead of a twoPosition
values. - [BC]
journal.Search()
,RangeFromSearchResult()
,Scan()
andScanFromSearchResult()
now accept anInterval
parameter instead of twoPosition
values.
Removed
- [BC] Removed
journal.ErrConflict
andErrNotFound
. UseIsConflict()
andIsNotFound()
to test for specific errors instead.
Version 0.9.3
Added
- Added
journal.AppendWithConflictResolution()
. - Added
journal.IgnoreNotFound()
.
Version 0.9.2
Added
- Added
journal.RangeFromSearchResult()
Version 0.9.1
Added
- Added property-based tests for journal and key/value store implementations using
rapid
. These new tests uncovered the bugs described below.
Fixed
- Fixed issue with
memoryjournal
Range()
implementation that would pass the wrong position to theRangeFunc
after the journal was truncated. - Fixed issue with
dynamojournal
Bounds()
implementation that could potentially report the wrong lower bound after truncating (as of 0.9.0).
Changed
dynamojournal
now cleans up (hard-deletes) records that have been marked as truncated when scanning for lower bounds.
Version 0.9.0
Added
- Added
dynamojournal.NewBinaryStore()
anddynamokv.NewBinaryStore()
. - Added
Option
type andWithRequestHook()
option todynamojournal
anddynamokv
. The request hook is a more flexible replacement for the request-type-specific decorator fields that were on theBinaryStore
structs, which were removed in this release.
Removed
- [BC] Removed
dynamojournal.BinaryStore
anddynamokv.BinaryStore
use each package'sNewBinaryStore()
function instead. - [BC] Removed
dynamojournal.CreateTable()
anddynamokv.CreateTable()
. The table creation is now managed at runtime by the journal and keyspace stores.
Fixed
- The
pgjournal
anddynamojournal
implementations can now correctly truncate all journal records. Previously they would only allow truncation up to but not including the most recent record.
Version 0.8.0
This release changes the journal.Store
and journal.Journal
interfaces to be generic types, parameterized over records of type T
, and the kv.Store
and kv.Keyspace
to be parameterized over types K
and V
, thereby making the typedjournal
and typedkv
packages obsolete.
This eliminates the need for duplicating all of the generic algorithms (such as Search()
, LastRecord()
, etc) for both binary and typed implementations.
Added
- Added
journal.BinaryStore
,BinaryJournal
andBinaryRangeFunc
aliases, equivalent to prior (non-generic) definitions ofStore
,Journal
andRangeFunc
, respectively. - Added
kv.BinaryStore
,BinaryKeyspace
andBinaryRangeFunc
aliases, equivalent to prior (non-generic) definitions ofStore
,Keyspace
andRangeFunc
, respectively. - Added
marshaler.ProtocolBuffers
marshaler. - Added
marshaler.Bool
marshaler. - Added
journal.NewMarshalingStore()
andkv.NewMarshalingStore()
, which wrap binary implementations with amarshaler.Marshaler
, serving as a replacement for thetypedjournal
andtypedkv
packages, respectively. - Added
journal.Scan()
andScanFromSearchResult()
Changed
- [BC] Changed
journal
andkv
interfaces to be generic. - [BC] Moved
typedmarshaler
package tomarshaler
at the root of the module.
Removed
- [BC] Removed
typedjournal
,typedkv
andtypedmarshaler
packages.
Version 0.7.0
Changed
- [BC] The
pgjournal
implementation now supports the full range of unsignedjournal.Position
values. Theuint64
value-space is "mapped" onto theint64
space such thatuint64(0) == math.MinInt64
, thereby preserving order. Thejournal.position
column has been renamed toencoded_position
to make it clearer that the value can not be used as-is.
Fixed
- Calling
Range()
on an empty journal now correctly returnsjournal.ErrNotFound
. This issue affected all journal implementations.
Removed
- [BC] Removed
journal.MaxPosition
. All implementations now support the full unsigned 64-bit range ofjournal.Position
values. Technically, thememoryjournal
implementation is limited tomath.MaxInt
non-truncated records at any given time, but this is not practical anyway.
Version 0.6.0
Added
- Added
journal.RunBenchmarks()
andkv.RunBenchmarks()
to run generic benchmarks for a journal or key-value store implementation.
Changed
- [BC] The PostgreSQL drivers
pgjournal
andpgkv
now assign each journal and keyspace a sequential ID to avoid repeating the journal/keyspace name in every row.
Removed
- [BC] Removed
pgjournal.CreateSchema()
andpgkv.CreateSchema()
. The schema creation is now managed at runtime by the journal and keyspace stores. This change is in preparation for the stores also managing other schema changes, such as table partitioning.
Fixed
- PostgreSQL schema creation is now performed within a transaction.
Version 0.5.0
Added
- Added
typedjournal.IsEmpty()
, which returnstrue
if a journal currently has no records. - Added
typedjournal.IsFresh()
, which returnstrue
if a journal has never been written to. - Added
typedjournal.FirstRecord()
andLastRecord()
. - Added
typedmarshaler.Zero()
Changed
- [BC] Changed
typedjournal.Journal
to use pointer receivers - [BC] Changed
typedkv.Keyspace
to use pointer receivers
Version 0.4.0
Changed
- [BC] Moved
typedjournal
andtypedkv
packages intoadaptor
directory.
Added
- Added
typedmarshaler
package. - Added
journal.IsEmpty()
, which returnstrue
if a journal currently has no records. - Added
journal.IsFresh()
, which returnstrue
if a journal has never been written to. - Added
journal.FirstRecord()
andLastRecord()
.
Removed
- [BC] Removed
typedjournal.Marshaler
andtypedkv.Marshaler
. Usetypedmarshaler.Marshaler
instead.