Swiftpack.co - elegantchaos/ObjectStore as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by elegantchaos.
elegantchaos/ObjectStore v2.0.1
Simple object store abstraction for Swift.
⭐️ 0
🕓 3 years ago
iOS macOS
.package(url: "https://github.com/elegantchaos/ObjectStore.git", from: "v2.0.1")

ObjectStore

A very simple object store protocol, which works with Swift's Codable protocol.

Provides three basic operations:

  • save some objects
  • load some objects
  • remove some objects

Objects are stored and retrieved using identifiers.

Ideally the identifiers can be anything conforming to the Identifiable protocol, although currently some parts of the API require them to be String.

Objects can be encoded/decoded in any way that the implementation chooses.

An basic implementation is provided which:

  • stores each object as a separate file.
  • uses the identifier of the object to name the file
  • stores a Data object as the content of the file
  • uses a helper ObjectCoder object to encode/decode the objects to/from Data

GitHub

link
Stars: 0
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

2.0.1
3 years ago

Added remove().

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics