Couchbase .NET Client Library 1.1
The Couchbase .NET Client Library 1.1 has been released!
New in this version is a complimentary API with methods that provide detailed information about an operation.
Where previously, you would call the Store method as follows:
var result = client.Store(StoreMode.Set, "foo", bar");
if (! result) {
Console.WriteLine("Store failed");
}You could now use the ExecuteStore method as follows:
var result = client.ExecuteStore(StoreMode.Set, "foo", bar");
if (! result.Success) {
Console.WriteLine("Store failed with message {0}", result.Message);
}In addition to the Store method, the Get, Cas, Append, Prepend, Increment, Decrement and Remove methods all have Execute variations that return an instance of an IOperationResult implementation.
var getResult = client.Get<Beer>("beer_american_pale_ale");
if (getResult.Success && getResult.HasValue) {
var beer = getResult.Value;
beer.Brewery = "Thomas Hooker Brewing Company";
var casResult = client.Cas(StoreMode.Set, "beer_american_pale_ale", beer, getResult.Cas);
if (! casResult.Success && casResult.Exception != null) {
logger.Error(casResult.Message, casResult.Exception);
}
}Downloads - now with Enyim.Caching logging assemblies:
Nuget: http://nuget.org/packages/CouchbaseNetClient
Zip: http://packages.couchbase.com/clients/net/1.1/Couchbase-Net-Client-1.1.zip
Documentation:
Release notes: http://www.couchbase.com/docs/couchbase-sdk-net-1.1/couchbase-sdk-net-rn...
Logging: http://www.couchbase.com/docs/couchbase-sdk-net-1.1/couchbase-sdk-net-lo...
API Reference: http://www.couchbase.com/docs/couchbase-sdk-net-1.1/api-reference-summar...
New Method Summary: http://www.couchbase.com/docs/couchbase-sdk-net-1.1/api-overview.html#co...
Further Reading:
http://www.couchbase.com/develop/net/current (see Operation Results section)
If you have any questions, please post them.
-- John
GetView() is in the Developer Preview for the 1.2 Client Library. That's at http://www.couchbase.com/develop/net/next. Going forward, Nuget will likely have only official releases. The 1.1 functionality will get merged into 1.2 before it's released.
Hi John,
Thanks for the info. When will the new version available?
Jackneel
The new version will be released along with the official release of Couchbase Server 2.0. The exact schedule for that is still being worked out though. I'll update the forums with an announcement the next time I release a developer preview...
Hi John,
What happened to GetView() for views/queries?. This was available in previous version.
Thanks