You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ForkedResource is a basic building block which could be used to construct a full document store. For local storage, it could use SQLite.
Rather than splitting the model out over columns ala SwiftData, I would be inclined to use JSON encoding of the value, and store in a single column, more like a document store than a full ORM.
A macro would be added to control indexing, and any indexed property would also get its own column in the table. There is a little redundancy of data in this approach, but I think it is worth it.
Each type would get a table in the schema, and would also be required to have an identifier. (Not sure it should be tied to Identifiable or some other protocol.)
There would be an extra column to identify the fork that a value belongs to. So a single ForkedResource would map to several rows of the table. When fetching, you would read in all the values for that resource, generate a ForkedResource from that, and work with it in memory.
There would also need to be a column that indicates the role of the row in the fork. Eg. "Most Recent" or "Ancestor".
The text was updated successfully, but these errors were encountered:
ForkedResource is a basic building block which could be used to construct a full document store. For local storage, it could use SQLite.
Rather than splitting the model out over columns ala SwiftData, I would be inclined to use JSON encoding of the value, and store in a single column, more like a document store than a full ORM.
A macro would be added to control indexing, and any indexed property would also get its own column in the table. There is a little redundancy of data in this approach, but I think it is worth it.
Each type would get a table in the schema, and would also be required to have an identifier. (Not sure it should be tied to Identifiable or some other protocol.)
There would be an extra column to identify the fork that a value belongs to. So a single
ForkedResource
would map to several rows of the table. When fetching, you would read in all the values for that resource, generate aForkedResource
from that, and work with it in memory.There would also need to be a column that indicates the role of the row in the fork. Eg. "Most Recent" or "Ancestor".
The text was updated successfully, but these errors were encountered: