#32592 closed New feature (duplicate)
Add places argument to Round database function.
| Reported by: | Nick Pope | Owned by: | Nick Pope |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| Severity: | Normal | Keywords: | database function, round, decimal places |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
For whatever reason this review comment was never followed up on and Round() doesn't support providing a second argument for the number of places to round to.
This is frustrating as it rather limits the use of Round().
All core backends support both a single and two- argument form of ROUND(). The second argument is the number of decimal places to round to. All backends, other than SQLite, also support a negative integer being provided here for rounding to the left of the decimal point.
Note:
See TracTickets
for help on using tickets.
PR