Package org.cyclop.model

Examples of org.cyclop.model.CqlQuery$Adapter


    verifyDropTableAfterDrop(completion, true);
  }

  @Test
  public void testFindCompletion_DropTable_AfterDrop_SpaceSystem() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use system"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.DROP_TABLE, "drop table "));
    verifyDropTableAfterDrop(completion, false);
  }
View Full Code Here


    verifyDropTableAfterDrop(completion, false);
  }

  @Test
  public void testFindCompletion_DropTable_AfterDrop_SpaceSystem_IfExists() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use system"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.DROP_TABLE,
        "drop table if exists"));
    verifyDropTableAfterDrop(completion, false);
  }
View Full Code Here

    }
  }

  @Test
  public void testFindCompletion_DropTable_Start() {
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.DROP_TABLE, "dro"));
    verifyInitialCompletion(completion);
  }
View Full Code Here

    verifyInitialCompletion(completion);
  }

  @Test
  public void testFindCompletion_Select_AfterFrom_ContainsColumnsFromKeyspaceInSessionScope() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use cqldemo"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.SELECT, "select * from mybooks"),
        8);
    verifySelectAfterFrom(completion);
  }
View Full Code Here

    verifySelectAfterFrom(completion);
  }

  @Test
  public void testFindCompletion_Select_AfterFrom_ContainsColumnsFromKeyspaceWithTable_CursorOnEnd() {
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.SELECT,
        "select * from cqldemo.mybooks"), 8);
    verifySelectAfterFrom(completion);
  }
View Full Code Here

    verifySelectAfterFrom(completion);
  }

  @Test
  public void testFindCompletion_Select_AfterFrom_ContainsColumnsFromKeyspaceWithTable_CursorOnFrom() {
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.SELECT,
        "select * from cqldemo.mybooks"), 10);
    verifySelectAfterFrom(completion);
  }
View Full Code Here

    verifySelectAfterFrom(completion);
  }

  @Test
  public void testFindCompletion_Select_AfterFrom_NoSpqceInQuery() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use cqldemo"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.SELECT, "select * from "));
    verifyAfterFromNoSpqceInQuery(completion);
  }
View Full Code Here

    verifyAfterFromNoSpqceInQuery(completion);
  }

  @Test
  public void testFindCompletion_Select_AfterFrom_SelectTableFromDifferentSpace() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use system"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.SELECT, "select * from mybooks"),
        8);
    verifySelectAfterFrom(completion);
  }
View Full Code Here

    verifySelectAfterFrom(completion);
  }

  @Test
  public void testFindCompletion_Select_AfterFrom_SpaceInQuery() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use system"));
    ContextCqlCompletion completion = cs
        .findCompletion(new CqlQuery(CqlQueryType.SELECT, "select * from cqldemo."));
    vh.verifyCqldemoSpaceInQuery(completion);
  }
View Full Code Here

    veifySelectWithOrderBy("select * from cqldemo.mybooks ORDER by ");
  }

  @Test
  public void testFindCompletion_Select_AfterSelect_ContainsAllColumns() {
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.SELECT, "select *"), 88);

    vh.verifyFullAndMinCompletionTheSame(completion, 30);
    vh.verifyContainsAllColumns(completion, true);
  }
View Full Code Here

TOP

Related Classes of org.cyclop.model.CqlQuery$Adapter

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.