-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add document annotations field #27
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
Conversation
Signed-off-by: Jonathan Howard <jonathan.w.howard@lmco.com>
Signed-off-by: Jonathan Howard <jonathan.w.howard@lmco.com>
Signed-off-by: Jonathan Howard <jonathan.w.howard@lmco.com>
Signed-off-by: Jonathan Howard <jonathan.w.howard@lmco.com>
Signed-off-by: Jonathan Howard <jonathan.w.howard@lmco.com>
|
@houdini91 Feel free to review as well, I just couldn't find your name in the reviewers |
|
Note From meeting: Alias is a human readable name that the user can assign in the database. So instead of a query on the document id you can pull it up by a human readable name. |
|
@fkautz @eddiezane @puerco @houdini91 Need this reviewed and merged for a bomctl capability under development |
puerco
left a comment
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.
LGTM, there is a small question below but feel free to merge it 🚀
| if backend.client == nil { | ||
| return nil, errUninitializedClient | ||
| } |
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.
I've noticed the transaction client get initialized on the fly while this one errs when undefined. Any reason for the inconsistency?
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.
The transactional client is currently only used for batching create/update/delete operations so it can be safely rolled back before committing any changes. Read operations just use the regular client since nothing is being altered. The txClient function also starts off by running this check, so it seemed consistent to me
Description
This PR adds an
Annotationsattribute to theDocumentschema. These are arbitrary key-value pairs.However, special significance is given to a key named "alias" to make it unique for a given document ID.
All changes in this PR are auto-generated except the files in
backends/ent/andinternal/backends/ent/schema/.Miscellaneous
NodeList-->Nodefrom one-to-many to many-to-many, so that any node in the database can be contained in more than one node listNodeschemaidfield, nodes are now uniquely identified by a composite primary key of node ID and node list ID