method createIndex documentation in bbn\Db\Languages\Pgsql
Creates an index
function(string $table, $column, bool $unique = false, $length = NULL)
  {
    $column = (array)$column;
    $name = Str::encodeFilename($table);
    if ($table = $this->tableFullName($table, true)) {
      foreach ($column as $i => $c) {
        if (!Str::checkName($c)) {
          $this->error("Illegal column $c");
        }
        $name      .= '_' . $c;
        $column[$i] = $this->escape($column[$i]);
      }
      $name = Str::cut($name, 50);
      return (bool)$this->rawQuery(
        'CREATE ' . ($unique ? 'UNIQUE ' : '') . "INDEX $name ON $table ( " .
        implode(', ', $column) . ' )'
      );
    }
    return false;
  }
  Creates an index BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
  
  
    
    
      
        
        
      
    
    
    
      
      
      
      
      
        
          
          
          
          
          
          
          
          
            
              
                
              
            
            
              
              This website uses cookies to ensure you get the best experience on our website.                
                
              
              
                
                
              
             
           
          
          
          
            
            © 2011-2025 
BBN Solutions