@Override public void addBatch(String sql) throws SQLException { batch.add(new PhoenixPreparedStatement(connection, sql)); }
@Override public PreparedStatement prepareStatement(String sql) throws SQLException { checkOpen(); PhoenixPreparedStatement statement = new PhoenixPreparedStatement(this, sql); statements.add(statement); return statement; }
@Override public void addBatch() throws SQLException { throwIfUnboundParameters(); batch.add(new PhoenixPreparedStatement(this)); }
private PhoenixPreparedStatement newPreparedStatement(PhoenixConnection pconn, String query) throws SQLException { PhoenixPreparedStatement pstmt = new PhoenixPreparedStatement(pconn, query); assertRoundtrip(query); return pstmt; }
PhoenixPreparedStatement stmt = null; try { stmt = new PhoenixPreparedStatement(this, parser); ParameterMetaData paramMetaData = stmt .getParameterMetaData();
private static QueryPlan compileStatement(String query, List<Object> binds) throws SQLException { PhoenixConnection pconn = DriverManager.getConnection(getUrl(), PropertiesUtil.deepCopy(TEST_PROPERTIES)).unwrap(PhoenixConnection.class); PhoenixPreparedStatement pstmt = new PhoenixPreparedStatement(pconn, query); TestUtil.bindParams(pstmt, binds); return pstmt.compileQuery(); }
private static StatementContext compileStatementTenantSpecific(String tenantId, String query, List<Object> binds) throws Exception { PhoenixConnection pconn = getTenantSpecificConnection("tenantId").unwrap(PhoenixConnection.class); PhoenixPreparedStatement pstmt = new PhoenixPreparedStatement(pconn, query); TestUtil.bindParams(pstmt, binds); QueryPlan plan = pstmt.compileQuery(); return plan.getContext(); }
private static Filter compileStatement(String query) throws SQLException { PhoenixConnection pconn = DriverManager.getConnection(getUrl(), PropertiesUtil.deepCopy(TEST_PROPERTIES)).unwrap(PhoenixConnection.class); PhoenixPreparedStatement pstmt = new PhoenixPreparedStatement(pconn, query); QueryPlan plan = pstmt.compileQuery(); return plan.getContext().getScan().getFilter(); }
private static QueryPlan compileStatement(String query, List<Object> binds, Integer limit) throws SQLException { PhoenixConnection pconn = DriverManager.getConnection(getUrl(), PropertiesUtil.deepCopy(TEST_PROPERTIES)).unwrap(PhoenixConnection.class); PhoenixPreparedStatement pstmt = new PhoenixPreparedStatement(pconn, query); TestUtil.bindParams(pstmt, binds); QueryPlan plan = pstmt.compileQuery(); assertEquals(limit, plan.getLimit()); return plan; }
private static StatementContext compileStatement(String query, List<Object> binds, Integer limit) throws SQLException { PhoenixConnection pconn = DriverManager.getConnection(getUrl(), PropertiesUtil.deepCopy(TEST_PROPERTIES)).unwrap(PhoenixConnection.class); PhoenixPreparedStatement pstmt = new PhoenixPreparedStatement(pconn, query); assertRoundtrip(query); TestUtil.bindParams(pstmt, binds); QueryPlan plan = pstmt.compileQuery(); assertEquals(limit, plan.getLimit()); return plan.getContext(); }
@Override public void addBatch(String sql) throws SQLException { batch.add(new PhoenixPreparedStatement(connection, sql)); }
@Override public void addBatch(String sql) throws SQLException { batch.add(new PhoenixPreparedStatement(connection, sql)); }
private static Expressions compileStatement(String query, List<Object> binds) throws SQLException { PhoenixConnection pconn = DriverManager.getConnection(getUrl(), PropertiesUtil.deepCopy(TEST_PROPERTIES)).unwrap(PhoenixConnection.class); PhoenixPreparedStatement pstmt = new PhoenixPreparedStatement(pconn, query); TestUtil.bindParams(pstmt, binds); QueryPlan plan = pstmt.compileQuery(); assertTrue(plan instanceof AggregatePlan); Filter filter = plan.getContext().getScan().getFilter(); assertTrue(filter == null || filter instanceof BooleanExpressionFilter); BooleanExpressionFilter boolFilter = (BooleanExpressionFilter)filter; AggregatePlan aggPlan = (AggregatePlan)plan; return new Expressions(boolFilter == null ? null : boolFilter.getExpression(), aggPlan.getHaving()); }
@Override public PreparedStatement prepareStatement(String sql) throws SQLException { checkOpen(); PhoenixPreparedStatement statement = new PhoenixPreparedStatement(this, sql); statements.add(statement); return statement; }
@Override public void addBatch() throws SQLException { throwIfUnboundParameters(); batch.add(new PhoenixPreparedStatement(this)); }
@Override public void addBatch() throws SQLException { throwIfUnboundParameters(); batch.add(new PhoenixPreparedStatement(this)); }
@Override public PreparedStatement prepareStatement(String sql) throws SQLException { checkOpen(); PhoenixPreparedStatement statement = new PhoenixPreparedStatement(this, sql); statements.add(statement); return statement; }
PhoenixPreparedStatement stmt = null; try { stmt = new PhoenixPreparedStatement(this, parser); ParameterMetaData paramMetaData = stmt .getParameterMetaData();
PhoenixPreparedStatement stmt = null; try { stmt = new PhoenixPreparedStatement(this, parser); ParameterMetaData paramMetaData = stmt .getParameterMetaData();