Opened 71 minutes ago

Last modified 28 minutes ago

#37115 assigned New feature

Title: Add support for Generic Relations / Table-Valued Expressions in the ORM — at Version 1

Reported by: Pravin Owned by: Pravin
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: Table-Valued expressions, Set-returning functions, SRF, generate_series, Postgres, Orm
Cc: Pravin, Lily, Simon Charette, Bhuvnesh, David Sanders Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Pravin)

This ticket proposes the implementation of a generic Relation API within the Django ORM to support Table-Valued Expressions (TVEs) and functions that return sets of rows.

A generic Relation API will lay the groundwork for cleanly implementing several advanced querying features across different databases, including:

  • PostgreSQL generate_series() (and potential equivalents for other backends).
  • Subqueries acting as derived tables directly within the FROM clause.
  • Database abstraction for json_each() , JSON_TABLE and json_array_elements().
  • Deprecation of FilteredRelation.

References & Context

Change History (1)

comment:1 by Pravin, 68 minutes ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top