Examples of DesignDocument


Examples of com.couchbase.client.protocol.views.DesignDocument

    }

  }

  private void createAndWaitForDesignDocs(CouchbaseClient client) {
    DesignDocument designDoc = new DesignDocument("user");
    String mapFunction = "function (doc, meta) { if(doc._class == \"org.springframework.data.couchbase.repository." +
      "User\") { emit(null, null); } }";
    designDoc.setView(new ViewDesign("all", mapFunction, "_count"));
    client.createDesignDoc(designDoc);
  }
View Full Code Here

Examples of com.couchbase.client.protocol.views.DesignDocument

      template.save(new User("testuser-" + i, "uname-" + i));
    }
  }

  private void createAndWaitForDesignDocs(final CouchbaseClient client) {
    DesignDocument designDoc = new DesignDocument("user");
    String mapFunction = "function (doc, meta) { if(doc._class == \"org.springframework.data.couchbase.repository.User\") { emit(null, null); } }";
    designDoc.setView(new ViewDesign("customFindAllView", mapFunction, "_count"));

    client.createDesignDoc(designDoc);

    designDoc = new DesignDocument("userCustom");
    designDoc.setView(new ViewDesign("customCountView", mapFunction, "_count"));

    client.createDesignDoc(designDoc);
  }
View Full Code Here

Examples of com.couchbase.client.protocol.views.DesignDocument

  }

  @Override
  public DesignDocument getDesignDocument(final String designDocumentName) {
    try {
      DesignDocument design = asyncGetDesignDocument(designDocumentName).get();
      if(design == null) {
        throw new InvalidViewException("Could not load design document \""
          + designDocumentName + "\"");
      }
      return design;
View Full Code Here

Examples of com.couchbase.client.protocol.views.DesignDocument

  }

  @Override
  public DesignDocument getDesignDoc(final String designDocumentName) {
    try {
      DesignDocument design = asyncGetDesignDocument(designDocumentName).get();
      if(design == null) {
        throw new InvalidViewException("Could not load design document \""
          + designDocumentName + "\"");
      }
      return design;
View Full Code Here

Examples of com.couchbase.client.protocol.views.DesignDocument

  }

  @Override
  public DesignDocument getDesignDoc(final String designDocumentName) {
    try {
      DesignDocument design = asyncGetDesignDocument(designDocumentName).get();
      if(design == null) {
        throw new InvalidViewException("Could not load design document \""
          + designDocumentName + "\"");
      }
      return design;
View Full Code Here

Examples of com.couchbase.client.protocol.views.DesignDocument

   * @throws CancellationException if operation was canceled.
   */
  @Override
  public DesignDocument getDesignDocument(final String designDocumentName) {
    try {
      DesignDocument design = asyncGetDesignDocument(designDocumentName).get();
      if(design == null) {
        throw new InvalidViewException("Could not load design document \""
          + designDocumentName + "\"");
      }
      return design;
View Full Code Here

Examples of com.couchbase.client.protocol.views.DesignDocument

  }

  @Override
  public DesignDocument getDesignDoc(final String designDocumentName) {
    try {
      DesignDocument design = asyncGetDesignDocument(designDocumentName).get();
      if(design == null) {
        throw new InvalidViewException("Could not load design document \""
          + designDocumentName + "\"");
      }
      return design;
View Full Code Here

Examples of com.couchbase.client.protocol.views.DesignDocument

  }

  @Override
  public DesignDocument getDesignDoc(final String designDocumentName) {
    try {
      DesignDocument design = asyncGetDesignDocument(designDocumentName).get();
      if(design == null) {
        throw new InvalidViewException("Could not load design document \""
          + designDocumentName + "\"");
      }
      return design;
View Full Code Here

Examples of com.couchbase.client.protocol.views.DesignDocument

  }

  @Override
  public DesignDocument getDesignDoc(final String designDocumentName) {
    try {
      DesignDocument design = asyncGetDesignDocument(designDocumentName).get();
      if(design == null) {
        throw new InvalidViewException("Could not load design document \""
          + designDocumentName + "\"");
      }
      return design;
View Full Code Here

Examples of org.ektorp.support.DesignDocument

            throw new IllegalStateException(e);
        }
        stdCouchDbInstance = new StdCouchDbInstance(httpClient);
        db = new StdCouchDbConnector(dbName, stdCouchDbInstance);
        db.createDatabaseIfNotExists();
        designDocument = new DesignDocument("_design/channels");
        addView(designDocument, Views.CHANNEL);
        addView(designDocument, Views.UAID);
        addView(designDocument, Views.TOKEN);
        addView(designDocument, Views.UNACKS);
        addView(designDocument, Views.SERVER);
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.