Sets the designated parameter to SQL NULL.
338895
@Override
    public void setNull(int parameterIndex, int sqlType) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        switch(sqlType)
        {
            case Types.TINYINT:
                this.parameters[parameterIndex-1] = VoltType.NULL_TINYINT;
                break;
            case Types.SMALLINT:
                this.parameters[parameterIndex-1] = VoltType.NULL_SMALLINT;
                break;
            case Types.INTEGER:
                this.parameters[parameterIndex-1] = VoltType.NULL_INTEGER;
                break;
            case Types.BIGINT:
                this.parameters[parameterIndex-1] = VoltType.NULL_BIGINT;
                break;
            case Types.DOUBLE:
                this.parameters[parameterIndex-1] = VoltType.NULL_FLOAT;
                break;
            case Types.DECIMAL:
                this.parameters[parameterIndex-1] = VoltType.NULL_DECIMAL;
                break;
            case Types.TIMESTAMP:
                this.parameters[parameterIndex-1] = VoltType.NULL_TIMESTAMP;
                break;
            case Types.VARBINARY:
            case Types.VARCHAR:
            case Types.NVARCHAR:
            case Types.OTHER:
            case Types.NULL:
                this.parameters[parameterIndex-1] = VoltType.NULL_STRING_OR_VARBINARY;
                break;
            default:
                throw SQLError.get(SQLError.ILLEGAL_ARGUMENT);
        }
    }
748462
void setDecimal(final int parameterIndex, 
                    final BigDecimal x) throws SQLException {

        final ParameterDef def = (x == null) ? Decimal : Decimal(x);

        setParam(parameterIndex, def, x);
    }
11028
public void bindArgument(@NotNull PreparedStatement ps, int index, @Nullable Object value) throws SQLException {
        ArgumentBinder.bindArgument(ps, index, value);
    }
88737
@Override
	public int setParameter(final PreparedStatement preparedStatement, final int index,
			final BindParameterMapperManager parameterMapperManager) throws SQLException {
		return setStreamParameter(preparedStatement, index, parameterMapperManager);
	}
727130
public final void setValues(PreparedStatement ps) throws SQLException {
        if (this.logger.isDebugEnabled()) {
            this.logger.debug("Setting parameters " + this.parameters + " on prepared statement " + ps);
        }
        
        int parameterIndex = 0;
        for (final Phrase parameterPhrase : this.parameters) {
            final Object parameter = parameterPhrase.evaluate(this.req, this.res);
            ps.setObject(++parameterIndex, parameter);
        }
    }
1193923
private static <T> int setStatementParameters(final T item,
                                                 final Introspected introspected,
                                                 final FieldColumnInfo[] fcInfos,
                                                 final PreparedStatement stmt,
                                                 final int[] parameterTypes,
                                                 final Set<String> excludedColumns) throws SQLException
   {
      int parameterIndex = 1;
      for (final FieldColumnInfo fcInfo : fcInfos) {
         if (excludedColumns == null || !isIgnoredColumn(excludedColumns, fcInfo.getColumnName())) {
            final int parameterType = parameterTypes[parameterIndex - 1];
            final Object object = mapSqlType(introspected.get(item, fcInfo), parameterType);
            if (object != null && !fcInfo.isSelfJoinField()) {
               stmt.setObject(parameterIndex, object, parameterType);
            }
            else {
               stmt.setNull(parameterIndex, parameterType);
            }
            ++parameterIndex;
         }
      }
      return parameterIndex;
   }
255160
public void setObject(int parameterIndex, Object x, java.sql.SQLType targetSqlType,
      int scaleOrLength) throws SQLException {
    throw Driver.notImplemented(this.getClass(), "setObject");
  }
122746
public static void sqlifnull(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException {
    twoArgumentsFunctionCall(buf, "coalesce(", "ifnull", parsedArgs);
  }
310068
@Override
    public void setNString(String parameterName, String value) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
714144
protected int setStreamParameter(final PreparedStatement preparedStatement, int index,
			final BindParameterMapperManager parameterMapperManager) throws SQLException {

		if (len > -1) {
			preparedStatement.setBinaryStream(index, stream, len);
		} else {
			preparedStatement.setBinaryStream(index, stream);
		}

		parameterLog(index);
		index++;

		return index;
	}
693646
public void addSQLParameter(Object o) {
	if (parameters == null) {
	    parameters = new ArrayList();
	}
	parameters.add(o);
    }
548281
@Override
	public SqlContext param(final String parameterName, final Object value, final int sqlType) {
		if (value instanceof Optional) {
			Optional<?> optionalValue = (Optional<?>) value;
			if (optionalValue.isPresent()) {
				param(new Parameter(parameterName, optionalValue.get(), sqlType));
			} else {
				param(new Parameter(parameterName, null));
			}
			return this;
		} else {
			return param(new Parameter(parameterName, value, sqlType));
		}
	}
1239853
@Override
    public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        throw SQLError.noSupport();
    }
702063
protected int setInParameter(final PreparedStatement preparedStatement, final int index,
			final BindParameterMapperManager parameterMapperManager) throws SQLException {
		int parameterIndex = index;
		if (value instanceof List) {
			for (Object e : (List<?>) value) {
				setParameterObject(preparedStatement, parameterIndex, e, parameterMapperManager);

				parameterLog(parameterIndex);
				parameterIndex++;
			}
		} else {
			setParameterObject(preparedStatement, parameterIndex, value, parameterMapperManager);

			parameterLog(parameterIndex);
			parameterIndex++;
		}

		return parameterIndex;
	}
173373
@Override
    public void setShort(int parameterIndex, short x) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        this.parameters[parameterIndex-1] = x;
    }
799267
@SuppressWarnings({ "unchecked", "rawtypes" })
    public <T> void set(PreparedStatement stmt, Path<?> path, int i, T value) throws SQLException {
        if (value == null || value instanceof Null) {
            Integer sqlType = null;
            if (path != null) {
                ColumnMetadata columnMetadata = ColumnMetadata.getColumnMetadata(path);
                if (columnMetadata.hasJdbcType()) {
                    sqlType = columnMetadata.getJdbcType();
                }
            }
            if (sqlType != null) {
                stmt.setNull(i, sqlType);
            } else {
                stmt.setNull(i, Types.NULL);
            }
        } else {
            getType(path, (Class) value.getClass()).setValue(stmt, i, value);
        }
    }
96231
@Override
    public void setTime(String parameterName, Time x) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }