public function set($key, string $value = '', bool $escape = null)
	{
		$key = $this->objectToArray($key);

		if (! is_array($key))
		{
			$key = [$key => $value];
		}

		$escape = is_bool($escape) ? $escape : $this->db->protectIdentifiers;

		foreach ($key as $k => $v)
		{
			if ($escape)
			{
				$bind = $this->setBind($k, $v, $escape);
				$this->QBSet[$this->db->protectIdentifiers($k, false, $escape)] = ":$bind:";
			}
			else
			{
				$this->QBSet[$this->db->protectIdentifiers($k, false, $escape)] = $v;
			}
		}

		return $this;
	}
public function set($key, string $value = '', bool $escape = null)
	{
		$key = $this->objectToArray($key);

		if (! is_array($key))
		{
			$key = [$key => $value];
		}

		$escape = is_bool($escape) ? $escape : $this->db->protectIdentifiers;

		foreach ($key as $k => $v)
		{
			if ($escape)
			{
				$bind = $this->setBind($k, $v, $escape);
				$this->QBSet[$this->db->protectIdentifiers($k, false, $escape)] = ":$bind:";
			}
			else
			{
				$this->QBSet[$this->db->protectIdentifiers($k, false, $escape)] = $v;
			}
		}

		return $this;
	}
public function set ( $ key , string $ value = '' , bool $ escape = null ) { $ key = $ this -> objectToArray ( $ key ) ; if ( ! is_array ( $ key ) ) { $ key = [ $ key => $ value ] ; } $ escape = is_bool ( $ escape ) ? $ escape : $ this -> db -> protectIdentifiers ; foreach ( $ key as $ k => $ v ) { if ( $ escape ) { $ bind = $ this -> setBind ( $ k , $ v , $ escape ) ; $ this -> QBSet [ $ this -> db -> protectIdentifiers ( $ k , false , $ escape ) ] = ":$bind:" ; } else { $ this -> QBSet [ $ this -> db -> protectIdentifiers ( $ k , false , $ escape ) ] = $ v ; } } return $ this ; }
The "set" function.

Allows key/value pairs to be set for insert(), update() or replace().

@param string|array|object $key    Field name, or an array of field/value pairs
@param string              $value  Field value, if $key is a single field
@param boolean             $escape Whether to escape values and identifiers

@return BaseBuilder
The set function .