Skip to content

Releases: konveyor/controller

v0.12.0

05 Jun 13:31
7390492
Compare
Choose a tag to compare

What's Changed

  • Update libraries to more recent versions by @awels in #115

New Contributors

Full Changelog: v0.11.0...v0.12.0

Add model DB.With() syntax.

18 Feb 17:56
b2cf9ac
Compare
Choose a tag to compare

Add DB.With() transaction syntax patterned after the Python with (context) statement.

err := DB.With(func(tx *Tx) (err error) {
  err  = tx.Insert(&person)
  return
})

This simplified syntax ensures that the transaction is always committed/ended.
The user only needs to implement the function performing the DB operations.

Add (optional) model update predicates.

18 Jan 18:51
dc90720
Compare
Choose a tag to compare

Add (optional) model update predicates.
Example will update the model by PK and revision=44:
db.Update(&m, model.Eq("revision",44)

Enhanced Eq() predicate.

07 Oct 21:01
49ec66c
Compare
Choose a tag to compare

Add support for list values for Eq() predicate.
Example:

err = DB.List(
  &list,
  ListOptions{
    Predicate: Eq("ID", []int{2, 4}),
  })

Adjusted detail level.

16 Sep 18:54
858e8b9
Compare
Choose a tag to compare

Correct default model.DetailLevel to 0.

Better support for cascade delete.

15 Sep 22:13
2858232
Compare
Choose a tag to compare

Better support cascade delete based on foreign keys.
This needs to be done by the model layer instead of in the DB using ON CASCADE DELETE foreign key constraints to support event generation. Enhanced FK tag: fk(table, +must +cascade) makes enforcement (with constraint) and cascade delete optional.


Upgrade to gin 1.7.2 for CVE-2020-28483

Minor model enhancements.

19 Aug 18:03
92c2ce5
Compare
Choose a tag to compare

Minor model enhancements.

  • Add support for transaction labels to be passed though to model Event. Primarily used to identify and ignore echo events generated when an EventHandler updates the DB.
  • Adjust logging level of Client insert, update and delete operations to: 3.

Improved API

23 Jul 21:44
694e33e
Compare
Choose a tag to compare

Improved API.
Renamed Reconciler to: Collector in the container package. The name reconciler was more appropriate but overloaded with OpenShift controllers.

Renamed: DB.Iter() to be a verb: DB.Find().

Enhanced the model layer to no longer require the sql:"" tag on all model fields. All exported fields are included unless omitted using sql:"-" much like the json lib. The tag is only required to modify default behavior.

Fixed an issue with Updated events having the Event.Model and Event.Updated fields reversed. The regression introduced in 0.5.0.

Includes some logging (level) adjustments.

sqlite3 journal-mode=WAL

20 Jul 13:44
21ef6ef
Compare
Choose a tag to compare

Improved model concurrency by using the sqlite3 WAL (write-ahead logging) journal.
The WAL journal supports concurrent read/write among separate DB connections. As a result, the MUTEX used by the model.Client is no longer needed. Instead, the Client sets the WAL pragma and maintains a pool of DB Session which encapsulates a actual DB connection and provides DB connection reservation.

The model.Journal no longer maintains the list of staged events. Its interface has slimmed down accordingly.
Instead, each transaction (Tx) contains the list of staged events which are reported (to the journal) in Tx.Commit().

Reduced memory footprint in container.Collection.

29 Jun 20:44
ae09132
Compare
Choose a tag to compare

Add support for direct access in filebacked List and Iterator. Adds At() and AtWith().
Greatly reduced memory footprint in container.Collection.
Fixes error in Client.List() logging.