Move the PostgreSQL Entity Query SQL code to the pgsql module

Created on 2 January 2022, almost 3 years ago
Updated 30 January 2023, almost 2 years ago

Problem/Motivation

The PostgreSQL database driver has now its own module. All specific code for PostgreSQL should be moved to the pgsql module. The PostgreSQL Entity Query SQL code now lives in the directory core/lib/Drupal/Core/Entity/Query/Sql/pgsql. Which is not in the pgsql module.

Proposed resolution

Move the code to the pgsql module.

Remaining tasks

TBD

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

None

📌 Task
Status

Needs work

Version

10.1

Component
Database 

Last updated 2 days ago

  • Maintained by
  • 🇳🇱Netherlands @daffie
Created by

🇳🇱Netherlands daffie

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to RTBC almost 2 years ago
  • Status changed to Needs review almost 2 years ago
  • 🇳🇱Netherlands daffie

    Changed the PostgreSQL override of the service entity.query.sql into one that decorates the original service instead of extending it. The workspaces module now has only to decorate the service entity.query.sql and no longer has to decorate the service pgsql.entity.query.sql.

  • Status changed to Needs work almost 2 years ago
  • 🇳🇱Netherlands arantxio Dordrecht

    Latest patch by @daffie removes the function register() mentioned by @xjm in comment #21. So we do not need a test for this anymore.

    De rest of the changes are covered by the test and the test results are also all passed.

    +++ b/core/core.services.yml
    @@ -1040,9 +1040,6 @@ services:
    -  pgsql.entity.query.sql:
    -    class: Drupal\Core\Entity\Query\Sql\pgsql\QueryFactory
    -    arguments: ['@database']
    

    We do remove this part, it could be that sites could perhaps break on this. I think it would be better if we do not remove this but instead change the name of the new service and make it non-public.

    Also after some searching I can see that the dynamic_entity_reference module uses this service.

Production build 0.71.5 2024