From 86cff20f996858a03dc5159bed8b9d9d97ca586f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 4 Oct 2018 13:14:29 +0200 Subject: [PATCH 1/2] New suggested contribution: "Records: Splitting Database Encoding from Ability to Write in the Database" --- CONTRIBUTING.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3b3ddf374..eba0fbbcb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,6 +87,7 @@ The ideas, in alphabetical order: - [JSON] - [Linux] - [More SQL Generation] +- [Records: Splitting Database Encoding from Ability to Write in the Database] - [SQL Console in the Debugger] - [SQLCipher in a Shared App Container] - [Static Library] @@ -321,6 +322,19 @@ There are several SQLite features that GRDB could natively support: - [More ideas](https://www.sqlite.org/lang.html) +### Records: Splitting Database Encoding from Ability to Write in the Database + +:baby: Starter Task :pencil: Documentation + +Record types that know how to encode themselves in the database (converting themselves into columns and database values) currently are granted with [persistence methods] which can write in the database. Those record types all adopt the [PersistableRecord] protocol. + +But encoding a record grants other features, such as [Record Comparison], or [Requesting Associated Records]. + +This is a problem: one should not have to grant a type with persistence methods, when one just needs read-only features. + +The fix is to split database encoding from persistence methods. See [#426](https://github.com/groue/GRDB.swift/issues/426) for more information. + + ### SQL Console in the Debugger :question: Unknown Difficulty :hammer: Tooling @@ -396,6 +410,7 @@ Features that blur this focus are non-goals: [JSON]: #json [Linux]: #linux [More SQL Generation]: #more-sql-generation +[Records: Splitting Database Encoding from Ability to Write in the Database]: #records-splitting-database-encoding-from-ability-to-write-in-the-database [Non-Goals]: #non-goals [Report Bugs]: #report-bugs [RxGRDB]: http://github.com/RxSwiftCommunity/RxGRDB @@ -408,3 +423,7 @@ Features that blur this focus are non-goals: [Suggest an Enhancement]: #suggest-an-enhancement [Suggested Contributions]: #suggested-contributions [Typed Expressions]: #typed-expressions +[persistence methods]: README.md#persistence-methods +[PersistableRecord]: README.md#persistablerecord-protocol +[Record Comparison]: README.md#record-comparison +[Requesting Associated Records]: Documentation/AssociationsBasics.md#requesting-associated-records From 6c7ac25fb8a75396774260b96e3a149d4ba92310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 4 Oct 2018 13:20:51 +0200 Subject: [PATCH 2/2] Remove Carthage from suggested contributions (#408 and #262 have helped a lot) --- CONTRIBUTING.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eba0fbbcb..0b878a9ad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,7 +72,6 @@ Legend: The ideas, in alphabetical order: - [Associations] -- [Carthage] - [CloudKit] - [Concurrency] - [Custom FTS5 Auxiliary Functions] @@ -101,15 +100,6 @@ The ideas, in alphabetical order: Associations can be enhanced in several ways. See the "Known Issues" and "Future Directions" chapter of the [Associations Guide](Documentation/AssociationsBasics.md) -### Carthage - -:question: Unknown Difficulty - -[Carthage](https://github.com/Carthage/Carthage) can build GRDB frameworks, but it can also inexplicably fail. This installation method is thus currently **unsupported**, which means that support has to be found directly in the [Carthage repo](https://github.com/Carthage/Carthage/issues), or on [Stack Overflow](http://stackoverflow.com). See [#262](https://github.com/groue/GRDB.swift/pull/262) for more information. - -I would be a nice improvement if GRDB Carthage builds were made robust. - - ### CloudKit :bowtie: Public API Challenge :question: Unknown Difficulty :fire: Experimental @@ -392,7 +382,6 @@ Features that blur this focus are non-goals: [Ask Questions]: #ask-questions [Associations]: #associations -[Carthage]: #carthage [CloudKit]: #cloudkit [Codable Records]: README.md#codable-records [Custom FTS5 Auxiliary Functions]: #custom-fts5-auxiliary-functions