Skip to content

Database: Safety, documentation and type hints

Fridtjof requested to merge db-safety-documentation into master

What does this MR do?

  • Greatly enhances documentation for the Database class
  • Adds some new methods to fetch a single row/column by ID
  • Makes the delete method safer to use by preventing empty criteria, and adding a new deleteAll method that can be used, in case it is ever needed.

How confident are you it won't break things if deployed?

Very confident. The only actual code change that changes behavior is b952dbfc, and I found no usages of delete that supply empty criteria.

Checklist

  • no new test, it's 97% doc changes
  • no unrelated changes
  • asked someone for a code review
  • joined #foodsharing-beta channel at https://slackin.yunity.org
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
  • Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings
Edited by Alex

Merge request reports