Package net.sf.jsqlparser.statement.create.view

Examples of net.sf.jsqlparser.statement.create.view.CreateView


    super(arg0);
  }

  public void testCreateView() throws JSQLParserException {
    String statement = "CREATE VIEW myview AS SELECT * FROM mytab";
    CreateView createView = (CreateView) parserManager.parse(new StringReader(statement));
    assertFalse(createView.isOrReplace());
    assertEquals("myview", createView.getView().getName());
    assertEquals("mytab", ((Table) ((PlainSelect) createView.getSelectBody()).getFromItem()).getName());
    assertEquals(statement, createView.toString());
  }
View Full Code Here


  }
 
  public void testCreateView5() throws JSQLParserException {
    String statement = "CREATE VIEW myview AS (SELECT * FROM mytab)";
    String statement2 = "CREATE VIEW myview AS SELECT * FROM mytab";
    CreateView createView = (CreateView) parserManager.parse(new StringReader(statement));
    assertFalse(createView.isOrReplace());
    assertEquals("myview", createView.getView().getName());
    assertEquals("mytab", ((Table) ((PlainSelect) createView.getSelectBody()).getFromItem()).getName());
    assertEquals(statement2, createView.toString());
  }
View Full Code Here

TOP

Related Classes of net.sf.jsqlparser.statement.create.view.CreateView

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.