@Override public ParameterMetaData getParameterMetaData() throws SQLException { int paramCount = statement.getBindCount(); List<Object> params = this.getParameters(); BitSet unsetParams = new BitSet(statement.getBindCount()); for (int i = 0; i < paramCount; i++) { if ( params.get(i) == BindManager.UNBOUND_PARAMETER) { unsetParams.set(i); params.set(i, null); } } try { StatementPlan plan = statement.compilePlan(this, Sequence.ValueOp.VALIDATE_SEQUENCE); return plan.getParameterMetaData(); } finally { int lastSetBit = 0; while ((lastSetBit = unsetParams.nextSetBit(lastSetBit)) != -1) { params.set(lastSetBit, BindManager.UNBOUND_PARAMETER); lastSetBit++; } } }
@Override public ResultSetMetaData getMetaData() throws SQLException { if (statement.getOperation().isMutation()) { return null; } int paramCount = statement.getBindCount(); List<Object> params = this.getParameters(); BitSet unsetParams = new BitSet(statement.getBindCount()); for (int i = 0; i < paramCount; i++) { if ( params.get(i) == BindManager.UNBOUND_PARAMETER) { unsetParams.set(i); params.set(i, null); } } try { // Just compile top level query without optimizing to get ResultSetMetaData QueryPlan plan = statement.compilePlan(this, Sequence.ValueOp.VALIDATE_SEQUENCE); return new PhoenixResultSetMetaData(this.getConnection(), plan.getProjector()); } finally { int lastSetBit = 0; while ((lastSetBit = unsetParams.nextSetBit(lastSetBit)) != -1) { params.set(lastSetBit, BindManager.UNBOUND_PARAMETER); lastSetBit++; } } }
public PhoenixPreparedStatement(PhoenixConnection connection, PhoenixStatementParser parser) throws SQLException, IOException { super(connection); this.statement = parser.nextStatement(new ExecutableNodeFactory()); if (this.statement == null) { throw new EOFException(); } this.query = null; // TODO: add toString on SQLStatement this.parameterCount = statement.getBindCount(); this.parameters = Arrays.asList(new Object[statement.getBindCount()]); Collections.fill(parameters, BindManager.UNBOUND_PARAMETER); }
@Override public ResultSetMetaData getMetaData() throws SQLException { if (statement.getOperation().isMutation()) { return null; } int paramCount = statement.getBindCount(); List<Object> params = this.getParameters(); BitSet unsetParams = new BitSet(statement.getBindCount()); for (int i = 0; i < paramCount; i++) { if ( params.get(i) == BindManager.UNBOUND_PARAMETER) { unsetParams.set(i); params.set(i, null); } } try { // Just compile top level query without optimizing to get ResultSetMetaData QueryPlan plan = statement.compilePlan(this, Sequence.ValueOp.VALIDATE_SEQUENCE); return new PhoenixResultSetMetaData(this.getConnection(), plan.getProjector()); } finally { int lastSetBit = 0; while ((lastSetBit = unsetParams.nextSetBit(lastSetBit)) != -1) { params.set(lastSetBit, BindManager.UNBOUND_PARAMETER); lastSetBit++; } } }
@Override public ResultSetMetaData getMetaData() throws SQLException { if (statement.getOperation().isMutation()) { return null; } int paramCount = statement.getBindCount(); List<Object> params = this.getParameters(); BitSet unsetParams = new BitSet(statement.getBindCount()); for (int i = 0; i < paramCount; i++) { if ( params.get(i) == BindManager.UNBOUND_PARAMETER) { unsetParams.set(i); params.set(i, null); } } try { // Just compile top level query without optimizing to get ResultSetMetaData QueryPlan plan = statement.compilePlan(this, Sequence.ValueOp.VALIDATE_SEQUENCE); return new PhoenixResultSetMetaData(this.getConnection(), plan.getProjector()); } finally { int lastSetBit = 0; while ((lastSetBit = unsetParams.nextSetBit(lastSetBit)) != -1) { params.set(lastSetBit, BindManager.UNBOUND_PARAMETER); lastSetBit++; } } }
@Override public ParameterMetaData getParameterMetaData() throws SQLException { int paramCount = statement.getBindCount(); List<Object> params = this.getParameters(); BitSet unsetParams = new BitSet(statement.getBindCount()); for (int i = 0; i < paramCount; i++) { if ( params.get(i) == BindManager.UNBOUND_PARAMETER) { unsetParams.set(i); params.set(i, null); } } try { StatementPlan plan = statement.compilePlan(this, Sequence.ValueOp.VALIDATE_SEQUENCE); return plan.getParameterMetaData(); } finally { int lastSetBit = 0; while ((lastSetBit = unsetParams.nextSetBit(lastSetBit)) != -1) { params.set(lastSetBit, BindManager.UNBOUND_PARAMETER); lastSetBit++; } } }
@Override public ParameterMetaData getParameterMetaData() throws SQLException { int paramCount = statement.getBindCount(); List<Object> params = this.getParameters(); BitSet unsetParams = new BitSet(statement.getBindCount()); for (int i = 0; i < paramCount; i++) { if ( params.get(i) == BindManager.UNBOUND_PARAMETER) { unsetParams.set(i); params.set(i, null); } } try { StatementPlan plan = statement.compilePlan(this, Sequence.ValueOp.VALIDATE_SEQUENCE); return plan.getParameterMetaData(); } finally { int lastSetBit = 0; while ((lastSetBit = unsetParams.nextSetBit(lastSetBit)) != -1) { params.set(lastSetBit, BindManager.UNBOUND_PARAMETER); lastSetBit++; } } }
@Override public int getBindCount() { return getStatement().getBindCount(); }
public PhoenixPreparedStatement(PhoenixConnection connection, String query) throws SQLException { super(connection); this.query = query; this.statement = parseStatement(query); this.parameterCount = statement.getBindCount(); this.parameters = Arrays.asList(new Object[statement.getBindCount()]); Collections.fill(parameters, BindManager.UNBOUND_PARAMETER); }
public PhoenixPreparedStatement(PhoenixConnection connection, PhoenixStatementParser parser) throws SQLException, IOException { super(connection); this.statement = parser.nextStatement(new ExecutableNodeFactory()); if (this.statement == null) { throw new EOFException(); } this.query = null; // TODO: add toString on SQLStatement this.parameterCount = statement.getBindCount(); this.parameters = Arrays.asList(new Object[statement.getBindCount()]); Collections.fill(parameters, BindManager.UNBOUND_PARAMETER); }
@Override public int getBindCount() { return getStatement().getBindCount(); }
public PhoenixPreparedStatement(PhoenixConnection connection, String query) throws SQLException { super(connection); this.query = query; this.statement = parseStatement(query); this.parameterCount = statement.getBindCount(); this.parameters = Arrays.asList(new Object[statement.getBindCount()]); Collections.fill(parameters, BindManager.UNBOUND_PARAMETER); }
public PhoenixPreparedStatement(PhoenixConnection connection, PhoenixStatementParser parser) throws SQLException, IOException { super(connection); this.statement = parser.nextStatement(new ExecutableNodeFactory()); if (this.statement == null) { throw new EOFException(); } this.query = null; // TODO: add toString on SQLStatement this.parameterCount = statement.getBindCount(); this.parameters = Arrays.asList(new Object[statement.getBindCount()]); Collections.fill(parameters, BindManager.UNBOUND_PARAMETER); }
@Override public int getBindCount() { return getStatement().getBindCount(); }
public PhoenixPreparedStatement(PhoenixConnection connection, String query) throws SQLException { super(connection); this.query = query; this.statement = parseStatement(query); this.parameterCount = statement.getBindCount(); this.parameters = Arrays.asList(new Object[statement.getBindCount()]); Collections.fill(parameters, BindManager.UNBOUND_PARAMETER); }