Use QbMapper to replace the Mapper removed in nextcloud version 26.0.0#48
Open
fcki1984 wants to merge 7 commits intoe-alfred:masterfrom
Open
Use QbMapper to replace the Mapper removed in nextcloud version 26.0.0#48fcki1984 wants to merge 7 commits intoe-alfred:masterfrom
fcki1984 wants to merge 7 commits intoe-alfred:masterfrom
Conversation
maurerle
approved these changes
May 12, 2023
lib/Db/BookmarkMapper.php
Outdated
| } | ||
|
|
||
| return $this->findEntities($query); | ||
| } |
There was a problem hiding this comment.
can you indent this function properly line 40-55 please?
lib/Db/PreferenceMapper.php
Outdated
remove 4 empty lines.
indent this function properly line 39-55.
devnoname120
suggested changes
May 24, 2023
There was a problem hiding this comment.
@fcki1984 Click on Commit suggestion on each of my comments to fix the remaining whitespace issues.
Comment on lines
+39
to
+54
| public function get($fileId, $name, $type = null) { | ||
| $query = $this->db->getQueryBuilder(); | ||
| $query->select('*') | ||
| ->from($this->getTableName()) | ||
| ->where($query->expr()->eq('file_id', $query->createNamedParameter($fileId))) | ||
| ->andWhere($query->expr()->eq('user_id', $query->createNamedParameter($this->userId))); | ||
|
|
||
| if ($type !== null) { | ||
| $query->andWhere($query->expr()->eq('type', $query->createNamedParameter($type))); | ||
| } | ||
|
|
||
| if ($name !== null) { | ||
| $query->andWhere($query->expr()->eq('name', $query->createNamedParameter($name))); | ||
| } | ||
|
|
||
| return $this->findEntities($query); |
There was a problem hiding this comment.
Suggested change
| public function get($fileId, $name, $type = null) { | |
| $query = $this->db->getQueryBuilder(); | |
| $query->select('*') | |
| ->from($this->getTableName()) | |
| ->where($query->expr()->eq('file_id', $query->createNamedParameter($fileId))) | |
| ->andWhere($query->expr()->eq('user_id', $query->createNamedParameter($this->userId))); | |
| if ($type !== null) { | |
| $query->andWhere($query->expr()->eq('type', $query->createNamedParameter($type))); | |
| } | |
| if ($name !== null) { | |
| $query->andWhere($query->expr()->eq('name', $query->createNamedParameter($name))); | |
| } | |
| return $this->findEntities($query); | |
| public function get($fileId, $name, $type = null) { | |
| $query = $this->db->getQueryBuilder(); | |
| $query->select('*') | |
| ->from($this->getTableName()) | |
| ->where($query->expr()->eq('file_id', $query->createNamedParameter($fileId))) | |
| ->andWhere($query->expr()->eq('user_id', $query->createNamedParameter($this->userId))); | |
| if ($type !== null) { | |
| $query->andWhere($query->expr()->eq('type', $query->createNamedParameter($type))); | |
| } | |
| if ($name !== null) { | |
| $query->andWhere($query->expr()->eq('name', $query->createNamedParameter($name))); | |
| } | |
| return $this->findEntities($query); |
| ->andWhere($query->expr()->eq('user_id', $query->createNamedParameter($this->userId))); | ||
|
|
||
| if (!empty($name)) { | ||
| $query->andWhere($query->expr()->eq('name', $query->createNamedParameter($name))); |
There was a problem hiding this comment.
Suggested change
| $query->andWhere($query->expr()->eq('name', $query->createNamedParameter($name))); | |
| $query->andWhere($query->expr()->eq('name', $query->createNamedParameter($name))); |
| } | ||
|
|
||
| return $this->findEntities($sql, $args); | ||
| return $this->findEntities($query); |
There was a problem hiding this comment.
Suggested change
| return $this->findEntities($query); | |
| return $this->findEntities($query); |
|
@fcki1984 Bump |
|
Superseded by #50. |
devnoname120
added a commit
to devnoname120/epubviewer
that referenced
this pull request
Jul 30, 2023
Original PR: e-alfred/epubreader#48 Fix error message: `Message: Class "OCP\AppFramework\Db\Mapper" not found` Co-authored-by: <39592566+fcki1984@users.noreply.github.com> Co-authored-by: Paul <devnoname120@gmail.com>
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.
by chatgpt.