protected function buildQueryPart(string $section, array $statements): string
    {
        switch ($section) {
            case static::QUERY_PART_JOIN:
                return $this->buildJoin($statements);
            case static::QUERY_PART_LIMIT:
                return isset($statements['limit']) ? 'LIMIT ' . $statements['limit'] : '';
            case static::QUERY_PART_OFFSET:
                return isset($statements['offset']) ? 'OFFSET ' . $statements['offset'] : '';
            case static::QUERY_PART_ORDERBY:
                $orderBys = '';
                if (isset($statements['orderBys']) === true && \is_array($statements['orderBys']) === true) {
                    foreach ($statements['orderBys'] as $orderBy) {
                        $orderBys .= $this->wrapSanitizer($orderBy['field']) . ' ' . $orderBy['type'] . ', ';
                    }

                    if ($orderBys = trim($orderBys, ', ')) {
                        $orderBys = 'ORDER BY ' . $orderBys;
                    }
                }

                return $orderBys;
            case static::QUERY_PART_GROUPBY:
                $groupBys = $this->arrayStr($statements['groupBys'], ', ');
                if ($groupBys !== '' && isset($statements['groupBys']) === true) {
                    $groupBys = 'GROUP BY ' . $groupBys;
                }

                return $groupBys;
        }

        return '';
    }