Skip to content

Releases: liuliu/dflat

v0.6.0

25 Jan 18:02
Compare
Choose a tag to compare
  • Add XXXBuilder to help modify class-bound object (no need for struct-bound object), you can write let xx = XXBuilder(x); xx.key = value; xx.build() like you would in Obj-C. It is not Swifty, but useful to avoid some class of errors.
  • Relax condition on workspace.dictionary so as long as workspace is mutable, you can now write workspace.dictionary["somekey"] = somevalue, this feels more ergonomic.
  • Update flatbuffers dependency to latest.
  • Add support to move to "ROLLBACK" again, and potentially vacuum. This helps if you want to use the result SQLite file as a single-file and move it around.
  • Support observation for dictionary, so you can workspace.dictionary.subscribe("key") { update in ... }. There could still be some ergonomic improvements, but this helps your code to be more streamlined (i.e. having UI update all derived from observation).

v0.5.0

10 Jun 19:26
Compare
Choose a tag to compare
  • Updated for Swift 5.6
  • Updated to latest flatbuffers (google/flatbuffers@11a1988)
  • Updated to newer apollo-ios (apollographql/apollo-ios@51c81bd)
  • Updated SQLite (for non-Apple platforms) to 3.38.5
  • Added light-weight in-tree documentation through Swift DocC: https://liuliu.github.io/dflat
  • Added func shutdown() async, which effectively the same as func shutdown() just doesn't blocking the thread (simply yielding to the async runtime), i.e. more async friendly.
  • Fixed the return AsyncStream from subscribe method doesn't respect bufferingPolicy passed in.

v0.4.2

09 Nov 18:29
Compare
Choose a tag to compare
  • Fixed another bug in WorkspaceDictionary that keys will show keys haven't finished deleting from underlying storage yet.
  • removeAll in WorkspaceDictionary doesn't block on disk any more.
  • Added AsyncSequence support for observing individual objects or FetchedResult.
  • Fixed Linux compilation issues with Swift 5.5 (SwiftGlibc module cannot be found).

v0.4.1

25 Oct 17:53
Compare
Choose a tag to compare
  • Fixed a bug in WorkspaceDictionary.keys that will show deleted keys
  • Added WorkspaceDictionary.removeAll(). This should be faster than iterating through keys and remove each of them.
  • Added await interface for Workspace.performChanges
  • Support specify type when accessing WorkspaceDictionary, for example: dictionary["someKey", Int.self]
  • Updated with benchmarks for WorkspaceDictionary

v0.4.0

06 Oct 18:09
Compare
Choose a tag to compare

New Features

  • Added WorkspaceDictionary which you can access from Workspace.dictionary, an easy way to persist some data through key-value pairs.
  • Added dflat_graphql Bazel rule that takes GraphQL schemas and generate FlatBuffers schema that can be persisted with Dflat, this is only compatible with Apollo GraphQL's Swift code.
  • Added ./dflatc.py graphql to achieve above without using Bazel rule.
  • Added new OrderBy primitive: , orderBy: [someArray.firstIndex(of: Object.property)], this is more useful when you do xxx.in(someArray) to enforce ordering for the returned result array.
  • Allow FlatBuffers schemas without root_type. These will generate struct conforms to FlatBuffersCodable, which can be persisted with WorkspaceDictionary using FlatBuffers rather than Swift Codable protocol (binary plist).
  • Allow using from(data: Data) -> Self and toData() -> Data to encode objects into Data objects directly. This enables not only persist data with Dflat, but passing Dflat objects over the wire.
  • Support explicit version string in FlatBuffers schema. This takes the form table objectName (v: "a_version_string") {}. This allows incompatible changes in FlatBuffers schema by having new tables with the version string encoded.

Updates

  • Updated to FlatBuffers 2.0.1.
  • Updated to Swift Atomics 1.0.1
  • Updated to SQLite 3.36.0 (for Linux)

Bug Fixes

  • Fixed a strict serializable issue because we didn't coordinate concurrent queue properly: 97392ed
  • Fixed unbalanced semaphore usage when exiting (@siyuyue): a5873b3
  • Fixed upsert not updating object: 033150d
  • Fixed in query crashes with exact-1 element array: 96dc2f6

CI

  • Moved to GitHub Action, with 4 variants: macos-spm, macos-bazel, ubuntu-spm, ubuntu-bazel
  • Fixed a flaky test with Combine: 9f5491f

v0.3.1

31 Oct 23:19
Compare
Choose a tag to compare
  • Fix the identifier for subscription can be a reused / boxed object under Linux.

v0.3.0

31 Oct 17:03
Compare
Choose a tag to compare