Get the primary key column

@return primary key column
499526
public TColumn getPkColumn() {
		TColumn column = null;
		if (hasPkColumn()) {
			column = columns.get(pkIndex);
		}
		return column;
	}
118006
public function getPrimaryKeys(): array
    {
        $primaryColumns = [];
        foreach ($this->getColumns() as $column) {
            if ($column->getAbstractType() == 'primary' || $column->getAbstractType() == 'bigPrimary') {
                if (!in_array($column->getName(), $this->primaryKeys)) {
                    //Only columns not listed as primary keys already
                    $primaryColumns[] = $column->getName();
                }
            }
        }

        return array_unique(array_merge($this->primaryKeys, $primaryColumns));
    }
194629
public static function primaryKey()
    {
        $model = static::buildNoInitModel();
        if (is_string($model->guidAttribute) && !empty($model->guidAttribute)) {
            return [$model->guidAttribute];
        }
        return [$model->idAttribute];
    }
1203565
public function getAutoIncrementPrimaryKey()
    {
        if (IdMethod::NO_ID_METHOD !== $this->getIdMethod()) {
            foreach ($this->getPrimaryKey() as $pk) {
                if ($pk->isAutoIncrement()) {
                    return $pk;
                }
            }
        }
    }
161873
public function key()
    {
        if (empty($this->key) && !empty($this->definition->primary)) {
            $keys = array_values(
                array_filter(
                    preg_split('~[\s,]+~', $this->definition->primary)
                )
            );
            $keys = array_map(
                function ($key) {
                    return Normalise::toVariable($key);
                },
                $keys
            );

            $this->key = count($keys) > 1 ? $keys : array_shift($keys);
        }

        if (empty($this->key) && $this->has('id')) {
            $this->key = 'id';
        }

        return $this->key;
    }
225194
public List<PrimaryKeyJoinColumn<Entity<T>>> getAllPrimaryKeyJoinColumn()
   {
      List<PrimaryKeyJoinColumn<Entity<T>>> list = new ArrayList<PrimaryKeyJoinColumn<Entity<T>>>();
      List<Node> nodeList = childNode.get("primary-key-join-column");
      for(Node node: nodeList)
      {
         PrimaryKeyJoinColumn<Entity<T>>  type = new PrimaryKeyJoinColumnImpl<Entity<T>>(this, "primary-key-join-column", childNode, node);
         list.add(type);
      }
      return list;
   }
356804
public function getPrimarykey($table=null) 
    {
        if ($table) {
            return $this->getDb()->getPrimaryKey($table);
        } else {
            if (!isset($this->options['primary_key'])) {
                $pk = $this->getDb()->getPrimaryKey($this->getTableName());
                $this->options['primary_key'] = $pk;
            }
            
            return $this->options['primary_key'];
        }
    }
418286
public Object getPrimaryKey() throws javax.ejb.EJBException
    {
        HomeInternal hi = beanId.getHome();

        if (hi.isStatelessSessionHome() || hi.isStatefulSessionHome()) {
            throw new IllegalSessionMethodLocalException();
        }

        //PK26539: copy the primary key (see WASInternal_copyPrimaryKey for explanation)
        return ((EJSHome) hi).WASInternal_copyPrimaryKey(beanId.getPrimaryKey());
    }
76822
public function getAutoIncrementPrimaryKey()
    {
        if ($this->getIdMethod() != IDMethod::NO_ID_METHOD) {
            $pks = $this->getPrimaryKey();
            foreach ($pks as $pk) {
                if ($pk->isAutoIncrement()) {
                    return $pk;
                }
            }
        }

        return null;
    }
1204400
public function getId()
    {
        if (is_null($this->_id) && isset($this->object)) {
            $this->_id = $this->object->primaryKey;
        }

        return $this->_id;
    }
933784
public function getEntity()
    {

        // primary key only
        $references = $this->getReferences();

        // debug // print_r( $references->map(function($e){ return $e->get('fullyQualifiedName');}) );
        foreach( $references as $reference ) {

            // only manage references where the reference column is the primary key
            if( $reference->isPrimaryKey() ) {
                return array(
                    'entity' => 'normality',
                    'normality' => $reference->getRelation()->getEntityName(),
                );
            }

        }

        // datatypes we understand and have defined objects for
        // have a helper method in Entity::staticHelper
        switch( $this->getType()->name ) {

            case 'StockState':

                return array (
                    'entity' => 'StockState',
                );

            case 'hstore':

                return array(
                    'entity' => 'Hstore',
                );

            case 'json':

                return array(
                    'entity' => 'Json',
                );

            case 'inet':

                return array(
                    'entity' => 'Inet',
                );

            case 'timestamp':

                return array(
                    'entity' => 'DateTime',
                );

            case 'tsrange':

                return array(
                    'entity' => 'DateRange',
                );

            case 'oid':

                return array(
                    'entity' => 'PgLargeObject',
                );

        }

        return array();

    }
782641
public function columnKeys()
    {
        $columnKeys = [];

        foreach ($this->columns() as $key => $column) {
            if (is_string($key)) {
                $columnKeys[] = $key;
            } elseif (str_contains($column, '.')) {
                list($table, $columnKey) = explode('.', $column);
                $columnKeys[]            = $columnKey;
            } else {
                $columnKeys[] = $column;
            }
        }

        return $columnKeys;
    }
657973
public function keyedColumn()
    {
        $column = array();
        foreach ($this as $record) {
            $val = $record[key($record)];
            $column[$val] = $val;
        }
        return $column;
    }
845266
public function getPrimaryKey()
    {
        $pks = [];
        foreach ($this->__primaryKeys as $pk) {
            if (is_object($this->$pk)) {
                $traits = class_uses($this->$pk);
                if (isset($traits['Ornament\Model'])
                    || isset($traits['Ornament\JsonModel'])
                ) {
                    $pks[] = $this->$pk->getPrimaryKey();
                } else {
                    $pks[] = "{$this->$pk}";
                }
            } else {
                $pks[] = $this->$pk;
            }
        }
        return count($pks) == 1 ? $pks[0] : $pks;
    }
1190705
public function getPrimaryKey()
    {
        $pk = [];
        foreach ($this->columns as $col) {
            if ($col->isPrimaryKey()) {
                $pk[] = $col;
            }
        }

        return $pk;
    }
600203
protected function _getPrimaryKey()
    {
        if (!$this->_primaryKey) {
            $primaryKey = (array)$this->_table->getPrimaryKey();
            $this->_primaryKey = $primaryKey[0];
        }

        return $this->_primaryKey;
    }
820116
public function getPrimaryKey(){
		$table = $this->getTable();
		if(!$table)
			return null;
		$key = null;
		$cached = $this->connection->getCache()->fetch($table . '_primaryKey');

		if($cached === null){
			try{
				$key = $this->connection->getDriver()
					->getPrimaryKey($table, isset($this->resultSet) ? $this->resultSet : null);
			} catch(NeevoException $e){
				return null;
			}
			$this->connection->getCache()->store($table . '_primaryKey', $key);
			return $key === '' ? null : $key;
		}
		return $cached === '' ? null : $cached;
	}