Task #90794

Add between() method to QueryInterface

Added by Christian Eßl 7 months ago. Updated 6 months ago.

Status:
Rejected
Priority:
Should have
Category:
Extbase
Start date:
2020-03-20
Due date:
% Done:

0%

TYPO3 Version:
10
PHP Version:
Tags:
persistence
Complexity:
Sprint Focus:

Description

The extbase Query objects supports between() for some time now. But it doesn't appear in code completion when writing code in an extbase repository, because QueryInterface itself does not define between(). I see no reason why it shouldn't be there.
Adding the method to the QueryInterface could possibly break classes, that implement the interface. In TYPO3 core only the Query object implements QueryInterface.
There might be third party code using that interface, so this should probably done for TYPO3 11?


Related issues

Related to TYPO3 Core - Feature #47812: Query support for BETWEEN Closed 2013-05-02

History

#1 Updated by Christian Eßl 7 months ago

#2 Updated by Alexander Schnitzler 6 months ago

  • Assignee set to Stefan Froemken
  • Tags set to persistence

#3 Updated by Stefan Froemken 6 months ago

Hello Christian,

yeah...that's correct. Some years ago I have created my own CsvQuery (QueryInterface) and CsvBackend (BackendInterface) and I'm happy to not implement an additional BETWEEN method. Further there are DBs out there which does not support BETWEEN. For me it is wrong to have BETWEEN in Query object, too. IMO BETWEEN will only work for MySQL and maybe PostgreSQL, but not for MSSQL. So BETWEEN should by part of a MySqlQuery, but not for Query-object.

I would prefer to close this ticket.
Please add an Annotation like this:

/** @var Query $query */
$query = $this->createQuery();

Stefan

#4 Updated by Alexander Schnitzler 6 months ago

  • Status changed from New to Rejected

I would like to add that to achieve a native between, first doctrine dbal would need to support that. Then, our QOM would need to support that as well. Then we would need to parse the QOM between depending on the current DBMS. The current approach is quite alright for all DBMS'.

If you feel the need to object, please do so.

Also available in: Atom PDF