-
Notifications
You must be signed in to change notification settings - Fork 14
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
refactor: Skeleton
-API rework
#1264
Merged
phorward
merged 15 commits into
viur-framework:develop
from
phorward:refactor-Skeleton.CRUD
Oct 1, 2024
Merged
refactor: Skeleton
-API rework
#1264
phorward
merged 15 commits into
viur-framework:develop
from
phorward:refactor-Skeleton.CRUD
Oct 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It either now returns the skeleton or None on error. The truthy test works the same way as before.
phorward
added
the
refactoring
Pull requests that refactor code but do not change its behavior.
label
Sep 20, 2024
phorward
added
the
Priority: High
After critical issues are fixed, these should be dealt with before any further issues.
label
Sep 23, 2024
Will use `skel["key"]` instead.
phorward
changed the title
feat+refactor:
refactor: Sep 23, 2024
Skeleton
-API rework, Skeleton.update()
transactional read/writeSkeleton
-API rework
The key parameter allows to provide a different key for the given operation. This might safe one more line of assignment code required before. Also refactors Skeleton.delete() with its double db.Get()
This is a "hackish", but working way to stay backward compatible with legacy code and still integrate existing fromDB/toDB-functionality into the new read/write-API.
phorward
added a commit
to phorward/viur-core
that referenced
this pull request
Sep 24, 2024
Drafting new `Skeleton.update()` function based on `viur.toolkit.db.set_status()`. This function replaces the existing Skeleton.update() which should provide a dict-like behavior. For this case, the `|`- and `|=`-operators should be used. Because Skelton/SkeletonInstance is not a dict, it should provide correct CRUD functinality. This pull request is part of viur-framework#630 and a follow-up on viur-framework#1264, which should be merged first.
ArneGudermann
approved these changes
Sep 25, 2024
sveneberth
requested changes
Sep 27, 2024
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.
Renaming on this public API belongs in my opinion in a major release and not in a minor.
Yeah, we've discussed this in the viur-meeting already, lgtm! 👍 |
phorward
added a commit
that referenced
this pull request
Oct 15, 2024
Provides a `Skeleton.patch()` function based on `viur.toolkit.db.set_status()`. This improves the Skeleton API to a better and more integrated CRUD-API (Create-Read-Update-Delete). It also introduces a ReadFromClientException that can be raised internally for client parsing error reporting. This pull request is part of #630 and a follow-up on #1264, which ~should be~ was merged first. This is also an alternative replacement on #991. --------- Co-authored-by: agudermann <[email protected]> Co-authored-by: Sven Eberth <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Priority: High
After critical issues are fixed, these should be dealt with before any further issues.
refactoring
Pull requests that refactor code but do not change its behavior.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Skeleton.toDB()
intoSkeleton.write()
Skeleton.fromDB()
intoSkeleton.read()
skelValues
variable intoskel
Skeleton.delete()
Skeleton.read()
,Skeleton.write()
andSkeleton.delete()
to accept key-parameterThis pull request is a first, backward-compatible milestone on #630.