Search in sources :

Example 1 with SpreadsheetDeleteVisitor

use of org.teiid.translator.google.visitor.SpreadsheetDeleteVisitor in project teiid by teiid.

the class TestSQLtoSpreadsheetQuery method testDeleteConversion.

private void testDeleteConversion(String sql, String expectedCriteria) throws Exception {
    Delete delete = (Delete) getCommand(sql);
    SpreadsheetDeleteVisitor spreadsheetVisitor = new SpreadsheetDeleteVisitor(people);
    spreadsheetVisitor.visit(delete);
    assertEquals(expectedCriteria, spreadsheetVisitor.getCriteriaQuery());
}
Also used : Delete(org.teiid.language.Delete) SpreadsheetDeleteVisitor(org.teiid.translator.google.visitor.SpreadsheetDeleteVisitor)

Example 2 with SpreadsheetDeleteVisitor

use of org.teiid.translator.google.visitor.SpreadsheetDeleteVisitor in project teiid by teiid.

the class SpreadsheetUpdateExecution method executeDelete.

private UpdateResult executeDelete() throws TranslatorException {
    SpreadsheetInfo info = connection.getSpreadsheetInfo();
    SpreadsheetDeleteVisitor visitor = new SpreadsheetDeleteVisitor(info);
    visitor.visit((Delete) command);
    checkHeaders(visitor.getWorksheetTitle());
    result = connection.deleteRows(visitor.getWorksheetTitle(), visitor.getCriteriaQuery());
    return result;
}
Also used : SpreadsheetInfo(org.teiid.translator.google.api.metadata.SpreadsheetInfo) SpreadsheetDeleteVisitor(org.teiid.translator.google.visitor.SpreadsheetDeleteVisitor)

Aggregations

SpreadsheetDeleteVisitor (org.teiid.translator.google.visitor.SpreadsheetDeleteVisitor)2 Delete (org.teiid.language.Delete)1 SpreadsheetInfo (org.teiid.translator.google.api.metadata.SpreadsheetInfo)1