protected function formatWhere(array $where) : string {
    $where_clause = '';

    foreach ($where as $column => $value) {
      $logical_operator = null;

      if (is_numeric($column) && is_array($value)) {
        $where_clause .= "`{$value[0]}` {$value[1]} :where_{$value[0]}";
      } else if (is_numeric($column) && is_string($value)) {
        $logical_operator = $value;
      } else {
        $where_clause .= "`{$column}` = :where_{$column}";
      }

      $next_value = next($where);
      $next_key = key($where);

      if ( $next_value !== false && !is_null($next_key) && (!is_numeric($next_key) || !is_string($next_value)) )  {
        $logical_operator = $logical_operator ?? '&&';

        $where_clause .= " {$logical_operator} ";
      }
    }

    return $where_clause;
  }