Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Code indentation

...

Code Block
languagejava
from("couchbase:http://localhost/beer-sample?designDocumentName=beer&viewName=brewery_beers&limit=10")
	.to("mock:result");

 

Add a document with ID "12346" to "default" bucket:

Code Block
languagejava
from("direct:start")
	.setHeader(CouchbaseConstants.HEADER_ID, constant("123456"))
	.to("couchbase:http://localhost/default");

...

Add documents to default bucket automatically generating ids, starting from 1000:

Code Block
languagejava
from("direct:start")
                        	.to("couchbase:http://localhost/default?autoStartIdForInserts=true&startingIdForInsertsFrom=1000")

 

Delete document with ID "120770" from "default" bucket:
Code Block
languagejava
from("direct:start")
                        	.setHeader(CouchbaseConstants.HEADER_ID, constant("120770"))
                        	.to("couchbase:http://localhost/default?operation='DELETE'")