Package net.sf.jsqlparser.statement.truncate

Examples of net.sf.jsqlparser.statement.truncate.Truncate


                {if (true) return drop;}
    throw new Error("Missing return statement in function");
  }

  final public Truncate Truncate() throws ParseException {
        Truncate truncate = new Truncate();
        Table table;
    jj_consume_token(K_TRUNCATE);
    jj_consume_token(K_TABLE);
    table = Table();
                        truncate.setTable(table);
                {if (true) return truncate;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here


    super(arg0);
  }

  public void testTruncate() throws Exception {
    String statement = "TRUncATE TABLE myschema.mytab";
    Truncate truncate = (Truncate) parserManager.parse(new StringReader(statement));
    assertEquals("myschema", truncate.getTable().getSchemaName());
    assertEquals("myschema.mytab", truncate.getTable().getFullyQualifiedName());
    assertEquals(statement.toUpperCase(), truncate.toString().toUpperCase());

    statement = "TRUncATE   TABLE    mytab";
    String toStringStatement = "TRUncATE TABLE mytab";
    truncate = (Truncate) parserManager.parse(new StringReader(statement));
    assertEquals("mytab", truncate.getTable().getName());
    assertEquals(toStringStatement.toUpperCase(), truncate.toString().toUpperCase());
  }
View Full Code Here

TOP

Related Classes of net.sf.jsqlparser.statement.truncate.Truncate

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.