Feature #21688

Add support for IN and EXISTS subqueries

Added by Xavier Perseguers over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Must have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2009-11-25
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

When trying to use EXT:crawler on an Oracle database, CLI dispatcher fails because some queries cannot be parsed in class.tx_crawler_lib.php:

$GLOBALS['TYPO3_DB']->exec_UPDATEquery(
'tx_crawler_queue',
'process_id IN (SELECT process_id FROM tx_crawler_process WHERE active=0 AND deleted=0)',
array(
'process_scheduled' => 0,
'process_id' => ''
)
);

or

$GLOBALS['TYPO3_DB']->exec_UPDATEquery(
'tx_crawler_process',
'active = 0
AND NOT EXISTS (
SELECT * FROM tx_crawler_queue
WHERE tx_crawler_queue.process_id = tx_crawler_process.process_id
AND tx_crawler_queue.exec_time = 0
)',
array(
'deleted'=>'1'
)
);

As such support for subqueries should be added :-)

(issue imported from #M12758)

12758-dbal_v2.diff View (23.2 KB) Administrator Admin, 2009-11-27 12:33

12758-dbal_v3.diff View (15.1 KB) Administrator Admin, 2009-11-29 19:09


Related issues

Related to TYPO3 Core - Bug #21017: Use separate tables for tags in the caching framework Closed 2009-09-08
Related to TYPO3 Core - Bug #21718: Add functionality to work with caching framework Closed 2009-11-27
Related to TYPO3 Core - Bug #21836: Move back methods belonging to t3lib_sqlparser Closed 2009-12-10

History

#1 Updated by Xavier Perseguers over 10 years ago

Attached patches add support for WHERE ... IN (subquery)

#2 Updated by Xavier Perseguers over 10 years ago

Just added v2 of DBAL patch. This version supports both WHERE EXISTS (subquery) and WHERE ... IN (subquery) from first patch.

I should test again whether crawler works now a bit better but I'm confident... at least for those two types of queries.

#3 Updated by Xavier Perseguers over 10 years ago

Updated v2 patch against current DBAL-trunk after recent unit test reorganization

#4 Updated by Xavier Perseguers over 10 years ago

Support for IN subqueries has been added by patch for bug #12800

#5 Updated by Xavier Perseguers over 10 years ago

Committed v3 to DBAL Trunk (rev. 27132)

#6 Updated by Xavier Perseguers over 10 years ago

Successfully tested on an Oracle website

#7 Updated by Xavier Perseguers over 10 years ago

EXISTS support has not been reintegrated in t3lib_sqlparser (in trunk) when #13003 was resolved.

#8 Updated by Xavier Perseguers over 10 years ago

Wrong alert, was testing DBAL 1.1-dev with TYPO3 4.3.0

Also available in: Atom PDF