@Override public boolean isQuery() { return prepared.isQuery(); }
@Override public boolean isQuery() { Prepared prepared = procedure.getPrepared(); return prepared.isQuery(); }
/** * Determines if specified prepared statement is an EXPLAIN of update operation: UPDATE, DELETE, etc. * (e.g. not a SELECT query). * * @param statement statement to probe. * @return {@code True} if statement is EXPLAIN UPDATE, EXPLAIN DELETE or etc.; {@code false} otherwise. */ public static boolean isExplainUpdate(Prepared statement) { if (!(statement instanceof Explain)) return false; return !EXPLAIN_COMMAND.get((Explain)statement).isQuery(); }
private static void prepareJoinBatch(Prepared prepared) { if (prepared.isQuery()) { int type = prepared.getType(); if (type == CommandInterface.SELECT) { ((Query) prepared).prepareJoinBatch(); } else if (type == CommandInterface.EXPLAIN || type == CommandInterface.EXPLAIN_ANALYZE) { prepareJoinBatch(((Explain) prepared).getCommand()); } } }
if (command.isQuery()) { command.query(maxrows); } else {
private void execute(String sql) { try { Prepared command = session.prepare(sql); if (command.isQuery()) { command.query(0); } else { command.update(); } if (session.getAutoCommit()) { session.commit(false); } } catch (DbException e) { throw e.addSQL(sql); } }
if (!prepared.isQuery()) { Long qryId = registerRunningQuery(schemaName, cancel, sqlQry, loc, registerAsNewQry);
boolean dmlInsideTxAllowed) throws IgniteCheckedException { assert !prepared.isQuery();
if (qry.isLocal() || !prepared.isQuery()) { if (GridSqlQueryParser.isExplainUpdate(prepared)) throw new IgniteSQLException("Explains of update queries are not supported.",
@Override public boolean isQuery() { return prepared.isQuery(); }
@Override public boolean isQuery() { return prepared.isQuery(); }
public boolean isQuery() { return prepared.isQuery(); }
public boolean isQuery() { Prepared prepared = procedure.getPrepared(); return prepared.isQuery(); }
@Override public boolean isQuery() { Prepared prepared = procedure.getPrepared(); return prepared.isQuery(); }
@Override public boolean isQuery() { Prepared prepared = procedure.getPrepared(); return prepared.isQuery(); }
private Select queryToSelect(String query) { Select select = null; if (!isValid(query)) return null; Parser parser = new Parser(session); Prepared somePrepared; //try { somePrepared = parser.prepare(query); if (somePrepared instanceof Select && somePrepared.isQuery()) select = (Select) somePrepared; /*} catch (SQLException e) { logger.debug(e.getMessage(),e); }*/ return select; }
private static void prepareJoinBatch(Prepared prepared) { if (prepared.isQuery()) { if (prepared.getType() == CommandInterface.SELECT) { ((Query) prepared).prepareJoinBatch(); } else if (prepared.getType() == CommandInterface.EXPLAIN) { prepareJoinBatch(((Explain) prepared).getCommand()); } } }
private static void prepareJoinBatch(Prepared prepared) { if (prepared.isQuery()) { if (prepared.getType() == CommandInterface.SELECT) { ((Query) prepared).prepareJoinBatch(); } else if (prepared.getType() == CommandInterface.EXPLAIN) { prepareJoinBatch(((Explain) prepared).getCommand()); } } }
private void execute(String sql) { try { Prepared command = session.prepare(sql); if (command.isQuery()) { command.query(0); } else { command.update(); } if (session.getAutoCommit()) { session.commit(false); } } catch (DbException e) { throw e.addSQL(sql); } }