Entity Query views backend

Created on 21 October 2023, 12 months ago
Updated 26 August 2024, about 2 months ago

Problem/Motivation

The default views backend is highly coupled to relational databases, for example see node_views_data() having to re-specify entity schema.

In Drupal 7, there was a contrib module for an EFQ views backend - i.e. use Views to generate entity queries: https://www.drupal.org/project/efq_views β†’

Entity queries are much more powerful in Drupal 10, for example we allow joins and aggregate queries.

If we ever want to add non-relational database storage to core, then an entity query views backend would allow this, whether it's for JSON storage in relational dbs, or in MongoDB etc.

Steps to reproduce

Proposed resolution

Add an entity query views backend.

Remaining tasks

Entity query can't do everything, for example history_views_data() wouldn't be accessible to entity query because that's an arbitrary database table, not entity data.

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @catch
  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    As always, @catch crosses my way sooner or later with the same thought. :)

    For years I was after the question how it would be best formulated as an issue to solve this ^^ for upcoming expectations on Views with the more and more growing flexibility of Drupal and custom entities, configs, etc. And here it is. :)

    Thanks to @chx for pointing me to this issue here in a Slack conversation, where I have spontanously posted an (for me) old issue with Views limitations.

    For now it is an FR explaining what is not working and what we want to achieve and how to solve this.

    Add an entity query views backend.

    What are the next steps for this to get some momentum?

  • πŸ‡¬πŸ‡§United Kingdom catch
  • πŸ‡©πŸ‡ͺGermany mxh Offenburg

    For remaining tasks:
    Maybe we then also need an alternative mechanic for media_library since it's build on top of a view configuration. Maybe any Drupal core module that ships with something on top of a Views config?

Production build 0.71.5 2024