protected function inlineContext($selectQuery, $itemRow)
    {
        $selectQuery = str_replace(['OLD.', 'NEW.'], '__ctx__', $selectQuery);
        $prefixedKeys = array_map(
            function ($key) {
                return '__ctx__' . $key;
            },
            array_keys($itemRow)
        );
        $connection = $this->getConnection();
        $escapedValues = array_map(
            function ($value) use ($connection) {
                return $connection->quote($value);
            },
            array_values($itemRow)
        );
        $sql = str_replace($prefixedKeys, $escapedValues, $selectQuery);

        return $sql;
    }