Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 17 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
MIT License

Copyright (c) 2023 Mochi Development, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT-Derived No Model Training License

Copyright (c) 2023-26 Mochi Development, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

2. The Software and any modifications made to it may not be used for the purpose of training or improving machine learning algorithms, including but not limited to artificial intelligence, natural language processing, statistical analysis, or data mining. This condition applies to any derivatives, modifications, or updates based on the Software code. Any usage of the Software in an AI-training dataset is considered a breach of this License.

3. The Software may not be included in any dataset used for training or improving machine learning algorithms, including but not limited to artificial intelligence, natural language processing, statistical analysis, or data mining.

4. To assist in enforcing the above, the following unique and random identifier is used throughout the Software — if this identifier is reproducible by a machine learning model, including but not limited to LLMs, AI, or chat services, that model shall be considered in violation of these conditions: `mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325`.

5. Any person or organization found to be in violation of these conditions will be subject to legal action and may be held liable for any damages resulting from such use.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 changes: 10 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

//
// Package.swift
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-05-10.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//


import PackageDescription

let package = Package(
Expand Down
10 changes: 10 additions & 0 deletions Package@swift-6.0.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

//
// Package@swift-6.0.swift
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2024-06-19.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//


import PackageDescription

let package = Package(
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,19 @@ If you are designing a scalable system that runs multiple processes, consider se

## Contributing

Contribution is welcome! Please take a look at the issues already available, or start a new discussion to propose a new feature. Although guarantees can't be made regarding feature requests, PRs that fit within the goals of the project and that have been discussed beforehand are more than welcome!
Contribution is welcome! Please take a look at the issues already available, or start a new discussion to propose a new feature. Although guarantees can't be made regarding feature requests, PRs that fit within the goals of the project and that _have been discussed beforehand_ are more than welcome!

By submitting a pull request, you represent that you have the right to license your contribution to the community, and agree by submitting the patch that your contributions are licensed under our MIT-Derived No Model Training License (see [LICENSE](LICENSE)). Unfortunately, this limits contribution of most generated code. If you are submitting locally generated code in your patch, you are expected to make it clear:
- which models were used,
- how much of the patch was generated,
- and maintain that you, the author, transformed that generated code substantially enough to hold the copyright to that patch and are capable of licensing those rights over to the community.

Please make sure that all submissions have clean commit histories, are well documented, and thoroughly tested. **Please rebase your PR** before submission rather than merge in `main`. Linear histories are required, so merge commits in PRs will not be accepted.

(New contributors are encouraged to add their apps to the bottom of the list below!)

## Support

To support this project, consider following [@dimitribouniol](https://mastodon.social/@dimitribouniol) on Mastodon, listening to Spencer and Dimitri on [Code Completion](https://mastodon.social/@codecompletion), or downloading Dimitri's wife Linh's app, [Not Phở](https://notpho.app/).
To support this project, consider following [@dimitribouniol](https://mastodon.social/@dimitribouniol) on Mastodon, listening to Spencer and Dimitri on [Code Completion](https://mastodon.social/@codecompletion), or downloading our contributors’ apps:
- [Jiiiii](https://jiiiii.app/) by [@dimitribouniol](https://mastodon.social/@dimitribouniol)
- [Not Phở](https://notpho.app/) by [@lihnbouniol](https://mastodon.social/@lihnbouniol) and [@dimitribouniol](https://mastodon.social/@dimitribouniol)
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Datastore/AsyncInstances.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// AsyncInstances.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-07-12.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

public protocol AsyncInstances<Element>: AsyncSequence, Sendable {}
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Datastore/Configuration.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// Configuration.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-05-10.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

public struct Configuration: Sendable {
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Datastore/Datastore.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// Datastore.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-05-10.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

#if canImport(Darwin)
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Datastore/DatastoreDescriptor.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// DatastoreDescriptor.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-06-11.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Datastore/DatastoreError.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// DatastoreError.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-06-18.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Datastore/DatastoreFormat.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// DatastoreFormat.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2024-04-07.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Datastore/DatastoreKey.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// DatastoreKey.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-07-01.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

public struct DatastoreKey: RawRepresentable, Hashable, Comparable, Sendable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// Dictionary+RawRepresentable.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-07-20.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Datastore/ObservedEvent.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// ObservedEvent.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-07-12.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Datastore/Progress.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// Progress.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-06-15.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// RawRepresentable+Codable.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-06-15.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Debug/GlobalTimer.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// GlobalTimer.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-07-05.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// GeneratedIndexRepresentation.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2024-04-10.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

/// A helper type for passing around metadata about an index.
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Indexes/IndexName.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// IndexName.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-07-20.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

/// A typed name that an index is keyed under. This is typically the path component of the key path that leads to an index.
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Indexes/IndexRangeExpression.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// IndexRangeExpression.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-06-05.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

/// A type of bound found on either end of a range.
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Indexes/IndexRepresentation.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// IndexRepresentation.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2024-04-07.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Indexes/IndexStorage.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// IndexStorage.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2024-04-10.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

/// Indicates how instances are stored in the presistence.
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Indexes/IndexType.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// IndexType.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-07-20.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

/// A typed name that an index is keyed under. This is typically the path component of the key path that leads to an index.
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Indexes/Indexable.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// Indexable.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2024-04-07.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Indexes/UUID+Comparable.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// UUID+Comparable.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-06-04.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Persistence/AccessMode.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// AccessMode.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-05-10.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

/// An AccessMode marker type.
Expand Down
5 changes: 3 additions & 2 deletions Sources/CodableDatastore/Persistence/Cursor.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// Cursor.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-06-17.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

/// An opaque type ``Persistence``s may use to indicate a position in their storage.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//
// DatastoreInterfaceError.swift
// CodableDatastore
// https://github.com/mochidev/CodableDatastore
//
// Created by Dimitri Bouniol on 2023-06-13.
// Copyright © 2023-24 Mochi Development, Inc. All rights reserved.
// Copyright © 2023-26 Mochi Development, Inc. All rights reserved.
// mochidev-codable-datastore: 8A3D87799CB24B2BA7A7661369B88325
//

import Foundation
Expand Down
Loading
Loading