protected function parseParams($expression, $params)
    {
        if (empty($params)) {
            return $expression;
        }

        foreach ($params as $name => $value) {
            if (strncmp($name, ':', 1) !== 0) {
                $name = ':' . $name;
            }
            // unable to use `str_replace()` because particular param name may be a substring of another param name
            $pattern = "/" . preg_quote($name, '/') . '\b/';
            $value = '"' . $this->db->escapeMatchValue($value) . '"';
            $expression = preg_replace($pattern, $value, $expression, -1, $cnt);
        }

        return $expression;
    }