{"repo":"mochidev/CodableDatastore","free":true,"listed":false,"github":"https://github.com/mochidev/CodableDatastore","clone":"git clone https://github.com/mochidev/CodableDatastore.git","description":"An ACID-compliant database written in pure-swift enabling on-disk persistence for apps and services.","language":"Swift","stars":24,"topics":["database","ios","linux","macos","swift","swift-async","swift-package-manager","swift-server","tvos","visionos"],"license":null,"category":"databases-storage","readme_excerpt":"CodableDatastore A pure-Swift implementation of a database-like persistent store for use in apps and other single-write-multiple-read environments. Quick Links - Documentation - Updates on Mastodon Installation Add CodableDatastore as a dependency in your Package.swift file to start using it. Then, add import CodableDatastore to any file you wish to use the library in. Please check the releases for recommended versions. Usage There are three basic steps to use CodableDatastore : - First, declare a format for your datastore by conforming a struct to DatastoreFormat . - Then, instanciate the persistence on disk where it will be stored. - Finally, read and write to it as necessary. Declaring a Format First, you must decide on the shape of your model. Each datastore can contain exactly one type, though a persistence can coordinate access across different types. Since CodableDatastore was designed with value types in mind, avoid using classes for your model objects. You'll also need a corresponding format for your datastore, that describes how your type is identified, versioning information, and any indexes you'd like to be automatically created on your behalf. CodableDatastore encourages a pattern where the format you declare becomes the primary namespace for your type and its related meta types: Instanciating Your Persistence Next, setup an actor or other manager to \"own\" your persistence and datastores in a way that makes sense for your app. Note that persistences and datastore","default_branch":null,"files":null,"tree":[],"storefront":"/r/mochidev","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mochidev/CodableDatastore/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}