im refactoring a pretty ancient TYPO3 extension codebase from pibase to extbase. one part is to rework the old mysql approach from
$GLOBALS["TYPO3_DB"]->sql_query("...")
to
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('...');
i've a query like that one and do not know how to do that with the querybuilder neither i found something in the docs
SELECT * FROM $this->db_name.Profs WHERE (REPLACE(RelatedUser, ' ', '-') = '" . ($this->tOnly($name)) . "' OR REPLACE(RelatedUser, ' ', '-') = '" . ($this->tOnly($pre)) . "') AND ((ID NOT IN (" . implode(',', $exclude_ids) . ")) AND ID NOT IN (" . implode(',', $this->locked) . ")) LIMIT 1
every part is clear how to handle except the REPLACE function - it takes a value of the given row and manipulates that on the fly for comparison.
any help is much appreciated.