예제 #1
0
 /** @since 0.14.0 */
 @ScriptUsage(
     description = "remove query",
     arguments = {@ScriptArgument(name = "query id", type = "int", description = "query id")})
 public void removeQuery(String[] args) {
   for (String arg : args) {
     Integer id = Integer.valueOf(arg);
     if (qs.getQuery(id) != null) {
       qs.removeQuery(id);
       context.println("removed query " + arg);
     } else {
       context.println("query " + id + " not found");
     }
   }
 }
예제 #2
0
  /** @since 0.16.2 */
  @ScriptUsage(
      description = "print specific query status",
      arguments = {@ScriptArgument(name = "query id", type = "int", description = "query id")})
  public void queryStatus(String[] args) {
    Integer id = Integer.valueOf(args[0]);
    Query q = qs.getQuery(id);
    if (q == null) {
      context.println("query " + id + " not found");
      return;
    }

    context.println("Query Status");
    context.println("------------------");
    context.println(QueryPrintHelper.getQueryStatus(q));
  }
예제 #3
0
 /** @since 0.16.2 */
 public void removeAllQueries(String[] args) {
   for (Query q : qs.getQueries()) {
     qs.removeQuery(q.getId());
     context.println("removed query " + q.getId());
   }
 }
예제 #4
0
 /** @since 0.14.0 */
 public void queries(String[] args) {
   String queryFilter = null;
   if (args.length > 0) queryFilter = args[0];
   QueryPrintHelper.printQueries(context, qs.getQueries(), queryFilter);
 }