﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23753	Provide a set of SQL functions	Josh Smeaton	nobody	"When #14030 lands there will be an easy way to implement SQL functions like LENGTH() and COALESCE(). There are several tickets requesting the implementation of certain functions, and this ticket aims to collate those requests, and extend the number of functions to a useable minimum subset. There was a discussion on the mailing list that calls out some implementation details as well as the set of functions to implement: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/django-developers/HggiPzwkono/SgXt4iNjTIYJ

List of functions:

- Coalesce
- ToLower/Lower
- ToUpper/Upper
- Length
- Case-When / IIF 
- Substring

This list isn't necessarily complete or final. If there are other functions that you'd like to see implemented in core, please comment, and I'll update the list above. Particular implementation details can be discussed on the PR or below once a PR is submitted. I'll aim to have these completed very soon after #14030 lands, and I expect these to be available in the same django version that incorporates 14030.

Linked tickets:

- #23363 (Length)
- #21208 (Coalesce in .extra)
- #10929 (Coalesce for Aggregates - could also be done by customising the aggregate directly)"	New feature	new	Database layer (models, ORM)	dev	Normal		expressions		Unreviewed	0	0	0	0	0	0
