Opened 4 years ago
Last modified 4 years ago
#31839 closed New feature
Add additional database functions. — at Initial Version
Reported by: | Nick Pope | Owned by: | Nick Pope |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | functions, random, truncate, log2, log10, bit length, octet length, hyperbolic |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I propose adding some additional database functions:
Random
-- generate random numbers in the range[0.0, 0.1)
.Truncate
-- round number towards zero. (SQL function isTRUNC
, butTrunc
is used for date truncation in Django.)Log2
andLog10
-- simple logarithm functions without needing to provide the base.ACosh
,ASinh
,ATanh
,Cosh
,Sinh
, andTanh
-- hyperbolic functions.BitLength
andOctetLength
-- length of string in bits and bytes, complement toLength
which is character length.
Note:
See TracTickets
for help on using tickets.