Skip to content

Releases: andy9775/dataloader

v1.0.0

18 Feb 01:38
Compare
Choose a tag to compare

Address issue 1 and allow differentiation between nil results and unprocessed keys.

Fix is not backwards compatable as the ResultMap interface changes

v0.5.1

09 Sep 02:28
v0.5.1
Compare
Choose a tag to compare

v0.5.1 includes:

  • configure logic to cancel worker go routine when context calls cancel

v0.5.0

04 Sep 03:45
v0.5.0
Compare
Choose a tag to compare

v0.5.0 includes:

  • Fix default timeout for strategies - from 6 milliseconds to 16
  • null check in key before tracing
    • fixes tracing bug
  • implement logging
    • Logging is done in a shared interface and occurs when strategies timeout and
      new workers are created.
  • fix log message string formating

v0.4.0

11 Aug 03:30
v0.4.0
Compare
Choose a tag to compare

v0.4.0 includes:

  • Tracing implementation
    • Create a Trace interface and implement a NoOp and OpenTracing tracer
  • Configure options to be passed through as variadic functions instead of a
    struct. This also sets sane and sensible default for each option.

v0.3.0

08 Aug 01:12
Compare
Choose a tag to compare

v0.3.0 includes:

  • NewResultMap constructor accepts a int capacity rather than keys array
  • Minimize Keys interface
    • remove Identifiers and UniqueIdentifiers methods
    • Keys method now returns a []interface{} after calling the Raw method of
      each key
  • Check raw value of Key before adding to key store
  • Add LoadNoOp to Strategy interface and implement for all strategies.
    LoadNoOp is called when the dataloader returns the requested result from the
    cache. LoadNoOp should increment the loads counter and not return anything.
  • Update Cache interface to include Delete and ClearAll which return a
    boolean. Cache interface should also thread context through the methods.
  • Remove unused struct fields
  • Remove mutex from key store. Keys are added to the key store in a single
    worker go routine therefore concurrent access under normal use is not
    possible.
  • Remove mutex from Counter. Counter will no longer be updated from multiple
    go routines.
  • Remove mutex from ResultMap as it will no longer be accessed in multiple go
    routines.
  • Remove MergeWith method from ResultMap as it a basic wrapper around a for
    loop.
  • Update strategy and dataloader to return callback functions (Thunk and
    ThunkMany). Returning callback functions allow Load/LoadMany to be called
    without blocking but still trigger a worker go routine which can trigger the
    batch function if capacity is hit. Results can then be fetched from after
    calling the returned callbacks.
  • Implement Once strategy whose purpose is to wrap around calls to the batch
    function or to trigger a background worker to call the batch function. This
    allows for a consistent api throughout projects using the dataloader if a single
    use dataloader is useful.
  • Fix race conditions in strategies.
  • add tests.

v0.2.0

28 Jul 00:46
Compare
Choose a tag to compare
  • Don't track missing results in the strategy its self, this should be tracked by a cache strategy
  • Result is no longer an alias (interface) for any query result type. Result is now a struct which contains the query result and an error

v0.1.2

25 Jul 01:24
Compare
Choose a tag to compare
  • Fix error when passing in nil keys to Keys store. Allow nil keys to be passed but don't track them
  • Fix error when fetching value using a nil key. Allow a nil key to be passed, but return nil by default

v0.1.1

24 Jul 23:35
Compare
Choose a tag to compare

Add ability for Keys store to return a unique array of identifiers by filtering out duplicate keys.

v0.1.0

21 Jul 04:32
Compare
Choose a tag to compare

The overall structure of the project should not change from this point forth.

There may be some minor changes to the API, most likely to the caching mechanism.