Opened 9 years ago

Closed 9 years ago

#24932 closed New feature (fixed)

Add Cast database function

Reported by: Ian Foote Owned by: Tim Graham <timograham@…>
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 Marc Tamlyn, 9 years ago

Triage Stage: UnreviewedAccepted

This would be very nice and explicit casts are used in contrib.postgres in several places. The postgres syntax is ::text (or similar).

comment:2 by Ian Foote, 9 years ago

Owner: changed from nobody to Ian Foote
Status: newassigned

comment:3 by Tim Graham, 9 years ago

Has patch: set
Needs documentation: set

PR (no docs at this time).

comment:4 by Mikey Ariel, 9 years ago

Owner: Ian Foote removed
Patch needs improvement: set
Status: assignednew

PR closed, submitter indicated that they are not going to work on this ticket anymore, deassigning.

comment:5 by Sergey Fedoseev, 9 years ago

Cc: fedoseev.sergey@… added

comment:6 by Claude Paroz, 9 years ago

Needs documentation: unset
Patch needs improvement: unset

New PR based on Ian's patch.

comment:7 by Tim Graham, 9 years ago

Patch needs improvement: set

(waiting for #25759 to merge before tweaking this a bit)

comment:8 by Tim Graham, 9 years ago

Patch needs improvement: unset

Updated PR on a branch with the dependent ticket.

comment:9 by Tim Graham <timograham@…>, 9 years ago

Owner: set to Tim Graham <timograham@…>
Resolution: fixed
Status: newclosed

In 03b6947:

Fixed #24932 -- Added Cast database function.

Thanks Ian Foote for the initial patch.

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