-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: Add set & get deviceInfo & datatype #250
Conversation
yeah I think (1) is easier to work with. if we don't need querying then the JSON sounds good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
methods implementations look good. can re-review once the sqlite changes are finalized
Ok changes made, it's ready to review again. |
Non-mapeo doc tables mustn't have the same name as mapeo doc tables
* main: chore: condense setup code in MemberAPI tests (#267) chore: replace queries opt in MemberAPI with dataType (#266) feat: add getMany method to member api (#263) feat: add getById method to member api (#262) chore: Update @digidem/types and remove patch (#269) feat: share all core keys via extension messages (#264) feat: send core "haves" bitfield on first connect (#254) fix: invite.encryptionKeys should be required (#260) feat: Add set & get deviceInfo & datatype (#250) expose member namespace in MapeoProject (#253) blobStore.createReadStream should not wait (#243) update MapeoManager to return and handle project public IDs (#247) return content hash from blobApi.create (#242)
This fixes initial implementation #249. It adds an internal datatype for
deviceInfo
on the project instance, so that it can be used by the$member
namespace for reading and writing member info. This part has no tests yet because it's best to test the$member
methods once they are available.This also adds
client.setDeviceInfo()
andclient.getDeviceInfo()
methods, along with a new table in the client db for storing this info.I wasn't too sure about how to store this in SQLite. We will only ever have one deviceInfo record, so options are:
i. A column for each property
ii A single JSON column with all info
I went with (2), but having done it I think (1) with a JSON column might be the better / simpler option.