Get the primary key command it it exists.
336459
def _get_command_by_name(self, blueprint, name):
        
        commands = self._get_commands_by_name(blueprint, name)

        if len(commands):
            return commands[0]
1007997
def primary_keys(self):
        """"""
        res = []
        for column in self.column_definitions:
            if 'primary_key' in column.keys():
                tmp = column.get('primary_key', None)
                res.append(column['name']) if tmp else False
        return res
1138182
def primary_key_field(self):
        
        return [field for field in self.instance._meta.fields if field.primary_key][0]
252076
def command_getkeys(self, command, *args, encoding='utf-8'):
        """"""
        return self.execute(b'COMMAND', b'GETKEYS', command, *args,
                            encoding=encoding)
1137928
def get_command(self, version=2):
        """"""
        try:
            options = _C['options']
            options_str = " -o ".join(options)
            if options_str:
                options_str = "-o " + options_str + " "
        except KeyError:
            options_str = ""

        if self.username:
            # Not supported on SunOS
            # "-o ConnectTimeout={}
            command = "ssh {}" \
                      "-{} " \
                      "-p {} {}@{}".format(options_str, version, self.port, self.username, self.hostname)
        else:
            command = "ssh {} " \
                      "-{} " \
                      "-p {} {}".format(options_str, version, self.port, self.hostname)
        return command
1156492
def _get_pkey(self):
        """"""
        keypath = self.config.server["pkey"]
        with open(os.path.expanduser(keypath)) as f:
            pkey = paramiko.RSAKey.from_private_key(f)

        return pkey
77282
def get_single_key(d):
    """"""
    assert len(d) == 1, 'Single-item dict must have just one item, not %d.' % len(d)
    return next(six.iterkeys(d))
652280
def set_primary_key_auto(self, table):
        
        # Confirm no primary key exists
        pk = self.get_primary_key(table)
        if not pk:
            # Determine if there is a unique column that can become the PK
            unique_col = self.get_unique_column(table)

            # Set primary key
            if unique_col:
                self.set_primary_key(table, unique_col)

            # Create unique 'ID' column
            else:
                unique_col = self.add_column(table, primary_key=True)
            return unique_col
        else:
            return pk
600203
protected function _getPrimaryKey()
    {
        if (!$this->_primaryKey) {
            $primaryKey = (array)$this->_table->getPrimaryKey();
            $this->_primaryKey = $primaryKey[0];
        }

        return $this->_primaryKey;
    }
260325
@Override
    public boolean existsById(ID primaryKey) {
        Assert.notNull(primaryKey, "primaryKey should not be null");

        return findById(primaryKey).isPresent();
    }
1155599
def get_from_human_key(self, key):
        """"""
        if key in self._identifier_map:
            return self._identifier_map[key]
        raise KeyError(key)
207033
def get_command(name):
    ''''''
    command = global_commands_table.get(name.lower())
    if not command:
        raise CommandNotFound(name)
    return command
1238874
def _get_key_value(self, key, is_hll=False):
        '''
        
        '''
        if is_hll:
            # get hll value
            return self.redis_conn.execute_command("PFCOUNT", key)
        else:
            # get zcard value
            return self.redis_conn.zcard(key)
568321
def _getID(self):
        """"""
        id = []
        for key in self._sqlPrimary:
            value = self.__dict__[key]
            if isinstance(value, Forgetter):
                # It's another object, we store only the ID
                if value._new:
                    # It's a new object too, it must be saved!
                    value.save()
                try:
                    (value,) = value._getID()
                except:
                    raise "Unsupported: Part %s of %s primary key is a reference to %s, with multiple-primary-key %s " % (key, self.__class__, value.__class__, value)
            id.append(value)
        return id
1163942
private static void getPrimaryKey(DatabaseMetaData md, DatabaseRelationDefinition relation, QuotedIDFactory idfac) throws SQLException {
		RelationID id = relation.getID();
		// Retrieves a description of the given table's primary key columns. They are ordered by COLUMN_NAME (sic!)
		try (ResultSet rs = md.getPrimaryKeys(null, id.getSchemaName(), id.getTableName())) {
			extractPrimaryKey(relation, idfac, id, rs);
		} catch (SQLSyntaxErrorException e) {
		    // WORKAROUND for MySQL connector >= 8.0:
            // <https://github.com/ontop/ontop/issues/270>
            try (ResultSet rs = md.getPrimaryKeys(id.getSchemaName(), null, id.getTableName())) {
                extractPrimaryKey(relation, idfac, id, rs);
            }
		}
	}
433899
def get(self, key, subcommand="config:get"):
        """"""
        cmd = ["heroku", subcommand, key, "--app", self.name]
        return self._result(cmd)
128267
public static int getIntValue(String primaryKey) {
        Object val = CFG.get(primaryKey);
        if (val == null) {
            throw new SofaRpcRuntimeException("Not found key: " + primaryKey);
        } else {
            return Integer.parseInt(val.toString());
        }
    }