Examples of CqlQuery


Examples of org.cyclop.model.CqlQuery

    vh.verifyCompletionNotSupported(completion, "alter table");
  }

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

Examples of org.cyclop.model.CqlQuery

  }

  @Test
  public void testFindCompletion_AlterKeyspace_NotSupported() {
    ContextCqlCompletion completion = cs
        .findCompletion(new CqlQuery(CqlQueryType.ALTER_KEYSPACE, "alter keyspace"));
    vh.verifyCompletionNotSupported(completion, "alter keyspace");
  }
View Full Code Here

Examples of org.cyclop.model.CqlQuery

    vh.verifyCompletionNotSupported(completion, "alter keyspace");
  }

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

Examples of org.cyclop.model.CqlQuery

    verifyInitialCompletion(completion);
  }

  @Test
  public void testFindCompletion_Use_AfterUse() {
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.USE, "use "));
    vh.verifyFullAndMinCompletionTheSame(completion, 3);
    vh.verifyContainsAllKeyspaces(completion.cqlCompletion.minCompletion, true);
  }
View Full Code Here

Examples of org.cyclop.model.CqlQuery

    vh.verifyContainsAllKeyspaces(completion.cqlCompletion.minCompletion, true);
  }

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

Examples of org.cyclop.model.CqlQuery

    verifyInitialCompletion(completion);
  }

  @Test
  public void testFindCompletion_Update_AfterUpdate() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use system"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.UPDATE, "update"));
    vh.verifyContainsAllKeyspacesAndTables(completion, false);
  }
View Full Code Here

Examples of org.cyclop.model.CqlQuery

    vh.verifyContainsAllKeyspacesAndTables(completion, false);
  }

  @Test
  public void testFindCompletion_Update_AfterTableName() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use cqldemo"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.UPDATE, "update mybooks"));
    vh.verifyFullAndMinCompletionTheSame(completion, 3);
    vh.verifyContainsOnlyKeywords(completion.cqlCompletion.minCompletion, CqlKeyword.Def.USING_TTL.value,
        CqlKeyword.Def.USING_TIMESTAMP.value, CqlKeyword.Def.SET.value);
  }
View Full Code Here

Examples of org.cyclop.model.CqlQuery

        CqlKeyword.Def.USING_TIMESTAMP.value, CqlKeyword.Def.SET.value);
  }

  @Test
  public void testFindCompletion_Update_AfterSet() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use cqldemo"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.UPDATE,
        "update mybooks USING TTL 400 SET director = 'Joss Whedon',"));

    vh.verifyFullAndMinCompletionTheSame(completion, 14);

    Collection<? extends CqlPart> cmp = vh.asHahsCol(completion.cqlCompletion.fullCompletion);
View Full Code Here

Examples of org.cyclop.model.CqlQuery

    vh.verifyContainsSystemColumns(cmp, false);
  }

  @Test
  public void testFindCompletion_Update_AfterWhere() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use cqldemo"));
    ContextCqlCompletion completion = cs
        .findCompletion(new CqlQuery(CqlQueryType.UPDATE,
            "update mybooks USING TTL 400 SET director = 'Joss Whedon',main_actor = 'Nathan Fillion',year = 2005 where"));

    vh.verifyFullAndMinCompletionTheSame(completion, 14);

    Collection<? extends CqlPart> cmp = vh.asHahsCol(completion.cqlCompletion.fullCompletion);
View Full Code Here

Examples of org.cyclop.model.CqlQuery

    vh.verifyContainsSystemColumns(cmp, false);
  }

  @Test
  public void testFindCompletion_Truncate_Start() {
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.TRUNCATE, "bara-bara"));
    verifyInitialCompletion(completion);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.