-
Notifications
You must be signed in to change notification settings - Fork 65
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
New Datastore Interfaces #64
Comments
Did you mean to return |
@kevina ah, yeah. my bad |
Can we also stop lying and just use byte slices/readers instead of |
That would be nice, yes. Acceptings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The interfaces in go-datastore have been needing updating for a while. This came up in #28 so i decided to start the conversation up. Lets collect all these ideas together here so we can move forward with this.
Interface additions i've been looking for involve streaming interfaces:
Also, for queries and maybe 'gets' in general, it would be nice to have a readonly view interface. Many storage backends (bolt in particular) allow you to read and operate on the data within the datastore without making a copy (i.e. using the datastores memory) within a closure. This would be really useful for things like 'load this protobuf object from disk' where we don't need our own copy of the bytes.
Alternatively, this could be done with an output parameter and interfaces:
This would behave similarly to the json.Unmarshaler interfaces.
The text was updated successfully, but these errors were encountered: