程序包 com.mysql.cj
类 NativeQueryBindings
- java.lang.Object
-
- com.mysql.cj.NativeQueryBindings
-
- 所有已实现的接口:
QueryBindings
public class NativeQueryBindings extends Object implements QueryBindings
-
-
构造器概要
构造器 构造器 说明 NativeQueryBindings(int parameterCount, Session sess, java.util.function.Function<Session,BindValue> bindValueConstructor)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcheckAllParametersSet()voidcheckParameterSet(int columnIndex)booleanclearBindValues()QueryBindingsclone()BindValuegetBinding(int parameterIndex, boolean forLongData)Returns the structure representing the value that (can be)/(is) bound at the given parameter index.BindValue[]getBindValues()byte[]getBytesRepresentation(int parameterIndex)intgetNumberOfExecutions()AtomicBooleangetSendTypesToServer()booleanisLongParameterSwitchDetected()booleanisNull(int parameterIndex)voidsetAsciiStream(int parameterIndex, InputStream x, int length)voidsetBigDecimal(int parameterIndex, BigDecimal x)voidsetBigInteger(int parameterIndex, BigInteger x)voidsetBinaryStream(int parameterIndex, InputStream x, int length)voidsetBindValues(BindValue[] bindValues)voidsetBlob(int parameterIndex, Blob x)voidsetBoolean(int parameterIndex, boolean x)voidsetByte(int parameterIndex, byte x)voidsetBytes(int parameterIndex, byte[] x, boolean escapeIfNeeded)voidsetCharacterStream(int parameterIndex, Reader reader, int length)voidsetClob(int parameterIndex, Clob x)voidsetColumnDefinition(ColumnDefinition colDef)voidsetDate(int parameterIndex, Date x, Calendar cal)voidsetDouble(int parameterIndex, double x)voidsetFloat(int parameterIndex, float x)voidsetFromBindValue(int parameterIndex, BindValue bv)voidsetInt(int parameterIndex, int x)voidsetLong(int parameterIndex, long x)voidsetLongParameterSwitchDetected(boolean longParameterSwitchDetected)voidsetNCharacterStream(int parameterIndex, Reader reader, long length)voidsetNClob(int parameterIndex, NClob value)voidsetNString(int parameterIndex, String x)voidsetNull(int parameterIndex)voidsetNumberOfExecutions(int numberOfExecutions)voidsetObject(int parameterIndex, Object parameterObj)voidsetObject(int parameterIndex, Object parameterObj, MysqlType targetMysqlType, int scaleOrLength)Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.protected voidsetSerializableObject(int parameterIndex, Object parameterObj)Sets the value for the placeholder as a serialized Java object (used by various forms of setObject()voidsetShort(int parameterIndex, short x)voidsetString(int parameterIndex, String x)voidsetTime(int parameterIndex, Time x, Calendar cal)voidsetTimestamp(int parameterIndex, Timestamp x, Calendar targetCalendar, Field field, MysqlType targetMysqlType)
-
-
-
方法详细资料
-
clone
public QueryBindings clone()
- 指定者:
clone在接口中QueryBindings- 覆盖:
clone在类中Object
-
setColumnDefinition
public void setColumnDefinition(ColumnDefinition colDef)
- 指定者:
setColumnDefinition在接口中QueryBindings
-
getBindValues
public BindValue[] getBindValues()
- 指定者:
getBindValues在接口中QueryBindings
-
setBindValues
public void setBindValues(BindValue[] bindValues)
- 指定者:
setBindValues在接口中QueryBindings
-
clearBindValues
public boolean clearBindValues()
- 指定者:
clearBindValues在接口中QueryBindings- 返回:
- true if bind values had long data
-
checkParameterSet
public void checkParameterSet(int columnIndex)
- 指定者:
checkParameterSet在接口中QueryBindings
-
checkAllParametersSet
public void checkAllParametersSet()
- 指定者:
checkAllParametersSet在接口中QueryBindings
-
getNumberOfExecutions
public int getNumberOfExecutions()
- 指定者:
getNumberOfExecutions在接口中QueryBindings
-
setNumberOfExecutions
public void setNumberOfExecutions(int numberOfExecutions)
- 指定者:
setNumberOfExecutions在接口中QueryBindings
-
isLongParameterSwitchDetected
public boolean isLongParameterSwitchDetected()
- 指定者:
isLongParameterSwitchDetected在接口中QueryBindings
-
setLongParameterSwitchDetected
public void setLongParameterSwitchDetected(boolean longParameterSwitchDetected)
- 指定者:
setLongParameterSwitchDetected在接口中QueryBindings
-
getSendTypesToServer
public AtomicBoolean getSendTypesToServer()
- 指定者:
getSendTypesToServer在接口中QueryBindings
-
getBinding
public BindValue getBinding(int parameterIndex, boolean forLongData)
Returns the structure representing the value that (can be)/(is) bound at the given parameter index.- 指定者:
getBinding在接口中QueryBindings- 参数:
parameterIndex- 0-basedforLongData- is this for a stream?- 返回:
- BindValue
-
setFromBindValue
public void setFromBindValue(int parameterIndex, BindValue bv)- 指定者:
setFromBindValue在接口中QueryBindings
-
setAsciiStream
public void setAsciiStream(int parameterIndex, InputStream x, int length)- 指定者:
setAsciiStream在接口中QueryBindings
-
setBigDecimal
public void setBigDecimal(int parameterIndex, BigDecimal x)- 指定者:
setBigDecimal在接口中QueryBindings
-
setBigInteger
public void setBigInteger(int parameterIndex, BigInteger x)- 指定者:
setBigInteger在接口中QueryBindings
-
setBinaryStream
public void setBinaryStream(int parameterIndex, InputStream x, int length)- 指定者:
setBinaryStream在接口中QueryBindings
-
setBlob
public void setBlob(int parameterIndex, Blob x)- 指定者:
setBlob在接口中QueryBindings
-
setBoolean
public void setBoolean(int parameterIndex, boolean x)- 指定者:
setBoolean在接口中QueryBindings
-
setByte
public void setByte(int parameterIndex, byte x)- 指定者:
setByte在接口中QueryBindings
-
setBytes
public void setBytes(int parameterIndex, byte[] x, boolean escapeIfNeeded)- 指定者:
setBytes在接口中QueryBindings
-
setCharacterStream
public void setCharacterStream(int parameterIndex, Reader reader, int length)- 指定者:
setCharacterStream在接口中QueryBindings
-
setClob
public void setClob(int parameterIndex, Clob x)- 指定者:
setClob在接口中QueryBindings
-
setDate
public void setDate(int parameterIndex, Date x, Calendar cal)- 指定者:
setDate在接口中QueryBindings
-
setDouble
public void setDouble(int parameterIndex, double x)- 指定者:
setDouble在接口中QueryBindings
-
setFloat
public void setFloat(int parameterIndex, float x)- 指定者:
setFloat在接口中QueryBindings
-
setInt
public void setInt(int parameterIndex, int x)- 指定者:
setInt在接口中QueryBindings
-
setLong
public void setLong(int parameterIndex, long x)- 指定者:
setLong在接口中QueryBindings
-
setNCharacterStream
public void setNCharacterStream(int parameterIndex, Reader reader, long length)- 指定者:
setNCharacterStream在接口中QueryBindings
-
setNClob
public void setNClob(int parameterIndex, NClob value)- 指定者:
setNClob在接口中QueryBindings
-
setNString
public void setNString(int parameterIndex, String x)- 指定者:
setNString在接口中QueryBindings
-
setNull
public void setNull(int parameterIndex)
- 指定者:
setNull在接口中QueryBindings
-
isNull
public boolean isNull(int parameterIndex)
- 指定者:
isNull在接口中QueryBindings
-
setShort
public void setShort(int parameterIndex, short x)- 指定者:
setShort在接口中QueryBindings
-
setString
public void setString(int parameterIndex, String x)- 指定者:
setString在接口中QueryBindings
-
setTime
public void setTime(int parameterIndex, Time x, Calendar cal)- 指定者:
setTime在接口中QueryBindings
-
setTimestamp
public void setTimestamp(int parameterIndex, Timestamp x, Calendar targetCalendar, Field field, MysqlType targetMysqlType)- 指定者:
setTimestamp在接口中QueryBindings
-
setObject
public void setObject(int parameterIndex, Object parameterObj)- 指定者:
setObject在接口中QueryBindings
-
setObject
public void setObject(int parameterIndex, Object parameterObj, MysqlType targetMysqlType, int scaleOrLength)Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.The given Java object will be converted to the targetMysqlType before being sent to the database.
- 指定者:
setObject在接口中QueryBindings- 参数:
parameterIndex- the first parameter is 1...parameterObj- the object containing the input parameter valuetargetMysqlType- The MysqlType to be send to the databasescaleOrLength- For Types.DECIMAL or Types.NUMERIC types this is the number of digits after the decimal. For all other types this value will be ignored.
-
setSerializableObject
protected final void setSerializableObject(int parameterIndex, Object parameterObj)Sets the value for the placeholder as a serialized Java object (used by various forms of setObject()- 参数:
parameterIndex- parameter indexparameterObj- value
-
getBytesRepresentation
public byte[] getBytesRepresentation(int parameterIndex)
- 指定者:
getBytesRepresentation在接口中QueryBindings
-
-