Search in sources :

Example 6 with Delete

use of org.teiid.language.Delete in project teiid by teiid.

the class AccumuloUpdateExecution method execute.

@Override
public void execute() throws TranslatorException {
    try {
        if (this.command instanceof Insert) {
            Insert insert = (Insert) this.command;
            performInsert(insert);
        } else if (this.command instanceof Update) {
            Update update = (Update) this.command;
            performUpdate(update);
        } else if (this.command instanceof Delete) {
            Delete delete = (Delete) this.command;
            performDelete(delete);
        }
    } catch (MutationsRejectedException e) {
        throw new TranslatorException(e);
    } catch (TableNotFoundException e) {
        throw new TranslatorException(e);
    }
}
Also used : Delete(org.teiid.language.Delete) TableNotFoundException(org.apache.accumulo.core.client.TableNotFoundException) TranslatorException(org.teiid.translator.TranslatorException) Insert(org.teiid.language.Insert) Update(org.teiid.language.Update) MutationsRejectedException(org.apache.accumulo.core.client.MutationsRejectedException)

Aggregations

Delete (org.teiid.language.Delete)6 Insert (org.teiid.language.Insert)3 Update (org.teiid.language.Update)3 Test (org.junit.Test)2 TranslatorException (org.teiid.translator.TranslatorException)2 DB (com.mongodb.DB)1 QueryResult (com.sforce.soap.partner.QueryResult)1 SObject (com.sforce.soap.partner.sobject.SObject)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 MutationsRejectedException (org.apache.accumulo.core.client.MutationsRejectedException)1 TableNotFoundException (org.apache.accumulo.core.client.TableNotFoundException)1 DocumentFilter (org.teiid.infinispan.api.DocumentFilter)1 Action (org.teiid.infinispan.api.DocumentFilter.Action)1 InfinispanDocument (org.teiid.infinispan.api.InfinispanDocument)1 TeiidTableMarsheller (org.teiid.infinispan.api.TeiidTableMarsheller)1 ColumnReference (org.teiid.language.ColumnReference)1 Command (org.teiid.language.Command)1 NamedTable (org.teiid.language.NamedTable)1 SQLStringVisitor (org.teiid.language.visitor.SQLStringVisitor)1