If there is a last menu, execute callback, unregister the current menu, and start the parent.

@param query Query to process, unused.
@see InlineMenu#unregister()
@see InlineMenu#start()
765462
@Override
    public void handlePress(CallbackQuery query) {
        InlineMenu lastMenu = owner.getLastMenu();

        if (lastMenu != null) {
            executeCallback();
            owner.unregister();
            lastMenu.start();
        }
    }
1123712
public void setOjbQuery(org.apache.ojb.broker.query.Query ojbQuery)
    {
        this.ojbQuery = ojbQuery;
    }
1076806
def setQuery(self, query):
        
        if not self.isVisible():
            self._loadQuery = query
        else:
            self._loadQuery = None
            
            if self._initialized and hash(query) == hash(self.query()):
                return
            
            self._initialized = True
            self.clear()
            self.addContainer(query)
23144
protected function query_start($sql, array $params = null, $type, $extrainfo = null) {
        parent::query_start($sql, $params, $type, $extrainfo);
    }
477039
public void registerSequenceQuery(long sequence, Runnable query) {
    // Add a query to be run once the session's sequence number reaches the given sequence number.
    List<Runnable> queries = this.sequenceQueries.computeIfAbsent(sequence, v -> new LinkedList<Runnable>());
    queries.add(query);
  }
1237072
@Override
  public void exitQuery(GDLParser.QueryContext ctx) {
    for(Vertex v : vertices) {
      addPredicates(Predicate.fromGraphElement(v, getDefaultVertexLabel()));
    }
    for(Edge e : edges) {
      addPredicates(Predicate.fromGraphElement(e, getDefaultEdgeLabel()));
    }
  }
212659
public ResultSetAndStatement executeQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
    {
        if (logger.isDebugEnabled())
        {
            logger.debug("executeQuery: " + query);
        }
        /*
		 * MBAIRD: we should create a scrollable resultset if the start at
		 * index or end at index is set
		 */
        boolean scrollable = ((query.getStartAtIndex() > Query.NO_START_AT_INDEX) || (query.getEndAtIndex() > Query.NO_END_AT_INDEX));
        /*
		 * OR if the prefetching of relationships is being used.
		 */
        if (query != null && query.getPrefetchedRelationships() != null && !query.getPrefetchedRelationships().isEmpty())
        {
            scrollable = true;
        }
        final StatementManagerIF sm = broker.serviceStatementManager();
        final SelectStatement sql = broker.serviceSqlGenerator().getPreparedSelectStatement(query, cld);
        PreparedStatement stmt = null;
        ResultSet rs = null;
        try
        {
            final int queryFetchSize = query.getFetchSize();
            final boolean isStoredProcedure = isStoredProcedure(sql.getStatement());
            stmt = sm.getPreparedStatement(cld, sql.getStatement() ,
                    scrollable, queryFetchSize, isStoredProcedure);
            if (isStoredProcedure)
            {
                // Query implemented as a stored procedure, which must return a result set.
                // Query sytax is: { ?= call PROCEDURE_NAME(?,...,?)}
                getPlatform().registerOutResultSet((CallableStatement) stmt, 1);
                sm.bindStatement(stmt, query, cld, 2);

                if (logger.isDebugEnabled())
                    logger.debug("executeQuery: " + stmt);

                stmt.execute();
                rs = (ResultSet) ((CallableStatement) stmt).getObject(1);
            }
            else
            {
                sm.bindStatement(stmt, query, cld, 1);

                if (logger.isDebugEnabled())
                    logger.debug("executeQuery: " + stmt);

                rs = stmt.executeQuery();
            }

            return new ResultSetAndStatement(sm, stmt, rs, sql);
        }
        catch (PersistenceBrokerException e)
        {
            // release resources on exception
            sm.closeResources(stmt, rs);
            logger.error("PersistenceBrokerException during the execution of the query: " + e.getMessage(), e);
            throw e;
        }
        catch (SQLException e)
        {
            // release resources on exception
            sm.closeResources(stmt, rs);
            throw ExceptionHelper.generateException(e, sql.getStatement(), null, logger, null);
        }
    }
946651
public QueryResult execute(Query query) throws QueryEngineException {
        if (!(query instanceof QueryImpl)) {
            throw new QueryEngineException("Couldn't cast Query to QueryImpl.");
        }
        QueryImpl q = (QueryImpl) query;


        // search for unbound results vars
        resvarsLoop:
        for (QueryArgument arg : q.getResultVars()) {
            for (QueryAtomGroup g : q.getAtomGroups()) {
                for (QueryAtom a : g.getAtoms()) {
                    if (a.getArguments().contains(arg)) {
                        continue resvarsLoop;
                    }
                }
            }
//			throw new QueryEngineException("Query contains an unbound result argument " + arg + ".");
        }

        Queue<QueryResultImpl> results = new LinkedList<>();
        for (QueryAtomGroup g : q.getAtomGroups()) {

            QueryAtomGroupImpl group = (QueryAtomGroupImpl) g;

            List<QueryAtomGroupImpl> components = findComponents(group);
            Queue<QueryResultImpl> componentResults = new LinkedList<>();
            boolean groupAsk = true;
            for (QueryAtomGroupImpl component : components) {

                QueryAtomGroupImpl preorderedGroup = preorder(component);

                QueryResultImpl result = new QueryResultImpl(query);
                if (eval(q, preorderedGroup, result, new QueryBindingImpl(), BoundChecking.CHECK_BOUND)) {
                    if (query.isSelectDistinct()) {
                        result = eliminateDuplicates(result);
                    }

                    componentResults.add(result);
                }
                else {
                    groupAsk = false;
                    break;
                }
            }

            if (groupAsk) {
                results.add(combineResults(componentResults,
                                           query.getType() == SELECT_DISTINCT));
            }
            else {
                // return only empty result with no solution for this group
                QueryResultImpl ret = new QueryResultImpl(query);
                ret.setAsk(false);
                results.add(ret);
            }
        }

        return unionResults(q, results, query.getType() == SELECT_DISTINCT);
    }
905491
@Override
    public final Query createQuery(String query)
    {
        checkClosed();
        checkTransactionNeeded();
        return getPersistenceDelegator().createQuery(query);
    }
1078760
@Deprecated
    public Iterable<BoxItem.Info> search(final String query) {
        return new Iterable<BoxItem.Info>() {
            @Override
            public Iterator<BoxItem.Info> iterator() {
                QueryStringBuilder builder = new QueryStringBuilder();
                builder.appendParam("query", query);
                builder.appendParam("ancestor_folder_ids", getID());

                URL url = SEARCH_URL_TEMPLATE.buildWithQuery(getAPI().getBaseURL(), builder.toString());
                return new BoxItemIterator(getAPI(), url);
            }
        };
    }
896976
function(query,options) {
           for (var key in query) {
               if (query[key].$in) {
                   query[key]=query[key].$in;
               }
           }
           return this.inherited(arguments);
       }
627616
public function delete($query)
    {
        $classes = $this->getClassMetadata();
        foreach ($classes as $class) {
            $this->_sm->getClient()->removeAll($class, $query);
        }
    }
56880
private void deleteByQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
    {
        if (logger.isDebugEnabled())
        {
            logger.debug("deleteByQuery " + cld.getClassNameOfObject() + ", " + query);
        }

        if (query instanceof QueryBySQL)
        {
            String sql = ((QueryBySQL) query).getSql();
            this.dbAccess.executeUpdateSQL(sql, cld);
        }
        else
        {
            // if query is Identity based transform it to a criteria based query first
            if (query instanceof QueryByIdentity)
            {
                QueryByIdentity qbi = (QueryByIdentity) query;
                Object oid = qbi.getExampleObject();
                // make sure it's an Identity
                if (!(oid instanceof Identity))
                {
                    oid = serviceIdentity().buildIdentity(oid);
                }
                query = referencesBroker.getPKQuery((Identity) oid);
            }

            if (!cld.isInterface())
            {
                this.dbAccess.executeDelete(query, cld);
            }

            // if class is an extent, we have to delete all extent classes too
            String lastUsedTable = cld.getFullTableName();
            if (cld.isExtent())
            {
                Iterator extents = getDescriptorRepository().getAllConcreteSubclassDescriptors(cld).iterator();

                while (extents.hasNext())
                {
                    ClassDescriptor extCld = (ClassDescriptor) extents.next();

                    // read same table only once
                    if (!extCld.getFullTableName().equals(lastUsedTable))
                    {
                        lastUsedTable = extCld.getFullTableName();
                        this.dbAccess.executeDelete(query, extCld);
                    }
                }
            }

        }
    }
441147
public <T> T execute(final String query, final Object connection,
        final List<KunderaQuery.BindParameter> parameters) {
        throw new KunderaException("not implemented");
    }
792472
private void cmdExecuteQueryActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_buttonExecuteActionPerformed
		try {
			// TODO Handle this such that there is a listener checking the progress of the execution
			Thread queryRunnerThread = new Thread(() -> {
				String queryString = queryTextPane.getText();
                OBDADataQueryAction<?> action = null;
				if (queryString.isEmpty()){
					JOptionPane.showMessageDialog(QueryInterfacePanel.this, "Query editor cannot be empty.");
				} else if (SPARQLQueryUtility.isSelectQuery(queryString)) {
					action = QueryInterfacePanel.this.getExecuteSelectAction();
				} else if (SPARQLQueryUtility.isAskQuery(queryString)){
					action = QueryInterfacePanel.this.getExecuteAskAction();
                } else if ((SPARQLQueryUtility.isConstructQuery(queryString) || SPARQLQueryUtility.isDescribeQuery(queryString)) ){
                    action = QueryInterfacePanel.this.getExecuteGraphQueryAction();
                } else {
                    JOptionPane.showMessageDialog(QueryInterfacePanel.this, "This type of SPARQL expression is not handled. Please use SELECT, ASK, DESCRIBE, or CONSTRUCT.");
                }
				if(action!=null) {
					action.run(queryString);
					execTime = action.getExecutionTime();
					do {
						int rows = action.getNumberOfRows();
						updateStatus(rows);
						try {
							Thread.sleep(100);
						} catch (InterruptedException e) {
							break;
						}
					} while (action.isRunning());
					int rows = action.getNumberOfRows();
						updateStatus(rows);

				}
            });
			queryRunnerThread.start();
		} catch (Exception e) {
			DialogUtils.showQuickErrorDialog(QueryInterfacePanel.this, e);
		}
	}
251525
@Override
  public void cancelCurrentQuery() throws SQLException {
    try (MasterProtocol copiedProtocol = new MasterProtocol(urlParser, new GlobalStateInfo(),
        new ReentrantLock())) {
      copiedProtocol.setHostAddress(getHostAddress());
      copiedProtocol.connect();
      //no lock, because there is already a query running that possessed the lock.
      copiedProtocol.executeQuery("KILL QUERY " + serverThreadId);
    }
    interrupted = true;
  }
1006181
public void updateQuery(QueryControllerQuery query) {
		int position = getElementPosition(query.getID());
		queries.set(position, query);
	}