private function summarize(array $whereClause, $selector)
    {
        switch (count($whereClause)) {
            case 1:
                return $whereClause[0];

            default:
                if ($selector instanceof RecordSelector) {
                    return ['@OR' => $whereClause];
                }

                if ($selector instanceof DocumentSelector) {
                    return ['$or' => $whereClause];
                }
        }

        return [];
    }