WIP: Create an abstraction layer for the database#407
Draft
christianlupus wants to merge 38 commits intonextcloud:masterfrom
Draft
WIP: Create an abstraction layer for the database#407christianlupus wants to merge 38 commits intonextcloud:masterfrom
christianlupus wants to merge 38 commits intonextcloud:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #407 +/- ##
===========================================
- Coverage 0.87% 0.62% -0.25%
- Complexity 436 600 +164
===========================================
Files 14 30 +16
Lines 1375 1914 +539
===========================================
Hits 12 12
- Misses 1363 1902 +539
Flags with carried forward coverage won't be shown. Click here to find out more.
|
seyfeb
reviewed
Nov 25, 2020
| * @param CategoryEntity $category The entity to store | ||
| */ | ||
| public function store(CategoryEntity $category): void { | ||
| // We do not need to store anything here. The categories are just virtually generated. |
Collaborator
There was a problem hiding this comment.
What about creating categories as actual objects that can have, e.g., a description or other metadata? 😇
Collaborator
Author
There was a problem hiding this comment.
Simply put: No. 😁
The current DB schema has only a category name stored in a mapping type table. I kept with that for now. See also #300.
I was planning to proceed as follows:
- Create the entities and a DB abstraction layer parallel to the current main work.
- Deprecate major parts of the current RecipeDbService and refactor the DbCacheService that use direct DB operations.
- Migrate and refactor any current usage of any of these methods in the codebase
- Migrate any pending PRs to the new system
- Remove the direct DB access
After the DB access has been encapsulated as described here, we can add further setter/getter and fields in the DB without affecting the functionality of other parts.
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
…able Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
3f05957 to
4083e95
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
To allow for simpler development and future implemntation, this PR provides an internal API to the database.
It is related to #301.
Currently this PR is under development and should be considered Work in Progress. Suggestions and enhancements are welcome.