Package org.cyclop.model

Examples of org.cyclop.model.CqlQuery


    verifyCreateKeyspaceWith("create keyspace inf not exists with ");
  }

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


    verifyInitialCompletion(completion);
  }

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

    verifyInitialCompletion(completion);
  }

  @Test
  public void testFindCompletion_Delete_AfterDelete() {
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.DELETE, "delete "));

    vh.verifyFullAndMinCompletionTheSame(completion, 30);
    vh.verifyContainsAllColumns(completion, true);

    ImmutableSortedSet<? extends CqlPart> cmp = completion.cqlCompletion.fullCompletion;
View Full Code Here

    vh.verifyContainsOnlyKeywords(cmp, CqlKeyword.Def.FROM.value);
  }

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

    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.DELETE, "delete abc from "));

    verifyAfterFromNoSpqceInQuery(completion);
  }
View Full Code Here

    verifyAfterFromNoSpqceInQuery(completion);
  }

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

    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.DELETE,
        "delete abc from cqldemo."));

    vh.verifyCqldemoSpaceInQuery(completion);
  }
View Full Code Here

    vh.verifyCqldemoSpaceInQuery(completion);
  }

  @Test
  public void testFindCompletion_Delete_AfterTableName_KeyspaceInQuery() {
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.DELETE,
        "delete abc from cqldemo.mybooks"));
    verifyDeleteAfterTableName(completion);
  }
View Full Code Here

    verifyDeleteAfterTableName(completion);
  }

  @Test
  public void testFindCompletion_Delete_AfterTableName_KeyspaceInSession() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use cqldemo"));
    ContextCqlCompletion completion = cs
        .findCompletion(new CqlQuery(CqlQueryType.DELETE, "delete abc from mybooks"));
    verifyDeleteAfterTableName(completion);
  }
View Full Code Here

    verifyDeleteAfterTableName(completion);
  }

  @Test
  public void testFindCompletion_Delete_AfterTableName_WrongKeyspaceInSession() {
    qs.execute(new CqlQuery(CqlQueryType.USE, "use system"));
    ContextCqlCompletion completion = cs
        .findCompletion(new CqlQuery(CqlQueryType.DELETE, "delete abc from mybOoks"));
    verifyDeleteAfterTableName(completion);
  }
View Full Code Here

    verifyDeleteAfterTableName(completion);
  }

  @Test
  public void testFindCompletion_Delete_AfterWhere() {
    ContextCqlCompletion completion = cs.findCompletion(new CqlQuery(CqlQueryType.DELETE,
        "delete abc from cqldemo.mybooks WHERE"));

    vh.verifyFullAndMinCompletionNotTheSame(completion, 15, 15);

    {
View Full Code Here

    }
  }

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

TOP

Related Classes of org.cyclop.model.CqlQuery

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.