Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Database%...
The $options param just says:
> array $options: (optional) An array of options on the query.
This is not very useful, and requires a developer to go digging in the source to figure this out.
The query() method explains more:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Database%...
The various methods such as insert(), update(), delete() need to do the same.
Though note that the link to the other method isn't properly being made:
> See the documentation for self::defaultOptions() for details
Comment | File | Size | Author |
---|---|---|---|
#15 | interdiff-12-15.txt | 1.95 KB | msankhala |
#15 | updated-doc-2772321-15.patch | 2.42 KB | msankhala |
#12 | removedreturn-2772321-12.patch | 2.74 KB | vimal_nadar |
#9 | 2772321-9.patch | 3.09 KB | dhruveshdtripathi |
#4 | 2772321-4.patch | 3.11 KB | shashikant_chauhan |
Comments
Comment #3
shashikant_chauhan CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedworking on the issue.
Comment #4
shashikant_chauhan CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedComment #8
borisson_I really like this, this is a good improvement. This patch doesn't apply anymore.
Comment #9
dhruveshdtripathi CreditAttribution: dhruveshdtripathi as a volunteer and at DevsAdda commentedMade fresh patch for 8.6.x
Comment #10
joachim CreditAttribution: joachim commentedThis looks good.
But do we need to mention the 'return' option in each method? The docs for that are pretty clean on the method we link to.
Comment #11
borisson_I agree with #10, we shouldn't copy that information in every time.
Comment #12
vimal_nadar CreditAttribution: vimal_nadar commentedUpdated the patch as per comment #10.
Comment #13
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedI can confirm the patch #12 applies cleanly and fixes the docblock as per issue description. Also, removes the $option['return'] mention as per #10.
Comment #14
alexpottWe don't need the
See the documentation for \Drupal\Core\Database\Connection::defaultOptions() for details.
. That's what the@see
is for.The new line added here is incorrect.
Comment #15
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedHere is updated patch.
Comment #17
joachim CreditAttribution: joachim commentedComment #20
catchCommitted/pushed to 8.7.x and cherry-picked to 8.6.x. Thanks!