Opened 10 years ago
Closed 9 years ago
#24932 closed New feature (fixed)
Add Cast database function
Reported by: | Ian Foote | Owned by: | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | fedoseev.sergey@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Cast
can currently be used via RawSQL
: RawSQL("cast(%s as datetime)", (now,))
. It would be good to make this nicer to use.
Change History (9)
comment:1 by , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 9 years ago
Owner: | removed |
---|---|
Patch needs improvement: | set |
Status: | assigned → new |
PR closed, submitter indicated that they are not going to work on this ticket anymore, deassigning.
comment:5 by , 9 years ago
Cc: | added |
---|
comment:6 by , 9 years ago
Needs documentation: | unset |
---|---|
Patch needs improvement: | unset |
New PR based on Ian's patch.
comment:7 by , 9 years ago
Patch needs improvement: | set |
---|
(waiting for #25759 to merge before tweaking this a bit)
comment:8 by , 9 years ago
Patch needs improvement: | unset |
---|
Updated PR on a branch with the dependent ticket.
Note:
See TracTickets
for help on using tickets.
This would be very nice and explicit casts are used in contrib.postgres in several places. The postgres syntax is
::text
(or similar).