Return the primary keys as a list.

        The only valid call is values_list('pk', flat=True)
193516
def values_list(self, *args, **kwargs):
        
        flat = kwargs.pop('flat', False)
        assert flat is True
        assert len(args) == 1
        assert args[0] == self.model._meta.pk.name
        return self.pks
620751
def d2kvlist(d):
    '''
        
    '''
    kl = list(d.keys())
    vl = list(d.values())
    return((kl,vl))
1062029
def primary_keys_for(self, cls: ClassDefinition) -> List[SlotDefinitionName]:
        
        return [slot_name for slot_name in self.all_slots_for(cls)
                if self.schema.slots[slot_name].primary_key or self.schema.slots[slot_name].identifier]
1276665
def pk_names(cls):
        
        if cls._cache_pk_names is None:
            cls._cache_pk_names = cls._get_primary_key_names()
        return cls._cache_pk_names
171078
def lists(self, value, key=None):
        
        results = map(lambda x: x[value], self._items)

        return list(results)
466635
def key_list(items=None):
    '''
    
    '''
    if items is None:
        items = []

    ret = {}
    if items and isinstance(items, list):
        for item in items:
            if 'name' in item:
                # added for consistency with old code
                if 'id' not in item:
                    item['id'] = item['name']
                ret[item['name']] = item
    return ret
641274
def get_list(self):
        
        result = []

        for key, value in self.parameters.items():

            if value is None:
                continue

            if not isinstance(value, list):
                value = [value]

            if len(key) == 1:
                string_key = '-{}'.format(key)
            else:
                string_key = '--{}'.format(key)

            for sub_value in value:

                if isinstance(sub_value, bool) and sub_value is False:
                    continue

                result.append(string_key)

                if not isinstance(sub_value, bool):
                    if ' ' in sub_value:
                        string_value = "'{}'".format(sub_value)
                    else:
                        string_value = sub_value

                    result.append(str(string_value))

        return result
356089
def get_flattened_bsp_keys_from_schema(schema):
    
    keys = []

    for key in schema.declared_fields.keys():
        field = schema.declared_fields[key]

        if isinstance(field, mm.fields.Nested) and \
                isinstance(field.schema, BoundSpatialPoint):
            keys.append("{}.{}".format(key, "position"))

    return keys
99565
protected function fetchPrimaryKeys(): array
    {
        $primaryKeys = [];
        foreach ($this->columnSchemas() as $column) {
            if (!empty($column['pk'])) {
                $primaryKeys[] = $column['name'];
            }
        }

        return $primaryKeys;
    }
222761
def get_pks(self, field_vals):
        """"""
        field_name = self.schema.pk.name
        return self.in_field(field_name, field_vals).get()
234631
def get_keys(self, lst):
        
        pk_name = self.get_pk_name()
        if self.is_pk_composite():
            return [[getattr(item, pk) for pk in pk_name] for item in lst]
        else:
            return [getattr(item, pk_name) for item in lst]
350247
def gets(self, key):
        ""
        result_list = []
        if key in self.keys():
            result_list.append(self[key])
        for v in self.values():
            if isinstance(v, self.__class__):
                sub_res_list = v.gets(key)
                for res in sub_res_list:
                    result_list.append(res)
            elif isinstance(v, dict):
                if key in v.keys():
                    result_list.append(v[key])
        return result_list
1012030
def list_of_list(self):
        
        ret = [[row.get(key, '') for key in self._col_names] for row in self]
        return ReprListList(ret, col_names=self._col_names,
                            col_types=self._col_types,
                            width_limit=self._width_limit,
                            digits=self._digits,
                            convert_unicode=self._convert_unicode)
1209977
def values_list(
        self, *fields_: str, flat: bool = False
    ) -> "ValuesListQuery":  # pylint: disable=W0621
        
        return ValuesListQuery(
            db=self._db,
            model=self.model,
            q_objects=self._q_objects,
            flat=flat,
            fields_for_select_list=fields_,
            distinct=self._distinct,
            limit=self._limit,
            offset=self._offset,
            orderings=self._orderings,
            annotations=self._annotations,
            custom_filters=self._custom_filters,
        )
217817
def list_keys(self):
    
    return [k for k, el in self._keystore.items() if not el.is_expired]
960776
def qdict_get_list(qdict, k):
    
    pks = qdict.getlist(k)
    return [e for e in pks if e]
866535
def keys(self, index=None):
        
        with self._lmdb.begin() as txn:
            return [key.decode() for key, _ in txn.cursor()]