public BindParseNode bind(String bind) { return new BindParseNode(bind); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; OffsetNode other = (OffsetNode)obj; if (bindNode == null) { if (other.bindNode != null) return false; } else if (!bindNode.equals(other.bindNode)) return false; if (offsetNode == null) { if (other.offsetNode != null) return false; } else if (!offsetNode.equals(other.offsetNode)) return false; return true; } }
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; }
@Override public E visit(BindParseNode node) throws SQLException { throw new SQLFeatureNotSupportedException(node.toString()); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((bindNode == null) ? 0 : bindNode.hashCode()); result = prime * result + ((limitNode == null) ? 0 : limitNode.hashCode()); return result; }
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; } }
@Override public String toString() { return bindNode == null ? offsetNode.toString() : bindNode.toString(); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((bindNode == null) ? 0 : bindNode.hashCode()); result = prime * result + ((offsetNode == null) ? 0 : offsetNode.hashCode()); return result; }
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; }
@Override public String toString() { return bindNode == null ? limitNode.toString() : bindNode.toString(); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((bindNode == null) ? 0 : bindNode.hashCode()); result = prime * result + ((offsetNode == null) ? 0 : offsetNode.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; LimitNode other = (LimitNode)obj; if (bindNode == null) { if (other.bindNode != null) return false; } else if (!bindNode.equals(other.bindNode)) return false; if (limitNode == null) { if (other.limitNode != null) return false; } else if (!limitNode.equals(other.limitNode)) return false; return true; } }
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 BindParseNode bind(String bind) { return new BindParseNode(bind); }
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; }
@Override public E visit(BindParseNode node) throws SQLException { throw new SQLFeatureNotSupportedException(node.toString()); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((bindNode == null) ? 0 : bindNode.hashCode()); result = prime * result + ((offsetNode == null) ? 0 : offsetNode.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; OffsetNode other = (OffsetNode)obj; if (bindNode == null) { if (other.bindNode != null) return false; } else if (!bindNode.equals(other.bindNode)) return false; if (offsetNode == null) { if (other.offsetNode != null) return false; } else if (!offsetNode.equals(other.offsetNode)) return false; return true; } }
public BindParseNode bind(String bind) { return new BindParseNode(bind); }