add key, value, type combination of a predicate

        :param key: query KEY parameter
        :param value: the value used in the predicate
        :param predicate_type: the type of predicate (e.g. ``equals``)
356493
def add_predicate(self, key, value, predicate_type='equals'):
        
        if predicate_type not in operators:
            predicate_type = operator_lkup.get(predicate_type)
        if predicate_type:
            self.predicates.append({'type': predicate_type,
                                    'key': key,
                                    'value': value
                                    })
        else:
            raise Exception("predicate type not a valid operator")
458335
public AmqpTable addInteger(String key, int value) {
        this.add(key, value, AmqpType.INT);
        return this;
    }
1100446
def parse_value(type: str, val: str):
    
    if type.upper() in PARSER_MAP:
        #prep_val = prepare_value(val)
        out = PARSER_MAP[type](val)
        log.debug('For {} entered {}, got {} out'.format(type, val, out))
        return out
    else:
        raise ObdPidParserUnknownError(type, val)
1110021
private void add(TreeMap<String, Object> map, String key, Object value) {
		// ZAP: Added the type argument.
	    Vector<Object> v = getList(map, key);
	    if (v == null) {
	    	// ZAP: Added the type argument.
	        v = new Vector<>();
	        synchronized (map) {
	            map.put(key, v);
	        }
	    }
	    if (!v.contains(value)) {
	        v.add(value);
	    }

	}
363921
function _parse_predicate_key(Type, opts, key) {
	opts = opts || {};

	debug.assert(key).is('string');

	if(key[0] !== '$') {
		var datakey = get_predicate_datakey(Type);
		//return new Predicate( "json_extract_path("+datakey+", '"+JSON.stringify([key])+"'::json->>0)::text", [], {'datakey': datakey, 'key': key});
		return new Predicate( parse_keyref_json(datakey, key), [], {'datakey': datakey, 'key': key});
	}

	var _key = key.substr(1);

	if( (opts.epoch === true) && ( (key === '$created') || (key === '$modified') ) ) {
		//return new Predicate("to_json(extract(epoch from "+_key+")*1000)", [], {'key':_key});
		return new Predicate("extract(epoch from "+_key+")*1000", [], {'key':_key});
	}

	if(key === '$documents') {
		var traits = (opts && opts.traits) || {};
		var documents = (traits && traits.documents) || [];
		debug.assert(documents).is('array');
		return new Predicate("get_documents(row_to_json("+(Type.meta.table)+".*), $::json)", [
			JSON.stringify(parse_predicate_document_relations(Type, documents, traits))
		], {'key':_key});
	}

	return new Predicate(_key, [], {'key':_key});
}
275331
def add_predicate(self, predicate):
        
        _predicate = predicate
        if isinstance(predicate, partial):
            _predicate = 'partial(%s, %s, %s)' % (predicate.func, predicate.args, predicate.keywords)
        if LOG_OPTS['register']:
            hookenv.log('  Adding predicate for %s: %s' % (self.id(), _predicate), level=hookenv.DEBUG)
        self._predicates.append(predicate)
623683
def add_input(self, in_name, type_or_parse=None):
        
        if type_or_parse is None:
            type_or_parse = GenericType()
        elif not isinstance(type_or_parse, GenericType) and callable(type_or_parse):
            type_or_parse = GenericType(parse=type_or_parse)
        elif not isinstance(type_or_parse, GenericType):
            raise ValueError("the given 'type_or_parse' is invalid")
        self._inputs[in_name] = type_or_parse
597737
def add(self, key, value):
        
        if isinstance(value, list):
            # TODO: support env vars in list w/masked values
            for val in value:
                self._add_arg_python(key, val)
        elif isinstance(value, dict):
            err = 'Dictionary types are not currently supported for field.'
            print('{}{}{}'.format(c.Style.BRIGHT, c.Fore.RED, err))
        else:
            mask = False
            env_var = re.compile(r'^\$env\.(.*)$')
            envs_var = re.compile(r'^\$envs\.(.*)$')

            if env_var.match(str(value)):
                # read value from environment variable
                env_key = env_var.match(str(value)).groups()[0]
                value = os.environ.get(env_key, value)
            elif envs_var.match(str(value)):
                # read secure value from environment variable
                env_key = envs_var.match(str(value)).groups()[0]
                value = os.environ.get(env_key, value)
                mask = True
            self._add_arg(key, value, mask)
583431
def set (self, id, param, value):
        
        assert isinstance(id, basestring)
        assert isinstance(param, basestring)
        assert is_iterable_typed(value, basestring)
        self.params_.setdefault(param, {})[id] = value
17505
def set_entry(key, value):
    
    if type(key) != str:
        raise KeyError('key must be str')
    _config[key] = value
681659
def append_query(param, value)
      @query_map[param] = [] unless @query_map.key?(param)
      @query_map[param] = [@query_map[param], value].flatten
    end
172121
def _handle_key_value(t_dict, key, value):
    
    if key in t_dict:
        val = t_dict[key]
        if isinstance(val, str):
            val = [val]
        val.append(value)
        return val
    return value
456494
function parse_predicate_pgcast_by_type(pgtype) {
	//debug.log('pgtype = ', pgtype);
	if(is.func(_pgcasts[pgtype])) {
		return _pgcasts[pgtype];
	}
	return function pgcast_default(x) { return '' + x + '::' + pgtype; };
}
1275185
def insert(self, key, value):
    """"""
    self._values.insert(key, self._type_checker.CheckValue(value))
    if not self._message_listener.dirty:
      self._message_listener.Modified()
389373
public function addTypedKeyValue($type, $key, $value)
    {
        if(empty($this->_data[$type]))
            $this->_data[$type] = array();
        $this->_data[$type][$key] = $value;
    }
155156
public void add(Object key, Object value) {
        Object existing = mMap.get(key);
        if (existing instanceof List) {
            if (value instanceof List) {
                ((List)existing).addAll((List)value);
            }
            else {
                ((List)existing).add(value);
            }
        }
        else if (existing == null && !mMap.containsKey(key)) {
            if (value instanceof List) {
                mMap.put(key, new ArrayList((List)value));
            }
            else {
                mMap.put(key, value);
            }
        }
        else {
            List list = new ArrayList();
            list.add(existing);
            if (value instanceof List) {
                list.addAll((List)value);
            }
            else {
                list.add(value);
            }
            mMap.put(key, list);
        }
    }
238476
def _parse_typed_parameter_typed_value(values):
    '''
    
    '''
    type_, value = _expand_one_key_dictionary(values)

    _current_parameter_value.type = type_
    if _is_simple_type(value):
        arg = Argument(value)
        _current_parameter_value.add_argument(arg)
    elif isinstance(value, list):
        for idx in value:
            arg = Argument(idx)
            _current_parameter_value.add_argument(arg)