Package org.cyclop.model

Examples of org.cyclop.model.CqlQuery$Adapter


    verifyInitialCompletion(completion);
  }

  @Test
  public void testFindCompletion_Truncate_AfterTruncate() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use system"));

    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.TRUNCATE, "truncate "));
    vh.verifyContainsAllKeyspacesAndTables(completion, false);
  }
View Full Code Here


    vh.verifyContainsAllKeyspacesAndTables(completion, false);
  }

  @Test
  public void testFindCompletion_Truncate_AfterTruncateWithSpaceName() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use system"));

    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.TRUNCATE, "truncate cqldemo. "));
    vh.verifyFullAndMinCompletionNotTheSame(completion, 2, 4);
    vh.verifyCqldemoSpaceInQuery(completion);
  }
View Full Code Here

    vh.verifyCqldemoSpaceInQuery(completion);
  }

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

    verifyInitialCompletion(completion);
  }

  @Test
  public void testFindCompletion_Insert_AfterInsert_SpaceSystem() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use system"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.INSERT, "insert into abc..."));

    vh.verifyContainsAllKeyspacesAndTables(completion, false);
  }
View Full Code Here

    vh.verifyContainsAllKeyspacesAndTables(completion, false);
  }

  @Test
  public void testFindCompletion_Insert_AfterTableName() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use cqldemo"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.INSERT,
        "insert into cqldemo.mybooks ("));

    vh.verifyFullAndMinCompletionTheSame(completion, 13);

    {
View Full Code Here

    }
  }

  @Test
  public void testFindCompletion_Insert_AfterColumns() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use cqldemo"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.INSERT,
        "insert into cqldemo.mybooks (a,b,c)"));

    vh.verifyFullAndMinCompletionTheSame(completion, 1);
    vh.verifyContainsOnlyKeywords(completion.cqlCompletion.fullCompletion, CqlKeyword.Def.VALUES.value);
  }
View Full Code Here

    vh.verifyContainsOnlyKeywords(completion.cqlCompletion.fullCompletion, CqlKeyword.Def.VALUES.value);
  }

  @Test
  public void testFindCompletion_Insert_OnValues() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use cqldemo"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.INSERT,
        "insert into cqldemo.mybooks (a,b,c) values"));

    vh.verifyFullAndMinCompletionTheSame(completion, 1);
    vh.verifyContainsOnlyKeywords(completion.cqlCompletion.fullCompletion, CqlKeyword.Def.VALUES.value);
  }
View Full Code Here

    vh.verifyContainsOnlyKeywords(completion.cqlCompletion.fullCompletion, CqlKeyword.Def.VALUES.value);
  }

  @Test
  public void testFindCompletion_Insert_AfterVaues() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use cqldemo"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.INSERT,
        "insert into cqldemo.mybooks (a,b,c) values ('1','1','bla','2') "));

    vh.verifyFullAndMinCompletionTheSame(completion, 3);
    vh.verifyContainsOnlyKeywords(completion.cqlCompletion.fullCompletion, CqlKeyword.Def.USING_TTL.value,
        CqlKeyword.Def.USING_TIMESTAMP.value, CqlKeyword.Def.AND.value);
View Full Code Here

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

  @Test
  public void testFindCompletion_Insert_AfterInsert_SpaceCqlDemo() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use cqldemo"));
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.INSERT, "insert into abc..."));

    vh.verifyContainsAllKeyspacesAndTables(completion, true);
  }
View Full Code Here

    vh.verifyContainsAllKeyspacesAndTables(completion, true);
  }

  @Test
  public void testFindCompletion_CreateKeyspace_AfterCreate() {
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.CREATE_KEYSPACE,
        "create keyspace "));

    vh.verifyFullAndMinCompletionTheSame(completion, 2);

    ImmutableSortedSet<? extends CqlPart> cmp = completion.cqlCompletion.fullCompletion;
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.