Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite internal storage #79

Open
avaidyam opened this issue Jul 18, 2017 · 0 comments
Open

SQLite internal storage #79

avaidyam opened this issue Jul 18, 2017 · 0 comments
Assignees
Milestone

Comments

@avaidyam
Copy link
Owner

avaidyam commented Jul 18, 2017

Just a lot of ideas I have to clarify later:

CRUD x Parrot entity type (Message.conversation? CR, no UD)

extension Numeric: TimeIntervalConvertible {}

NULL, INT, REAL, TEXT, BLOB

public protocol NaturalType: Hashable {
	var _dbType: SQLiteType
}
public protocol NaturalTypeConvertible {}
public protocol ModelType: Codable, Hashable {}
	- all properties of ModelType must be NaturalType or *Convertible or ModelType
	- orrr Set(^) or Array(^) or Dictionary(NaturalType: ^)

S/U Int 16/32/64
Float 32/64/80
Bool
String
--
Decimal
Date
Data
UUID
URL
--
Transformable
Undefined (transient?)


Transformable --> is actually Codable
native types + Codable + Set?, Array, Dict
use CodingKeys?

struct MyObject {
    var myKey: [String]
    var others: [MyOtherObject]
}


MyObject_myKey(MyObject_rowid*, index, value: String)
MyObject_ others(MyObject_rowid*, index, value: MyOtherObject_rowid*)


need a context, class's entity description + object identifier (NaturalType)
persisted() or alive()?
awakeFromInsert/SnapshotEvent?
changedValues/forCurrentEvent
willSave/didSave

snapshotevent: insert, undoInsert, undoDelete, undoUpdate, rollback, refresh, mergePolicy

Create: init(...)
Update: save()
Read: fetch(...)
Delete: delete()

undo/redo/reset/rollback

--

search by string
	- separate data set matching model
filter by keypath
sort by keypath
@avaidyam avaidyam modified the milestone: 1.0 Jul 21, 2017
@avaidyam avaidyam self-assigned this Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant