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
We will be needing extra methods on StorageProvider as we move forward, let's collect them here to get an overview of how things might look. Also as we use it more, we may want to make changes.
move: any non-top level methods (think there is only one left) to their respective sub-store.
refactor this out completely in favour of using individual store traits
remove get_document_by_entry()
General
look again at the errors we have, room for improvement, simplification, a lot may be redundant now that validation logic is elsewhere
rename all basic getters simply get_x() (now they are get_x_by_id())
QUESTIONS:
do we want an error or Ok(false) to be returned from insert methods?
in general DocumentStore needs a little reflection now we used it a bit, in particular "insert"ing documents is confusing, what do we expect this to do? Create or update a documents latest view id? As well as the view? Delete a document??? Splitting it out into multiple methods might help, Also not having to pass in a Document struct would be handy.
The text was updated successfully, but these errors were encountered:
We will be needing extra methods on
StorageProvider
as we move forward, let's collect them here to get an overview of how things might look. Also as we use it more, we may want to make changes.Also general renaming, possibly following these conventions more closely: https://rust-lang.github.io/api-guidelines/naming.html#ad-hoc-conversions-follow-as_-to_-into_-conventions-c-conv
LogStore
get
toget_log
or something else better.StorageLog
associated type in favour of passing in paramsnext_log_id()
EntryStore
OperationStore
get_operations_by_document_view_id(id: DocumentViewId) -> Result<Vec<Operation>>
get_operations_by_document_view_id
#148DocumentStore
get_document_by_id
toget_latest_view_for_document
get_document_by_id
which returns the actualDocument
rather than the view.get_document_id_by_view_id(document_view_id: DocumentViewId) -> Result<DocumentId>
get_document_by_view_id(view_id: DocumentViewId) -> Result<Document>
(returns document with the given view inside, not the latest view)get_documents_by_schema(schema: SchemaId) -> Result<Vec<Document>>
change:DocumentMeta.operations: Option<Vec<VerifiedOperation>>
get_parents_with_pinned_relation(document_view_id: &DocumentViewId) -> Result<Vec<DocumentViewId>>
Implementreduce
anddependency
task logic #144get_parents_with_unpinned_relation(document_view_id: &Documentd) -> Result<Vec<DocumentViewId>>
Implementreduce
anddependency
task logic #144SchemaStore
get_log_seq_for_schema(schema_id: SchemaId) -> Vec<(Author, Vec<(LogId, SeqNum)>>
StorageProvider
get_document_by_entry()
General
get_x()
(now they areget_x_by_id()
)QUESTIONS:
Ok(false)
to be returned from insert methods?Document
struct would be handy.The text was updated successfully, but these errors were encountered: