Package org.teiid.query.sql.lang

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


        create.getPrimaryKey().add(column);
        helpTest("Create local TEMPORARY table tempTable(c1 boolean, c2 byte, primary key (c2))", "CREATE LOCAL TEMPORARY TABLE tempTable (c1 boolean, c2 byte, PRIMARY KEY(c2))", create); //$NON-NLS-1$ //$NON-NLS-2$
    }
   
    @Test public void testDropTable() {
        Drop drop = new Drop();
        drop.setTable(new GroupSymbol("tempTable")); //$NON-NLS-1$
        helpTest("DROP table tempTable", "DROP TABLE tempTable", drop); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here


    /**
     * This builds a command in the following form; If staging table name is "FOO"
     * the command built is "Delete FROM #FOO"
     */   
    private static Command wrapStagingTableUnloadQuery(GroupSymbol intoGroupSymbol) {
        Drop drop = new Drop();
        drop.setTable(intoGroupSymbol);
        return drop;
    }   
View Full Code Here

 
 
  // ################################## TEST HELPERS ################################ 

  public static final Drop sample1() {
        Drop Drop = new Drop();
        Drop.setTable(new GroupSymbol("temp_table"));//$NON-NLS-1$
       
    List elements = new ArrayList();
        elements.add(new ElementSymbol("a")); //$NON-NLS-1$
        elements.add(new ElementSymbol("b")); //$NON-NLS-1$
      return Drop; 
View Full Code Here

        elements.add(new ElementSymbol("b")); //$NON-NLS-1$
      return Drop; 
  }

  public static final Drop sample2() {
        Drop Drop = new Drop();
        Drop.setTable(new GroupSymbol("temp_table2"));//$NON-NLS-1$
       
        List elements = new ArrayList();
        elements.add(new ElementSymbol("a")); //$NON-NLS-1$
        elements.add(new ElementSymbol("b")); //$NON-NLS-1$
        return Drop;    }
View Full Code Here

  public void testGetProjectedNoElements() {   
      assertEquals(Command.getUpdateCommandSymbol(), sample1().getProjectedSymbols());
    }

  public void testSelfEquivalence(){
    Drop c1 = sample1();
    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, c1, c1);
  }
View Full Code Here

    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, c1, c1);
  }

  public void testEquivalence(){
    Drop c1 = sample1();
        Drop c2 = sample1();
    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, c1, c2);
  }
View Full Code Here

    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, c1, c2);
  }
 
  public void testNonEquivalence(){
        Drop c1 = sample1();
        Drop c2 = sample2();
    int equals = -1;
    UnitTestUtil.helpTestEquivalence(equals, c1, c2);
 
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.lang.Drop

Copyright © 2018 www.massapicom. 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.