Examples of Delete


Examples of org.lealone.command.dml.Delete

        }
        return new TableFilter(session, table, alias, rightsChecked, currentSelect);
    }

    private Delete parseDelete() {
        Delete command = createDelete(session);
        Expression limit = null;
        if (readIf("TOP")) {
            limit = readTerm().optimize(session);
        }
        currentPrepared = command;
        int start = lastParseIndex;
        readIf("FROM");
        TableFilter filter = readSimpleTableFilter();

        command.setTableFilter(filter);
        if (readIf("WHERE")) {
            Expression condition = readExpression();
            command.setCondition(condition);
        }
        if (readIf("LIMIT") && limit == null) {
            limit = readTerm().optimize(session);
        }
        command.setLimit(limit);
        setSQL(command, "DELETE", start);
        return command;
    }
View Full Code Here

Examples of org.locationtech.udig.project.ui.internal.actions.Delete

            deleteAction = new Action(){
                @Override
                public void run() {
                    final ISelection selection = getDeleteSelection();
                    if (!selection.isEmpty()) {
                        final Delete delete = new Delete(false);
                        delete.selectionChanged(this, selection);
                        delete.run(this);
                    }
                }
            };
           
            deleteAction.setActionDefinitionId("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
View Full Code Here

Examples of org.milyn.scribe.annotation.Delete

   * @param method
   */
  private void analyzeDeleteMethod(final AnnotatedMethod aMethod) {
    Method method = aMethod.getMethod();

    Delete annotation = aMethod.getAnnotation(Delete.class);

    String name = annotation.name();
    if(name.length() == 0) {
      name = method.getName();
    }

    assertUniqueName(deleteMethods, Delete.class, name);

    if(annotation.isDefault() && defaultDeleteMethod != null) {
      throw new IllegalAnnotationUsageException("At least two methods are annotated with the '"+ Delete.class.getName() +"' annotation having the isDefault on true. Only one method per class is allowed to be the default delete method.");
    }
    if(method.getParameterTypes().length == 0) {
      throw new IllegalAnnotationUsageException("The Delete annotated method '"+ method +"' of the DAO class '"+ daoClass.getName() +"' doesn't have a parameter, which it needs.");
    }
    if(method.getParameterTypes().length > 1) {
      throw new IllegalAnnotationUsageException("The Delete annotated method '"+ method +"'  the DAO class '"+ daoClass.getName() +"' has more then 1 parameter, which isn't allowed.");
    }


    boolean returnsEntity  = !method.isAnnotationPresent(ReturnsNoEntity.class);

    EntityMethod deleteMethod = new EntityMethod(method, returnsEntity);

    if(annotation.isDefault()) {
      defaultDeleteMethod = deleteMethod;
    }
    deleteMethods.put(name, deleteMethod);
  }
View Full Code Here

Examples of org.python.antlr.ast.Delete

                    new ArrayList<stmt>());
        }
        visit(n);
        java.util.List<expr> targets = new ArrayList<expr>();
        targets.add(new Name(n, tmp_append, expr_contextType.Del));
        visit(new Delete(n, targets));

        return null;
    }
View Full Code Here

Examples of org.python.parser.ast.Delete

                n = new If(lc.ifs[j], new stmtType[] { n }, null, lc.ifs[j]);
            }
            n = new For(lc.target, lc.iter, new stmtType[] { n }, null, lc);
        }
        visit(n);
        visit(new Delete(new exprType[] { new Name(tmp_append, Name.Del) }));

        return null;
    }
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.Delete

                attribute.value = value;
                attribute.attr = attr;
                return n;

            case JJTBEGIN_DEL_STMT:
                return new Delete(null);

            case JJTDEL_STMT:
                exprs = makeExprs(arity - 1);
                ctx.setDelete(exprs);
                Delete d = (Delete) stack.popNode();
                d.targets = exprs;
                return d;

            case JJTDOTTED_NAME:
                Name name = (Name) n;
View Full Code Here

Examples of org.tarantool.core.cmd.Delete

  /** {@inheritDoc} */
  @Override
  public Integer delete(int space, Tuple tuple) {
    try {
      Response response = transport.execute(new Delete(id.incrementAndGet(), tuple.pack()).space(space));
      return response.getCount();
    } finally {
      returnConnection();
    }
  }
View Full Code Here

Examples of org.teiid.query.sql.lang.Delete

      if(command instanceof Query) {
            Query query = (Query) command;
            return query.getCriteria() == null;
        }
        if (command instanceof Delete) {
          Delete query = (Delete) command;
            return query.getCriteria() == null;
        }
        if (command instanceof Update) {
          Update query = (Update) command;
            return query.getCriteria() == null;
        }
        if (command instanceof SetQuery) {
          SetQuery query = (SetQuery)command;
          return hasNoCriteria(query.getLeftQuery()) || hasNoCriteria(query.getRightQuery());
        }
        return false;
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.Delete

                 "INSERT INTO m.g (a) VALUES (?) OPTION NOCACHE"//$NON-NLS-1$
                 insert);                    
    }
   
    @Test public void testDeleteWithOption() {
        Delete delete = new Delete();
        delete.setGroup(new GroupSymbol("m.g")); //$NON-NLS-1$
        Option option = new Option();
        option.setNoCache(true);      
        delete.setOption(option);
        TestParser.helpTest("DELETE FROM m.g OPTION NOCACHE"//$NON-NLS-1$
                 "DELETE FROM m.g OPTION NOCACHE"//$NON-NLS-1$
                 delete);                    
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.Delete

        From from = new From();
        from.addGroup(g);

        ElementSymbol e =  new ElementSymbol("foo"); //$NON-NLS-1$
        CompareCriteria c = new CompareCriteria(e, CompareCriteria.EQ, new Constant("bar", String.class)); //$NON-NLS-1$
        Delete query = new Delete(g,c);
       
        helpTest("delete from x where \"foo\"='bar'"//$NON-NLS-1$
                 "DELETE FROM x WHERE foo = 'bar'"//$NON-NLS-1$
                 query);               
    }   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.