public function getPrimaryKey(string $table): string
    {
        $schema = $this->conn->getSchemaManager();
        $tableDetails = $schema->listTableDetails($table);
        if ($tableDetails->hasPrimaryKey() === false) {
            throw new NeuralyzerException("Can't find a primary key for '{$table}'");
        }

        return $tableDetails->getPrimaryKey()->getColumns()[0];
    }
public function getPrimaryKey(string $table): string
    {
        $schema = $this->conn->getSchemaManager();
        $tableDetails = $schema->listTableDetails($table);
        if ($tableDetails->hasPrimaryKey() === false) {
            throw new NeuralyzerException("Can't find a primary key for '{$table}'");
        }

        return $tableDetails->getPrimaryKey()->getColumns()[0];
    }
public function getPrimaryKey ( string $ table ) : string { $ schema = $ this -> conn -> getSchemaManager ( ) ; $ tableDetails = $ schema -> listTableDetails ( $ table ) ; if ( $ tableDetails -> hasPrimaryKey ( ) === false ) { throw new NeuralyzerException ( "Can't find a primary key for '{$table}'" ) ; } return $ tableDetails -> getPrimaryKey ( ) -> getColumns ( ) [ 0 ] ; }
Identify the primary key for a table

@param string $table

@return string
@throws NeuralyzerException
Identify the primary key for a table