Task #5374

Task #27072: Re-Work persistence / implement features

Typo3DBBackend.php not compatible to DBAL

Added by Steffen Ritter over 3 years ago. Updated about 1 month ago.

Status:Closed Start date:2009-11-16
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:Extbase: New Persistence
Target version:-
Has patch:No Tags:
Votes: 2 (View)

Description

Hey folks,
the Typo3 DB Backend Handler creates SQL Strings from "splitted" informationen and overhands them to [TYPO3_DB]->sql_query.
This is indeed not the way the DB-Api of TYPO3 "wants" to be used.
In fact this raises problems with DBALS & Extbase, since the sql_query there is depreciated - parsing already concatenated Query String and transforming them is nearly unpossible for all cases.

Since I think "core-stuff" should set good examples the Typo3DBBackend has to be overworked to use the exec_* function to retrieve and send it's data.
Furthermore I think this is a MUST HAVE even for 4.3.

I'll have a look at it and propose a patch during day.


Related issues

related to Extbase MVC Framework - Task #10999: Use pass-through flag in persistence layer on all sql_exe... Closed 2010-11-20
related to Extbase MVC Framework - Task #10956: counting query results does not work with limit constraints Resolved 2010-11-19

History

Updated by Jochen Rau over 3 years ago

  • Status changed from New to Accepted
  • Assignee set to Jochen Rau

Hi,

You are right. Extbase does not fully support DBAL features ATM. This is because there are two contrary ways to implement support for different storage backends:

1. providing a multi-purpose Typo3DbBackend taking DBAL as an other layer below.
2. implementing the differences in parsing the QueryObjectmodel in a slim storage backend for each backend deriving common functionality from an abstract storage backend.

I definitely prefer the latter way. In this case the hierarchy could be as follow:

StorageBackendInterface
- AbstractStorageBackend <- some common functionality
    - AbstractAnsiSqlBackend <- does most of the QueryObjectModel parsing
        - MySqlBackend 
        - OracleBackend <- very slim
        - PostgresBackend
    - AbstractFileBackend
        - CsvBackend
        - XmlBackend

The second way has several advantages:
- small pieces of code to be optimized
- separated responsibilities makes it easy to understand the functionality
- easily plugged together (a different storage backend for each class)

Of course, the easy and quick way would be to utilize exec_* (due to lack of time). It would be great, if you could provide a patch for this (or if you could dedicate your time to the second way).

Regards
Jochen

Updated by Jochen Rau over 3 years ago

  • Target version set to Extbase 1.1.0

Updated by Jochen Rau over 3 years ago

  • Target version changed from Extbase 1.1.0 to Extbase 1.3.0beta1

Updated by Jochen Rau about 3 years ago

  • Target version deleted (Extbase 1.3.0beta1)

Updated by Bastian Waidelich over 2 years ago

  • Category set to Extbase: Generic Persistence
  • Target version set to Extbase 1.3.0beta2

dbal is acitvated by default in TYPO3 4.5 as well as Extbase.. So we'll definitely have to fix the issues.

Updated by Sebastian Kurfuerst over 2 years ago

  • Target version changed from Extbase 1.3.0beta2 to Extbase 1.3.0RC1

Updated by Sebastian Kurfuerst over 2 years ago

  • Target version changed from Extbase 1.3.0RC1 to Extbase 1.3.0

not possible to be included in 1.3.0RC1 anymore, that's why I move them to 1.3.0 for now.

Updated by Marc Bastian Heinrichs over 2 years ago

  • Target version changed from Extbase 1.3.0 to Extbase 1.4

Updated by Bastian Waidelich about 2 years ago

  • Parent task set to #27072
  • Has patch set to No

Updated by Anja Leichsenring 7 months ago

  • Status changed from Accepted to New
  • Assignee deleted (Jochen Rau)
  • Priority changed from Must have to Should have
  • Target version set to Extbase 6.1

Updated by Anja Leichsenring 7 months ago

  • Status changed from New to Accepted

Updated by Alexander Schnitzler 7 months ago

  • Category changed from Extbase: Generic Persistence to Extbase: New Persistence

Updated by Alexander Schnitzler 6 months ago

  • Assignee set to Anja Leichsenring

@Anja: Didn't your patch fix this issue?

Updated by Anja Leichsenring 6 months ago

  • Assignee deleted (Anja Leichsenring)

Only parts of it. There is still the issue with the predefined queries handad over to sql_query().

Updated by Alexander Schnitzler about 1 month ago

  • Status changed from Accepted to Closed

As decided on ecs13m we will not support dbal in Extbase. Officially we just support mysql and mariadb as it supports the same functionality.

Also available in: Atom PDF