Returns DBColumn list of primary key

@return
771254
final List<DBColumn> getPrimaryKeyColumnList() {

		final List<DBColumn> primaryKeyColumnList = new ArrayList<DBColumn>();

		final Set<String> columnNameSet = getAllColumnNames();

		for (String columnName : columnNameSet) {

			final D6ModelClassFieldInfo fieldInfo = getFieldInfo(columnName);

			final Field field = fieldInfo.field;

			final DBColumn dbColumn = field.getAnnotation(DBColumn.class);

			if (dbColumn.isPrimaryKey()) {

				primaryKeyColumnList.add(dbColumn);
			}
		}

		return primaryKeyColumnList;
	}
633282
protected List<String> getPrimaryKeys(String tableName) {
        List<String> pkCols = new ArrayList<String>();
        try {
            // Lower-case table names are required for PostgreSQL; we might need to
            // alter this if we use another comparison database (besides HSQL) someday
            ResultSet rs = dbconn.getMetaData().getPrimaryKeys(null, null, tableName.toLowerCase());
            while (rs.next()) {
                pkCols.add(rs.getString(4));
            }
        } catch (SQLException e) {
            printCaughtException("In NonVoltDBBackend.getPrimaryKeys, caught SQLException: " + e);
        }
        return pkCols;
    }
543369
@Override
    public <E> List<E> getColumnsById(String schemaName, String tableName, String pKeyColumnName, String columnName,
            Object pKeyColumnValue, Class columnJavaType)
    {
        // search using index on pkey column
        List<E> foreignKeys = new ArrayList<E>();

        Table schemaTable = tableAPI.getTable(tableName);
        Index index = schemaTable.getIndex(pKeyColumnName);
        IndexKey indexKey = index.createIndexKey();

        // StringBuilder indexNamebuilder = new StringBuilder();
        NoSqlDBUtils.add(schemaTable.getField(pKeyColumnName), indexKey, pKeyColumnValue, pKeyColumnName);
        KunderaCoreUtils.printQuery(
                "Get columns by id from:" + tableName + " for column:" + columnName + " where value:" + pKeyColumnValue,
                showQuery);
        Iterator<Row> rowsIter = tableAPI.tableIterator(indexKey, null, null);

        while (rowsIter.hasNext())
        {
            Row row = rowsIter.next();
            FieldDef fieldMetadata = schemaTable.getField(columnName);
            FieldValue value = row.get(columnName);
            foreignKeys.add((E) NoSqlDBUtils.get(fieldMetadata, value, null));
        }

        return foreignKeys;

    }
71686
public static Key[] getColumnNames(Query qry) {
	Query qp = Caster.toQuery(qry, null);

	if (qp != null) return qp.getColumnNames();
	String[] strNames = qry.getColumns();
	Key[] names = new Key[strNames.length];
	for (int i = 0; i < names.length; i++) {
	    names[i] = KeyImpl.getInstance(strNames[i]);
	}
	return names;
    }
990013
public String[] getTypes() {
        String[] types = new String[columns.getColumns().size()];
        for (int i = 0; i < columns.getColumns().size(); i++) {
            types[i] = columns.getColumns().get(i).getType();
        }
        return types;
    }
780489
public function primaryKey()
    {
        if (empty($this->_context['schema']['_constraints']) ||
            !is_array($this->_context['schema']['_constraints'])
        ) {
            return [];
        }
        foreach ($this->_context['schema']['_constraints'] as $data) {
            if (isset($data['type']) && $data['type'] === 'primary') {
                return isset($data['columns']) ? (array)$data['columns'] : [];
            }
        }

        return [];
    }
717290
public Set<String> getRequiredColumns() {
    Set<String> set = new HashSet<String>();
    for (FieldMapping fieldMapping : fieldMappings) {
      if (FieldMapping.MappingType.KEY == fieldMapping.getMappingType()) {
        continue;
      } else if (FieldMapping.MappingType.KEY_AS_COLUMN == fieldMapping.getMappingType()) {
        set.add(fieldMapping.getFamilyAsString() + ":");
      } else {
        set.add(fieldMapping.getFamilyAsString() + ":"
            + fieldMapping.getQualifierAsString());
      }
    }
    return set;
  }
1185200
def get_pk_colnames(table_: Table) -> List[str]:
    
    pk_names = []  # type: List[str]
    for col in table_.columns:
        if col.primary_key:
            pk_names.append(col.name)
    return pk_names
41217
public FieldDescriptor[] getNonPkFields()
    {
        if (m_nonPkFieldDescriptors == null)
        {
            // 1. collect all Primary Key fields from Field list
            Vector vec = new Vector();
            for (int i = 0; i < m_FieldDescriptions.length; i++)
            {
                FieldDescriptor fd = m_FieldDescriptions[i];
                if (!fd.isPrimaryKey())
                {
                    vec.add(fd);
                }
            }
            // 2. Sort fields according to their getOrder() Property
            Collections.sort(vec, FieldDescriptor.getComparator());
            m_nonPkFieldDescriptors =
                (FieldDescriptor[]) vec.toArray(new FieldDescriptor[vec.size()]);
        }
        return m_nonPkFieldDescriptors;
    }
375614
public static List<String> requiredColumns() {
		List<String> requiredColumns = new ArrayList<>();
		requiredColumns.add(COLUMN_BASE_ID);
		requiredColumns.add(COLUMN_RELATED_ID);
		return requiredColumns;
	}
733364
public function getPrimaryKeyColumns()
    {
        $primaryKey = $this->getPrimaryKey();

        if ($primaryKey === null) {
            throw new DBALException('Table ' . $this->getName() . ' has no primary key.');
        }

        return $primaryKey->getColumns();
    }
736365
public Collection<FullColumnDescription> getLocalKeyColumnDescriptions()
    {
        if (localKeys == null)
        {
            localKeys = new LinkedList<>();

            for (FullColumnDescription col : fullColumnDescriptions.values())
            {
                if (col.isLocalKeyMember())
                {
                    this.localKeys.add(col);
                }
            }

            Collections.sort(this.localKeys, LocalKeyComparator.INSTANCE);
        }

        return this.localKeys;
    }
909988
@Override
    public <E> List<E> getColumnsById(String schemaName, String tableName, String pKeyColumnName,
            String inverseJoinColumnName, Object pKeyColumnValue, Class columnJavaType)
    {
        List<E> foreignKeys = new ArrayList<E>();

        URI uri = null;
        HttpResponse response = null;
        try
        {
            String q = "key=" + CouchDBUtils.appendQuotes(pKeyColumnValue);
            uri = new URI(CouchDBConstants.PROTOCOL, null, httpHost.getHostName(), httpHost.getPort(),
                    CouchDBConstants.URL_SEPARATOR + schemaName.toLowerCase() + CouchDBConstants.URL_SEPARATOR
                            + CouchDBConstants.DESIGN + tableName + CouchDBConstants.VIEW + pKeyColumnName, q, null);
            HttpGet get = new HttpGet(uri);
            get.addHeader("Accept", "application/json");
            response = httpClient.execute(get);

            InputStream content = response.getEntity().getContent();
            Reader reader = new InputStreamReader(content);
            JsonObject json = gson.fromJson(reader, JsonObject.class);

            JsonElement jsonElement = json.get("rows");

            if (jsonElement == null)
            {
                return foreignKeys;
            }

            JsonArray array = jsonElement.getAsJsonArray();
            for (JsonElement element : array)
            {
                JsonElement value = element.getAsJsonObject().get("value").getAsJsonObject().get(inverseJoinColumnName);
                if (value != null)
                {
                    foreignKeys.add((E) PropertyAccessorHelper.fromSourceToTargetClass(columnJavaType, String.class,
                            value.getAsString()));
                }
            }
        }
        catch (Exception e)
        {
            log.error("Error while fetching column by id {}, Caused by {}.", pKeyColumnValue, e);
            throw new KunderaException(e);
        }
        finally
        {
            closeContent(response);
        }
        return foreignKeys;
    }
1110524
public String[] getColumnsBySql(Sql sql) throws SQLException {
		String columns[] = null;
		
		List<Map<String, String>> table = getMetadataBySql(sql);
		if (table != null) {
			columns = new String[table.size()];
			for (int i = 0 ; i < table.size() ; i++) {
				Map<String, String> row = table.get(i);
				if (row.containsKey("NAME") && row.get("NAME") != null) {
					columns[i] = row.get("NAME");
				}
			}
		}
		
		return columns;
	}
271491
public int getCols() {
        return (java.lang.Integer) getStateHelper().eval(PropertyKeys.cols, Integer.MIN_VALUE);

    }
1190705
public function getPrimaryKey()
    {
        $pk = [];
        foreach ($this->columns as $col) {
            if ($col->isPrimaryKey()) {
                $pk[] = $col;
            }
        }

        return $pk;
    }
689909
public List<ColumnResult<ConstructorResult<T>>> getAllColumn()
   {
      List<ColumnResult<ConstructorResult<T>>> list = new ArrayList<ColumnResult<ConstructorResult<T>>>();
      List<Node> nodeList = childNode.get("column");
      for(Node node: nodeList)
      {
         ColumnResult<ConstructorResult<T>>  type = new ColumnResultImpl<ConstructorResult<T>>(this, "column", childNode, node);
         list.add(type);
      }
      return list;
   }