Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#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.

Change History (3)

comment:1 by Nick Pope, 4 years ago

Has patch: set
Owner: changed from nobody to Nick Pope

comment:2 by Mariusz Felisiak, 4 years ago

Resolution: duplicate
Status: assignedclosed

Duplicate of #31487.

comment:3 by Nick Pope, 4 years ago

Sorry for the duplicate, my search in Trac came up with nothing.

Note: See TracTickets for help on using tickets.
Back to Top