@see AdapterInterface::bindValue()

@param \PDOStatement $stmt
@param string        $parameter
@param mixed         $value
@param ColumnMap     $cMap
@param null|integer  $position

@return boolean
176169
public function bindValue(\PDOStatement $stmt, $parameter, $value, ColumnMap $cMap, $position = null)
    {
        if (PropelTypes::CLOB_EMU === $cMap->getType()) {
            return $stmt->bindParam(':p'.$position, $value, $cMap->getPdoType(), strlen($value));
        }

        if ($cMap->isTemporal()) {
            $value = $this->formatTemporalValue($value, $cMap);
        } elseif (is_resource($value) && $cMap->isLob()) {
            // we always need to make sure that the stream is rewound, otherwise nothing will
            // get written to database.
            rewind($value);
        }

        return $stmt->bindValue($parameter, $value, $cMap->getPdoType());
    }
784557
public function set( $key, $value, $param = null ) 
	{
		if ( $param === true )
		{
			$value = CCStr::htmlentities( $value );
		}
		
		return CCArr::set( $key, $value, $this->_data );
	}
116062
private function bind($position, &$variable, int $parameterType, int $dataType) : void
    {
        $this->bindParam[$position] =& $variable;

        if (! db2_bind_param($this->stmt, $position, 'variable', $parameterType, $dataType)) {
            throw new DB2Exception(db2_stmt_errormsg());
        }
    }
254625
public function execute($stmt, $clearBindParams = true)
    {
        foreach ($this->bindParams as $key => $val) {
            is_int($val) ? $stmt->bindValue(':param' . $key, $val, \PDO::PARAM_INT) : $stmt->bindValue(':param' . $key, $val, \PDO::PARAM_STR);
        }

        //empty($param) && $param = $this->bindParams;
        $this->conf['log_slow_sql'] && $startQueryTimeStamp = microtime(true);
        if (!$stmt->execute()) {
            $error = $stmt->errorInfo();
            throw new \InvalidArgumentException('Pdo execute Sql error!,【Sql : ' . $this->buildDebugSql() . '】,【Error:' . $error[2] . '】');
        }

        $slow = 0;
        if ($this->conf['log_slow_sql']) {
            $queryTime = microtime(true) - $startQueryTimeStamp;
            if ($queryTime > $this->conf['log_slow_sql']) {
                if (Plugin::hook('cml.mysql_query_slow', ['sql' => $this->buildDebugSql(), 'query_time' => $queryTime]) !== false) {
                    Log::notice('slow_sql', ['sql' => $this->buildDebugSql(), 'query_time' => $queryTime]);
                }
                $slow = $queryTime;
            }
        }

        if (Cml::$debug) {
            $this->debugLogSql($slow > 0 ? Debug::SQL_TYPE_SLOW : Debug::SQL_TYPE_NORMAL, $slow);
        }

        $this->currentQueryIsMaster = true;
        $this->currentSql = '';
        $clearBindParams && $this->clearBindParams();
        return true;
    }
1185445
private static String stmtAssignSqlParams(PreparedStatement stmt, List<SqlParam> sqlParams) throws SQLException {
		String cursorParam = null;
		if (sqlParams == null)
			return null;

		CallableStatement cstmt = null;
		if (stmt instanceof CallableStatement) {
			cstmt = (CallableStatement) stmt;
		}

		int pos = 0;
		for (SqlParam param : sqlParams) {
			pos++;
			boolean isPositionalParam = (param.code == null); // named vs positional param
			if (param.type == null)
				throw new SQLDataException("Please provide parameter type for param.code='" + param.code + "' pos=" + pos);
			if (isPositionalParam == false && cstmt == null)
				throw new SQLDataException("To use named params, need to use CallableStatement (param.code='" + param.code + "' pos=" + pos + ")");

			switch (param.type) {
				case CURSOR:
					if (cstmt == null)
						throw new SQLDataException("Param type CURSOR is not allowed for preparedStatement");
					cursorParam = param.code;
					if (param.code == null)
						cstmt.registerOutParameter(pos, JetJdbcParamType.CURSOR.oracleId);
					else
						cstmt.registerOutParameter(param.code, JetJdbcParamType.CURSOR.oracleId);
					break;
				case STRING:
					if (isPositionalParam)
						stmt.setString(pos, param.value == null ? null : param.value.toString());
					else
						cstmt.setString(param.code, param.value == null ? null : param.value.toString());
					break;
				case INTEGER: case LONG:
					if (param.value == null) {
						if (isPositionalParam)
							stmt.setNull(pos, Types.BIGINT);
						else
							cstmt.setNull(param.code, Types.BIGINT);
					} else {
						long val = 0;
						if (param.value.getClass().isAssignableFrom(Integer.class)) {
							val = (Integer) param.value;
						} else {
							val = (Long) param.value;
						}
						if (isPositionalParam)
							stmt.setLong(pos, val);
						else
							cstmt.setLong(param.code, val);
					}
					break;
				case TIMESTAMP:
					Date date1 = (Date) param.value;
					if (isPositionalParam)
						stmt.setTimestamp(pos, param.value == null ? null : new Timestamp(date1.getTime()));
					else
						cstmt.setTimestamp(param.code, param.value == null ? null : new Timestamp(date1.getTime()));
					break;
				case DATE:
					Date date2 = (Date) param.value;
					if (isPositionalParam)
						stmt.setDate(pos, param.value == null ? null : new java.sql.Date(date2.getTime()));
					else
						cstmt.setDate(param.code, param.value == null ? null : new java.sql.Date(date2.getTime()));
					break;
				case BLOB:
					if (param.value == null) {
						if (isPositionalParam)
							stmt.setBlob(pos, new ByteArrayInputStream(new byte[0]));
						else
							cstmt.setBlob(param.code, new ByteArrayInputStream(new byte[0]));
					} else {
						byte[] bytes = (byte[]) param.value;
						if (isPositionalParam)
							stmt.setBlob(pos, new ByteArrayInputStream(bytes), (int) bytes.length);
						else
							cstmt.setBlob(param.code, new ByteArrayInputStream(bytes), (int) bytes.length);
					}
					break;
				default:
					throw new IllegalStateException("Data type '" + param.type.toString() + "' is not supported yet");
			}
		}
		return cursorParam;
	}
589021
public function bindValue(string $param, $value, int $type = null)
    {
        if (is_null($type)) {
            switch (true) {
                case is_int($value):
                    $type = \PDO::PARAM_INT;
                    break;
                case is_bool($value):
                    $type = \PDO::PARAM_BOOL;
                    break;
                case is_null($value):
                    $type = \PDO::PARAM_NULL;
                    break;
                default:
                    $type = \PDO::PARAM_STR;
            }
        }
        
        if (is_array($value)) {
            $value = implode(', ', $value);
        }
        
        $this->stmt->bindValue($param, $value, $type);
    }
903184
protected void bind(EbeanQueryWrapper query, Parameter parameter, Object value, int position) {
        if (parameter.isNamedParameter()) {
            query.setParameter(parameter.getName().get(), value);
        } else {
            query.setParameter(position, value);
        }
    }
983476
public final void setParameter(int position, Object value) {
        if (isNative()) {
            bindParameters.add(new BindParameter(position, value));
        } else {
            setParameterValue("?" + position, value);
        }

        parametersMap.put("?" + position, value);
    }
505159
public function whereHas($parameter, $value)
    {
        if (! $this->verify($parameter, $value)) {
            return true;
        }

        $this->search = $this->search
            ->whereHas($parameter, function ($query) use ($value) {
                $query->where('rbac_roles.id', $value);
            });
    }
1106301
public function bindValue($parameter, $value, $data_type = PDO::PARAM_STR)
    {
        $this->bindings->push(
            $this->wye->makeBinding($parameter, $value, $data_type)
        );

        return true;
    }
915632
public function bindValue($param, $value, $type=null)
    {
        $ok = false;
        try {
            $param = $this->_getBindVar($param);
            if (PDO::PARAM_LOB == $type) {
                $lob = \oci_new_descriptor($this->_con, \OCI_D_LOB);
                $ok  = \oci_bind_by_name($this->_stmt, $param, $lob, -1, \OCI_B_BLOB);
                $this->_bindsLob[$param] = array(
                    'lob'   => $lob,
                    'value' => $value,
                );
            } else {
                $ok = \oci_bind_by_name($this->_stmt, $param, $value);
                $this->_binds[$param] = $value;
            }
        } catch (\Exception $e) {
            throw new \PDOException($e->getMessage());
        }
        return $ok;
    }
859881
protected function bindValues(\PDOStatement $statement, array $values)
    {
        $number = 1;

        foreach ($values as $name => $value) {
            $this->bindValue($statement, is_string($name) ? $name : $number, $value);
            $number += 1;
        }
    }
1051612
public function bind($para, $value)
    {
        if (is_string($para)) {
            $this->parameters[sizeof($this->parameters)] = ":" . $para . "\x7F" . $value;
        } else {
            $this->parameters[sizeof($this->parameters)] = $para . "\x7F" . $value;
        }
    }
842464
public static function makeBinding(
        $parameter,
        $value,
        $data_type = PDO::PARAM_STR
    ) {
        $binding = new Binding(new static, $parameter, $value, $data_type);
        return $binding;
    }
1262980
public static PreparedStatement bindParams(PreparedStatement pstm, Object... bindValues)
            throws SQLException {
        if (bindValues != null)
            for (int i = 0; i < bindValues.length; i++) {
                Object value = bindValues[i];
                if (value instanceof Boolean) {
                    pstm.setBoolean(i + 1, (Boolean) value);
                } else if (value instanceof Character || value instanceof String) {
                    pstm.setString(i + 1, value.toString());
                } else if (value instanceof Byte) {
                    pstm.setByte(i + 1, (Byte) value);
                } else if (value instanceof Short) {
                    pstm.setShort(i + 1, (Short) value);
                } else if (value instanceof Integer) {
                    pstm.setInt(i + 1, (Integer) value);
                } else if (value instanceof Long) {
                    pstm.setLong(i + 1, (Long) value);
                } else if (value instanceof BigInteger) {
                    pstm.setLong(i + 1, ((BigInteger) value).longValue());
                } else if (value instanceof Float) {
                    pstm.setFloat(i + 1, (Float) value);
                } else if (value instanceof Double) {
                    pstm.setDouble(i + 1, (Double) value);
                } else if (value instanceof BigDecimal) {
                    pstm.setBigDecimal(i + 1, (BigDecimal) value);
                } else if (value instanceof java.sql.Date) {
                    pstm.setDate(i + 1, (java.sql.Date) value);
                } else if (value instanceof java.sql.Time) {
                    pstm.setTime(i + 1, (java.sql.Time) value);
                } else if (value instanceof java.sql.Timestamp) {
                    pstm.setTimestamp(i + 1, (java.sql.Timestamp) value);
                } else if (value instanceof Date) {
                    pstm.setTimestamp(i + 1, new Timestamp(((Date) value).getTime()));
                } else if (value instanceof Blob) {
                    pstm.setBlob(i + 1, (Blob) value);
                } else if (value instanceof Clob) {
                    pstm.setClob(i + 1, (Clob) value);
                } else if (value instanceof byte[]) {
                    pstm.setBytes(i + 1, (byte[]) value);
                } else {
                    pstm.setObject(i + 1, value);
                }
            }
        return pstm;
    }

    /**
     * Bind parameter values to a {@link CallableStatement}.
     * 
     * @param cstm
     * @param bindValues
     * @return
     * @since 0.8.2
     * @throws SQLException
     */
    public static PreparedStatement bindParams(CallableStatement cstm, Object... bindValues)
            throws SQLException {
        if (bindValues != null)
            for (int i = 0; i < bindValues.length; i++) {
                Object value = bindValues[i];
                if (value instanceof Boolean) {
                    cstm.setBoolean(i + 1, (Boolean) value);
                } else if (value instanceof Character || value instanceof String) {
                    cstm.setString(i + 1, value.toString());
                } else if (value instanceof Byte) {
                    cstm.setByte(i + 1, (Byte) value);
                } else if (value instanceof Short) {
                    cstm.setShort(i + 1, (Short) value);
                } else if (value instanceof Integer) {
                    cstm.setInt(i + 1, (Integer) value);
                } else if (value instanceof Long) {
                    cstm.setLong(i + 1, (Long) value);
                } else if (value instanceof BigInteger) {
                    cstm.setLong(i + 1, ((BigInteger) value).longValue());
                } else if (value instanceof Float) {
                    cstm.setFloat(i + 1, (Float) value);
                } else if (value instanceof Double) {
                    cstm.setDouble(i + 1, (Double) value);
                } else if (value instanceof BigDecimal) {
                    cstm.setBigDecimal(i + 1, (BigDecimal) value);
                } else if (value instanceof java.sql.Date) {
                    cstm.setDate(i + 1, (java.sql.Date) value);
                } else if (value instanceof java.sql.Time) {
                    cstm.setTime(i + 1, (java.sql.Time) value);
                } else if (value instanceof java.sql.Timestamp) {
                    cstm.setTimestamp(i + 1, (java.sql.Timestamp) value);
                } else if (value instanceof Date) {
                    cstm.setTimestamp(i + 1, new Timestamp(((Date) value).getTime()));
                } else if (value instanceof Blob) {
                    cstm.setBlob(i + 1, (Blob) value);
                } else if (value instanceof Clob) {
                    cstm.setClob(i + 1, (Clob) value);
                } else if (value instanceof byte[]) {
                    cstm.setBytes(i + 1, (byte[]) value);
                } else {
                    cstm.setObject(i + 1, value);
                }
            }
        return cstm;
    }
151838
public function bindValue($parameter, $value, $data_type = \PDO::PARAM_STR) {
        $this->_debugBindValues[$parameter] = $value;
        parent::bindValue($parameter, $value, $data_type);
    }
206069
function set($parm, $value = null)
    {
        if(is_array($parm)){
            foreach($parm as $k=>$v){ $this->__columns[$k] = $v; }
            return $this;
        }
        elseif(isset($this->__columns[$parm])) {
            $this->__columns[$parm] = $value;
            return $this;
        }
        else return false;
    }