public void addParam(BindParseNode bind, PDatum datum) throws SQLException { PDatum bindDatum = params[bind.getIndex()]; if (bindDatum != null && bindDatum.getDataType() != null && !datum.getDataType().isCoercibleTo(bindDatum.getDataType())) { throw TypeMismatchException.newException(datum.getDataType(), bindDatum.getDataType()); } params[bind.getIndex()] = datum; } }
public Object getBindValue(BindParseNode node) throws SQLException { int index = node.getIndex(); if (index < 0 || index >= binds.size()) { throw new SQLExceptionInfo.Builder(SQLExceptionCode.PARAM_INDEX_OUT_OF_BOUND) .setMessage("binds size: " + binds.size() + "; index: " + index).build().buildException(); } Object value = binds.get(index); if (value == UNBOUND_PARAMETER) { throw new SQLExceptionInfo.Builder(SQLExceptionCode.PARAM_VALUE_UNBOUND) .setMessage(node.toString()).build().buildException(); } return value; }
public void addParam(BindParseNode bind, PDatum datum) throws SQLException { PDatum bindDatum = params[bind.getIndex()]; if (bindDatum != null && bindDatum.getDataType() != null && !datum.getDataType().isCoercibleTo(bindDatum.getDataType())) { throw TypeMismatchException.newException(datum.getDataType(), bindDatum.getDataType()); } params[bind.getIndex()] = datum; } }
public void addParam(BindParseNode bind, PDatum datum) throws SQLException { PDatum bindDatum = params[bind.getIndex()]; if (bindDatum != null && bindDatum.getDataType() != null && !datum.getDataType().isCoercibleTo(bindDatum.getDataType())) { throw TypeMismatchException.newException(datum.getDataType(), bindDatum.getDataType()); } params[bind.getIndex()] = datum; } }
public Object getBindValue(BindParseNode node) throws SQLException { int index = node.getIndex(); if (index < 0 || index >= binds.size()) { throw new SQLExceptionInfo.Builder(SQLExceptionCode.PARAM_INDEX_OUT_OF_BOUND) .setMessage("binds size: " + binds.size() + "; index: " + index).build().buildException(); } Object value = binds.get(index); if (value == UNBOUND_PARAMETER) { throw new SQLExceptionInfo.Builder(SQLExceptionCode.PARAM_VALUE_UNBOUND) .setMessage(node.toString()).build().buildException(); } return value; }
public Object getBindValue(BindParseNode node) throws SQLException { int index = node.getIndex(); if (index < 0 || index >= binds.size()) { throw new SQLExceptionInfo.Builder(SQLExceptionCode.PARAM_INDEX_OUT_OF_BOUND) .setMessage("binds size: " + binds.size() + "; index: " + index).build().buildException(); } Object value = binds.get(index); if (value == UNBOUND_PARAMETER) { throw new SQLExceptionInfo.Builder(SQLExceptionCode.PARAM_VALUE_UNBOUND) .setMessage(node.toString()).build().buildException(); } return value; }