Package org.cyclop.model

Examples of org.cyclop.model.CqlPart


          CqlKeywordValue.Def.DURABLE_WRITES.value, CqlKeywordValue.Def.CLASS.value, CqlKeyword.Def.AND.value);
    }

    {
      ImmutableSortedSet<? extends CqlPart> fcmp = completion.cqlCompletion.fullCompletion;
      assertTrue(fcmp.toString(), fcmp.contains(new CqlPart(",oldnetworktopologystrategy")));
      assertTrue(fcmp.toString(), fcmp.contains(new CqlPart("(class")));
      assertTrue(fcmp.toString(), fcmp.contains(new CqlPart(":replication_factor")));
      assertTrue(fcmp.toString(), fcmp.contains(new CqlPart(":class")));
    }
  }
View Full Code Here


    return ImmutableSet.copyOf(col);
  }

  public void verifyCompletionNotSupported(ContextCqlCompletion completion, String pref) {
    verifyFullAndMinCompletionTheSame(completion, 1);
    completion.cqlCompletion.fullCompletion.contains(new CqlPart(pref + "' is not supported yet....."));
  }
View Full Code Here

    for (String prefix : prefixes) {
      for (String colNam : columnNamesBasic) {
        String conNamFull = prefix + colNam;
        assertEquals(conNamFull + " not found in: " + col.toString(), contains,
            col.contains(new CqlPart(conNamFull)));
      }
    }

  }
View Full Code Here

  @Inject
  private QueryService queryService;

  public ColumnsCompletion() {
    super(new CqlPart("set"));
  }
View Full Code Here

  @Inject
  private QueryService queryService;

  public ColumnsCompletion() {
    super(new CqlPart("("));
  }
View Full Code Here

class AfterValuesPartCompletion extends MarkerBasedCompletion {

  private CqlCompletion completion = null;

  public AfterValuesPartCompletion() {
    super(new CqlPart(")"));
  }
View Full Code Here

      }

      StringBuilder buf = new StringBuilder();
      Iterator<? extends CqlPart> partIt = currentCompletion.cqlCompletion.minCompletion.iterator();
      while (partIt.hasNext()) {
        CqlPart part = partIt.next();

        String css;
        switch (part.type()) {
        case KEYWORD:
          css = "cq-hint-cqlKeyword";
          break;
        case TABLE:
          css = "cq-hint-cqlTable";
          break;
        case COLUMN:
          css = "cq-hint-cqlColumn";
          break;
        case KEYSPACE:
          css = "cq-hint-cqlKeyspace";
          break;
        case INDEX:
          css = "cq-hint-cqlIndex";
          break;
        case NOT_SUPPORTED:
          css = "cq-hint-cqlNotSupported";
          break;
        case KEYWORD_VALUE:
          css = "cq-hint-cqlKeywordValue";
          break;

        default:
          css = null;
          break;
        }

        if (css == null) {
          buf.append(part.toDisplayString());
        } else {
          buf.append("<span class=\"").append(css).append("\">").append(part.toDisplayString());
          if (partIt.hasNext()) {
            buf.append(", ");
          }
          buf.append("</span>");
        }
View Full Code Here

@Named("insert.AfterColumnsCompletion")
@ThreadSafe
class AfterColumnsCompletion extends StaticMarkerBasedCompletion {

  public AfterColumnsCompletion() {
    super(new CqlPart(")"), CqlCompletion.Builder.naturalOrder().all(CqlKeyword.Def.VALUES.value).build());
  }
View Full Code Here

TOP

Related Classes of org.cyclop.model.CqlPart

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.