-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Set parameter type in QBMapper #14825
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: Marius David Wieschollek <[email protected]>
dbedd85 to
5aeb8ea
Compare
|
Restarted CI: https://drone.nextcloud.com/nextcloud/server/17277 |
MorrisJobke
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.
Code makes sense and looks good 👍
ChristophWurst
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.
Looks good and has tests 🚀 👍
| * @param Entity $entity The entity to get the types from | ||
| * @param string $property The property of $entity to get the type for | ||
| * @return int | ||
| * @since 16.0.0 |
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.
protected method, no @since necessary
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.
Fine with me - it's just additional documentation that's fine here.
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.
If i do not add a @since tag, autotest will not accept it
$ ./autotest.sh sqlite lib/AppFramework/Db/QBMapperTest.php
Using PHP executable /usr/bin/php
Parsing all files in lib/public for the presence of @since or @deprecated on each method...
@since or @deprecated tag is needed in PHPDoc for OCP\AppFramework\Db\QBMapper::getParameterTypeForProperty
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.
okidoke, no problem :)
|
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
This patch sets the parameter type in the insert and update methods of QBMapper based on the field types declared in the Entity. Parameters that can for any reason not be mapped will be mapped to "string" which was also the default before.
Fixes #11236