redis key: records:tablename: id1 | id2 | id3...
eg: the user has three primarykeys id1=1,id2=2,id3=3, so the redisKey is 'records:user:1|2|3'.
@return redis key
364
private String redisKey(ModelExt<?> m) {
		Table table = m.table();
		StringBuilder key = new StringBuilder();
		key.append(RECORDS);
		key.append(table.getName());
		key.append(":");
		//fetch primary keys' values
		String[] primaryKeys = table.getPrimaryKey();
		//format key
		for (int idx = 0; idx < primaryKeys.length; idx++) {
			Object primaryKeyVal = m.get(primaryKeys[idx]);
			if (null != primaryKeyVal) {
				if (idx > 0) {
					key.append("|");
				}
				key.append(primaryKeyVal);
			}
		}
		return key.toString();
	}
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;
    }
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]
357208
def primary_key(self):
    
    pkname = self.primary_key_name
    if pkname is None:
      return None
    elif isinstance(pkname, str):
      return getattr(self, pkname)
    else:
      return tuple((getattr(self, pkn) for pkn in pkname))
1239822
private String incrementAlias(KeyStore jKeyStore, String alias) throws KeyStoreException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "incrementAlias: " + alias);

        int num = 0;
        String base;
        int index = alias.lastIndexOf('_');
        if (-1 == index) {
            // no underscore found
            base = alias + '_';
        } else if (index == (alias.length() - 1)) {
            // alias ends with underscore
            base = alias;
        } else {
            // alias ends with _X where X might be a number...
            try {
                ++index; // jump past the underscore
                num = Integer.parseInt(alias.substring(index));
                base = alias.substring(0, index);
            } catch (NumberFormatException nfe) {
                // not a number
                base = alias + '_';
            }
        }
        String newAlias = base + Integer.toString(++num);
        while (jKeyStore.containsAlias(newAlias)) {
            newAlias = base + Integer.toString(++num);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "incrementAlias: " + newAlias);
        return newAlias;
    }
36356
def get_all_storage_keys(self):
        

        parts1 = [
            self.model._name,
            self.field.name,
        ]

        parts2 = parts1 + ['*']  # for indexes taking args, like for hashfields

        if self.prefix:
            parts1.append(self.prefix)
            parts2.append(self.prefix)

        if self.key:
            parts1.append(self.key)
            parts2.append(self.key)

        parts1.append('*')
        parts2.append('*')

        return set(
            self.model.database.scan_keys(self.field.make_key(*parts1))
        ).union(
            set(
                self.model.database.scan_keys(self.field.make_key(*parts2))
            )
        )
725125
protected function hitRedis()
    {
        $lua = 'local v = redis.call(\'incr\', KEYS[1]) '.
               'if v>1 then return v '.
               'else redis.call(\'setex\', KEYS[1], ARGV[1], 1) return 1 end';

        $this->number = $this->store->connection()->eval($lua, 1, $this->computeRedisKey(), $this->time * 60);

        return $this;
    }
1332436
public com.google.privacy.dlp.v2.BigQueryKey getBigQueryKey() {
    if (typeCase_ == 3) {
      return (com.google.privacy.dlp.v2.BigQueryKey) type_;
    }
    return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance();
  }
694621
public Key getKey()
    {
        final Key ret = new Key().setPersonId(getPersonId())
                        .setCompanyId(getCompanyId())
                        .setTypeId(getTypeId());
        return ret;
    }
459156
def _get_key_redis_key(bank, key):
    '''
    
    '''
    opts = _get_redis_keys_opts()
    return '{prefix}{separator}{bank}/{key}'.format(
        prefix=opts['key_prefix'],
        separator=opts['separator'],
        bank=bank,
        key=key
    )
802760
function getKeyDetailsString (key, redisConnection, data, next) {
  redisConnection.get(key, function (err, val) {
    if (err) {
      api.log('getRedisString: ' + err, 'error');
    }

    var details = {
      key: key,
      type: 'string',
      value: val
    };
    
    data.response.details = details;
    next();
  });
}
1028545
public String getKeyType(UniqueKeyDefinition key){
        String tType;

        List<ColumnDefinition> keyColumns = key.getKeyColumns();

        if (keyColumns.size() == 1) {
            tType = getJavaType(keyColumns.get(0).getType());
        }
        else if (keyColumns.size() <= Constants.MAX_ROW_DEGREE) {
            String generics = "";
            String separator = "";

            for (ColumnDefinition column : keyColumns) {
                generics += separator + (getJavaType(column.getType()));
                separator = ", ";
            }

            tType = Record.class.getName() + keyColumns.size() + "<" + generics + ">";
        }
        else {
            tType = Record.class.getName();
        }

        return tType;
    }
805990
def llen(self, name):
        
        with self.pipe as pipe:
            return pipe.llen(self.redis_key(name))
601793
def _get_redis_keys_opts():
    '''
    
    '''
    return {
        'bank_prefix': __opts__.get('cache.redis.bank_prefix', _BANK_PREFIX),
        'bank_keys_prefix': __opts__.get('cache.redis.bank_keys_prefix', _BANK_KEYS_PREFIX),
        'key_prefix': __opts__.get('cache.redis.key_prefix', _KEY_PREFIX),
        'separator': __opts__.get('cache.redis.separator', _SEPARATOR)
    }
603489
def primary_key_attributes(self):
        
        if self.range_key is None:
            return (self.hash_key.name,)
        else:
            return (self.hash_key.name, self.range_key.name)
248416
protected String[] getKeysFromResultSet() throws SQLException {

        String[] keys;
        final ResultSetMetaData md = _resultSet.getMetaData();
        final int columnCount = md.getColumnCount();

        keys = new String[columnCount + 1];
        for (int i = 1; i <= columnCount; i++) {
            keys[i] = md.getColumnName(i).toUpperCase();
        }
        return keys;
    }
1265006
def keys_with_ttl(pattern = SCAN_PATTERN, count = DEFAULT_COUNT)
      hash = {}
      redis do |conn|
        conn.scan_each(match: prefix(pattern), count: count).each do |key|
          hash[key] = conn.ttl(key)
        end
      end
      hash
    end