-
Notifications
You must be signed in to change notification settings - Fork 71
Release notes
Semantic versioning is used. See http://semver.org for more info. Basically this means that version format is: v[Major].[Minor].[Patch] and as long as Major hasn't been bumped, you should be able to update without any breaking API changes.
New: Adds support for passing custom args in GetChangesRequest which can be used to solve #148 - thanks to @svenmrn for the contrib
No feature changes but drops explicit support for .NET4.5.1. Still multi targets .NET Standard 1.1 (.NET 4.5+) and .NET Standard 2.0 (.NET 4.6.1+) More info: https://docs.microsoft.com/en-us/dotnet/standard/net-standard
[Update]: Drops explicit support for .NET4.5.1 (still supports .NET Standard 1.1 and .NET Standard 2.0)
[Update]: Updates to latest external dependencies.
Build has been setup on Azure DevOps using Ubuntu.
[Update]: Cancellation tokens in app places (thanks @SimonCropp)
[Updated]: Changes Store.DeleteAsync(entity) to lookup rev if not assigned.
[Update]: Removes support for params as arguments in various places.
[Update]: Updates to latest external dependencies.
New: 143 Added new overload to Changes, to allow async consumption of the data.
[Fix]: 117: PostIndexRequest fails when explicitly setting Type
[Fix]: 136: DbConnectionInfo and host issues when behind reverse proxy/load balancer
[Update]: Multi target .NET4.5.1, .NET Standard 1.1, .NET Standard 2.0
[Update]: Lates Ensure.That and removed obsolete warnings.
[Update]: to latest Ensure.That as there were breaking changes.
[Update]: to latest Newtonsoft.
Removed Cloudant and targets .NET Standard 1.1
NOTE! The constructor definition of the clients, e.g. MyCouchClient has changed.
Summary of all release candidates:
[Fixed]: issue94 Misstakenly used async void in some places... shame, shame, shame. This has bee refactored to use async Task instead, so now inner exceptions will bubble correctly at all places.
[Fixed] - issue93 Value types in: QueryViewRequest.Configure(q => q.Keys(10, 30); wasn't properly converted
[Fixed] - MyCouchStore when getting documents and headers via the AllDocs view, deleted docs are now filtered away.
[Fixed] - issue85 - GetHeaders now works if you query for non existing id. Thanks @ncruces
New - issue67 - Support for BulkRequest.AllOrNothing and BulkRequest.NewEdits. Thanks @tohogan!
New - PCL now should support aspnetcore as well. There will be a specific NON PCL for this before final release.
[Removed] - dependency on Ensure.That as a NuGet. It's now instead incorporated as a source package.
[Removed] - MyCouchUriBuilder use DbConnectionInfo or ServerConnectionInfo instead.
[Dropped] - support for .Net40 as it currently just brings pain for development and has a bug in the framework: https://github.com/danielwertheim/mycouch/wiki/release-notes#v242---2014-10-11
[Changed] - You now need to specify db-name explicitly when constructing a MyCouchClient. So the Uri is now pointing to the server address instead. MyCouch does not try to extract the db-name anymore from the provided Uri.
[Fixed]: issue94 Misstakenly used async void in some places... shame, shame, shame. This has bee refactored to use async Task instead, so now inner exceptions will bubble correctly at all places.
[Fixed] - issue93 Value types in: QueryViewRequest.Configure(q => q.Keys(10, 30); wasn't properly converted
[Fixed] - MyCouchStore when getting documents and headers via the AllDocs view, deleted docs are now filtered away.
[Fixed] - issue85 - GetHeaders now works if you query for non existing id. Thanks @ncruces
New - issue67 - Support for BulkRequest.AllOrNothing and BulkRequest.NewEdits. Thanks @tohogan!
New - PCL now should support aspnetcore as well. There will be a specific NON PCL for this before final release.
[Removed] - dependency on Ensure.That as a NuGet. It's now instead incorporated as a source package.
[Removed] - MyCouchUriBuilder use DbConnectionInfo or ServerConnectionInfo instead.
[Dropped] - support for .Net40 as it currently just brings pain for development and has a bug in the framework: https://github.com/danielwertheim/mycouch/wiki/release-notes#v242---2014-10-11
[Changed] - You now need to specify db-name explicitly when constructing a MyCouchClient. So the Uri is now pointing to the server address instead. MyCouch does not try to extract the db-name anymore from the provided Uri.
New - Simplified how you can hook into the before- and after request, to intercept the request or response.
client.Connection.BeforeSend = async request =>
{
request.Headers.Add("X-Something", "Weird");
};
client.Connection.AfterSend = async response =>
{
var s = await response.Content.ReadAsStringAsync();
//...
};The longer approach would be:
public class MyDbConnection : DbConnection
{
public MyDbConnection(ConnectionInfo connectionInfo)
: base(connectionInfo) {}
protected override void OnBeforeSend(HttpRequest httpRequest)
{
base.OnBeforeSend(httpRequest);
}
protected override void OnAfterSend(HttpResponseMessage httpResponse)
{
base.OnAfterSend(httpResponse);
}
}for use with a injected boostrapper:
var bs = new MyCouchClientBootstrapper
{
DbConnectionFn = cnInfo => new MyDbConnection(cnInfo)
};
using (var client = new MyCouchClient("http://localhost:5984/foo", null, bs))
{
//... ...
}Bug-fix release.
[Fixed] - Issue #75
When having specific security for a database and performing a GET against a _design document to get the JSON of it using e.g. client.Documents.Get("_design/test") the HttpClient auto followed the underlying redirect returned by CouchDB, which did not work for design documents. With this release, MyCouch intercepts the redirect and redirects to it without encoding so that it works.
[Improved]: The entity reflection for working with _id and _rev members when using e.g. client.Entities are now by default cached between clients. If you don't want this, just inject a new MyCouchClientBootstrapper() to the MyCouchClient, then nothing is shared.
This means you should now not have any performance hits of creating client-per-request instead of sharing one.
New: Support for PUT of entities not having any _id and/or _rev member, by explicitly passing them as arguments. E.g:
var r1 = await client.Entities.PutAsync(
"myid2", //explicitId
new { Player = "Dan", Score = 42 });
var r2 = await client.Entities.PutAsync(
"myid2", //explicitId
new HighScore { Player = "Dan", Score = 42 });
var r3 = await client.Entities.PutAsync(
"myid3", //explicitId
"2-32a32...", //explicitRev
new { Player = "Dan", Score = 42 });
var r4 = await client.Entities.PutAsync(
"myid4", //explicitId
new { Id = "IdNotBeingUsed", Player = "Dan", Score = 42 });If you pass in an entity that has properties for [_id, Id, DocumentId....] (see conventions in the wiki) and/or [_rev, Rev, DocumentRev...]; those will be updated in the entity, with the explicitId being passed, as well as the new _rev returned by CouchDB.
New: Support for Show functions. Thanks to @indranilatcal for PR#66.
var showRequest = new QueryShowRequest("mydesigndoc", "myshowfunc")
.Configure(c => c.DocId("someDocId"));
var xmlShowRequest = new QueryShowRequest("mydesigndoc", "myshowfunc")
.Configure(c => c.DocId("someDocId").Accepts(HttpContentTypes.Xml));
var response1 = await client.Documents.ShowAsync(showRequest);
var response2 = await client.Documents.ShowAsync(xmlShowRequest);
response1.Content ... ...;
response2.Content ... ...;[Changed]: Dependencies on Reactive-Extensions has been removed. The only operation that makes uses of IObservable is when you consume the Changes stream. You can then if you want, naturally take a dependency on RX if you want.
[Changed]: DbClientConnection --renamed--> DbConnection.
[Changed]: ServerClientConnection --renamed--> ServerConnection.
[Changed]: MyCouchClient and MyCouchServerClient no longer accepts IDbConnection or IServerConnection. Instead, these are located on the MyCouchClientBootstrapper.DbConnectionFn | ServerConnectionFn.
New: MyCouchClient and MyCouchServerClient now accepts an instance of ConnectionInfo which can be used to configure e.g. cnInfo.Timeout = TimeSpan.FromMilliseconds(Timeout.Infinite) useful e.g. if you consume the continuous changes stream as discussed here: https://github.com/danielwertheim/mycouch/issues/62
New: Inital support for Cloudant's MongoDB inspired queries using MyCouchCloudantClient.Queries.FindAsync. Initially you provide the SelectorExpression using simple JSON-strings. You can of course use e.g. Newtonsoft's JObject. Thanks to @indranilatcal for the work with PR #54 (https://github.com/danielwertheim/mycouch/pull/54)
More dynamic/friendly configuration will come. But for now, you can e.g. define your expressions like this:
request.Configure(q => q.SelectorExpression("{\"author.age\": {\"$gt\": 42}");or
var selector = new JObject
{
{"author.age", new JObject
{
{"$gt", 32}
}
}
}.ToString();
request.Configure(q => q.SelectorExpression(selector);New: Response.ETag which will be populated when applicable, e.g. for ViewQueryResponses.
New: Support for defining a List-function when querying a view (secondary index) via e.g. QueryViewRequest.Configure(c => c.WithList("mylist")) which is applicable for use with client.Views.QueryRawAsync
[Fix]: Ooops. Fields of the custom MyCouchResponseException were never populated. Thanks to @hambroz and PR #63 (https://github.com/danielwertheim/mycouch/pull/63)
New feature release.
-
New: Support for
CancellationTokenforView.QueryAsync- thanks to @HCanber https://github.com/danielwertheim/mycouch/pull/60
New feature release.
-
New: https://github.com/danielwertheim/mycouch/issues/58 - Lets you get the result of a query as pure JSON, using
client.Views.QueryRawAsync.
Please note, this release has different behavior for .Net4.0 vs .Net4.5. See below for more info.
- [Fix]: Issue #57 - Document ids must be encoded - this has been solved for
.Net4.5+ & PCLbut for.Net4.0there's no good solution yet. More information here: http://danielwertheim.se/2014/10/11/uri-behaves-differently-in-net4-0-vs-net4-5/ To get this to work in .Net4.0, unfortunately you have to add configuration inApp.configorWeb.configorMachine.configaccording to: http://msdn.microsoft.com/en-us/library/ee656539(v=vs.110)
More info about this in the docs: Support for _id in the need of encoding
- [Fix]: When querying a view (secondary-index) and that returns a complex-key with an array:
[["a", "b"], 1123134]the nested array was not parsed correctly as pointed out in (issue #46)
-
New: Thanks to @indranilatcal there's now support for
drilldownwhen using theCloudantClient.Searches
-
New: Thanks to @indranilatcal there's now support for
countsandrangeswhen using theCloudantClient.Searches - [Fix]:
MyCouchCloudantServerClientwas not included inNet40
Fix release.
- [Fix]: Ids for views e.g. _design/id are not extracted correctly - https://github.com/danielwertheim/mycouch/issues/48
- [Fix]: Cannot parse the order for searches sorted by string - https://github.com/danielwertheim/mycouch/issues/47
- [Fix]: StartKeyDocId encodes parameter as JSON- https://github.com/danielwertheim/mycouch/issues/45
- [Fix]: Avoid double IDs with Entities- https://github.com/danielwertheim/mycouch/issues/44
-
[Fix]: When configuring queries via
Queryused inMyCouchStoreorQueryViewRequestused inClient.Views; e.g.Configure(q => q.Keys(mykeys))wheremykeyswas null or empty, the underlying query got executed against all documents. If you still need this behavior, you can assign the value using the property instead of the fluent configuration methods, e.g.:Configure(q => q.Keys = mykeys). -
New:
MyCouchStore.GetHeaders(ids) : IObservable<DocumentHeader> -
New:
MyCouchStore.GetHeadersAsync(ids, callback) -
New:
BulkResponse.Row.Succeeded:boolto indicate if the individual row succeeded or not.
Fix release for yesterdays release. Await was not configured correctly, hence calls to MycouchStore could hang in e.g. webapp.
Added a new simple feature for Cloudant, to generate new API-keys. The rest of the release has been about extending IMyCouchStore with some more "simplifying" members.
Cloudant:
-
New:
MyCouchCloudantServerClient.Security.GenerateApiKey- Read more at Cloudant
General:
-
New:
MyCouchStore.SetAsyncused to overwrite last revision of a document without knowing the last known revision. To minimize overhead, it uses a simpleHEADrequest to look up the revision. NOTE If you know therev, useStoreAsyncinstead. -
New:
MyCouchStore.GetByIds(ids[]) : IObservable<string> -
New:
MyCouchStore.GetByIds<TEntity>(ids[]) : IObservable<TEntity> -
New:
MyCouchStore.GetByIdsAsync(ids[], callback):Task<QueryInfo> -
New:
MyCouchStore.GetByIdsAsync<TEntity>(ids[], callback) : Task<QueryInfo> -
New:
MyCouchStore.DeleteAsync(id)- look up latest rev once. NOTE If you know therev, useDeleteAsync(id, rev)instead. -
New:
MyCouchStore.DeleteAsync<TEntity>(entity, lookupRev = false)- look up latest rev once iftrue. -
New:
MyCouchStore.GetValueByKeys(view, keys[]) : IObservable<string> -
New:
MyCouchStore.GetValueByKeys<TEntity>(view, keys[]) : IObservable<TEntity> -
New:
MyCouchStore.GetIncludedDocByKeys(view, keys[]) : IObservable<string> -
New:
MyCouchStore.GetIncludedDocByKeys<TEntity>(view, keys[]) : IObservable<TEntity> -
New:
MyCouchStore.GetValueByKeysAsync(view, keys[], callback) : Task<QueryInfo> -
New:
MyCouchStore.GetIncludedDocByKeysAsync(view, keys[], callback) : Task<QueryInfo> -
New:
MyCouchStore.GetValueByKeysAsync<TEntity>(view, keys[], callback) : Task<QueryInfo> -
New:
MyCouchStore.GetIncludedDocByKeysAsync<TEntity>(view, keys[], callback) : Task<QueryInfo>
Some breaking changes that you need to be aware of. The one affecting data is described below (and how you can reset old behavior). Also. The serialization and deserialization proccess has been reworked.
-
New:
GetDocumentRequest.Conflicts:boolif set to true, the JSON returned will include the_conflictsarray. -
New:
GetEntityRequest.Conflicts:boolif set to true, the JSON returned will include the_conflictsarray. - [Fix]: Only top level members of entities should fall under the convention rules with:
_id, DocumentId, EntityId and Id. - [Fix]: Ensure that
Revis populated inGETof Document or Entity. - [Fix]: Ensure that
idsetc. are URL encoded before sending as part of URLs. - [CHANGED]: When using the convention based serialization via
Client.EntitieswherePUTandPOSTinserts documents, it adds a value for$docType. PREVIOUSLY the value (name of the class) vaslower-case, it's nowcamel-casedinstead. You can configure this via theMyCouchClientBootstrapper.SerializationConfiguration. Let it return aSerializationConfigurationobject whereconfiguration.Conventions.DocTypeis assigned to one that supports the old format. - [Changed]:
GETon documents now returnsGetDocumentResponsebut it still extendsDocumentResponse. - [Changed]:
GETon entities now returnsGetEntityResponse<T>but it still extendsEntityResponse<T>. - [Changed]: Replication via
ServerClient.Databases.Replicateis now accessed viaServerClient.Replicator.Replicateinstead, and now uses the_replicatordatabase instead. This ensures that e.g. continuous replications survives restarts. To stop a continuous replication, just delete the document from the_replicatordb. - [Changed]: The
HttpRequestFactoriesnow returns a customHttpRequestinstead ofHttpRequestMessageand they now generate relative URLs instead of complete URIs. The complete URI is generated atSendin the underlyingConnectionimplementation. - [Changed]: There is now only one
Serializer(DefaultSerializer) that is configured in TWO different ways in the boostrapper. The one that is configured and used onIMyCouchClient.Serializeris vanilla serialization. Then forEntitiesandViewsandIMyCouchClient.DocumentSerializerthere is one that supports some conventions. It should now only try to map_idbetween e.g.DocumentId, Id, _Id, EntityId, [Class]Idif it's a property on the root. - [Changed]: There is now only one
MyCouchClientBootstrapperand it's configuration has changed. - [Changed]:
Connectionnow accepts aHttpRequestinstead ofHttpRequestMessage. - [Remove]: The member that was marked as obsolete
EntityResponse.Entityhas been removed. UseContentinstead.
Cleaning up interfaces from multitudes of overloads etc. that could be added by you using extension methods. Focus has also been on creating server based operations. The current MyCouchClient has been oriented around database operations. The new MyCouchServerClient can be used to handle e.g. replication and to create databases etc.
-
[Removed]: Some querying overloads to
IMyCouchStoreandIViewshas been removed. If needed, add simplification overloads as extension methods instead. -
[Removed]: Some search overloads to
Cloudant.ISearcheshas been removed. If needed, add simplification overloads as extension methods instead. -
[Removed]:
ClientExecuteExtensionswhich had extension methods for allowing e.g.client.PerformAsync(request). If needed, add as custom extension methods in your code-base. -
[Removed]:
Ensure.Thatas NuGet package dependency. Instead included as source. -
[Changed]:
Database.GetAsyncnow returns typedGetDatabaseResponseinstead ofTextResponse. -
[Changed]:
Database(s)operations that previously returned genericTextResponsenow returns specificDatabaseHeaderResponse. -
[Changed]: The custom request header that is added to each
HttpRequestand removed inConnectionjust before it's sent to CouchDb, is now namedmycouch-request-typeinstead ofmycouch-type. -
[Changed]:
Queryused in conjunction withIMyCouchStoreis now configured the same way asQueryViewRequests. Hence either by setting properties or by calling fluent:query.Configure(q => q.Stale(false).IncludeDocs(true));. -
[Changed]:
IMyCouchStore.ObservableQueryis nowIMyCouchStore.Query. -
[Changed]:
MyCouchExceptionis nowMyCouchResponseException. -
[Changed]: When generating JSON for query request, e.g. for JSON compatible dates, the internal serializer is now used for this. This leads to that also milliseconds will be passed and not only seconds.
-
[Changed]:
client.Database.ViewCleanupis nowclient.Database.ViewCleanupAsync -
New: Support for
Windows store 8 & 8.1is now provided using a Portable class library. -
New:
IMyCouchStore.QueryAsyncreturns a slimmed down result with e.gTotalRows,Offsetetc. while you get the actual row-data via a callback. -
New:
GetDocumentRequestnow has aConflicts:boolproperty that can be set to have_conflictsbeing part of the document response. -
New:
MyCouchServerClientused for connecting against a "server" and not to a certain "db" to perform stuff likereplication.
-
New: Support for persisting anonymous types, e.g.
client.Entities.PostAsync(new { Name ="Daniel" }) - New: Added the overload for consuming the changes API via callback, back. So either you can use that or RX and IObservable.
-
New:
MyCouch.MyCouchStoresimplified and opinionated abstraction over aIMyCouchClient. Lets you work with entities and JSON directly without going via http-requests and http-responses. It also lets you query views, usingIObservable<>. E.g:s.StoreAsync(json):Task<DocumentHeader>s.StoreAsync<TEntity>(entity):Task<TEntity>s.GetByIdAsync(id, [rev]):Task<string>s.GetByIdAsync<TEntity>(id, [rev]):Task<TEntity>s.ObservableQuery<TEntity>(query) : IObservable<Row<TEntity>>
-
New:
Client.Database.GetAsync()whereResponse.Contentwill contain JSON with db-info. - [Changed]:
Client.Databasesis nowClient.Databasesince it operates on the current database. - [Changed]:
Documents.ExistsAsyncis nowDocuments.HeadAsync. Exists is now part of an abstraction/simplification in the newMyCouch.MyCouchStore. - [Changed]: Internal changes to Responses and ResponseFactories.
- [Changed]:
EntityResponsesnow haveContentinstead ofEntityas a property. TheEntityproperty is marked as obsolete. - [Changed]:
QuerySystemViewRequesthas been removed. TheQueryViewRequestnow supports either only specifyingViewNameand notDesignDocumentor by injecting aSystemViewIdentity. - [Changed]: Fixed misspell of
BootstrapertoBootstrapper, affectingMyCouchClientBootstraperandMyCouchCloudantClientBootstraper - [Removed]: Helper for machine specific connection strings. It has nothing to do with MyCouch. But the helper is documented here if you want to add it.
This is an upcoming release. Focus has been on making names more "friendly" in setting the context as well as some small fixes.
- [Fix]: '$doctype' was included as empty value if anonymous type. Should not be included at all for anonymous types.
- [Fix]:
PUTnow accepts id's with chars that should be escaped, e.g._design/some_name. - [Fix]: In some responses, if no
_idwas returned in the actual response, MyCouch tried to extract it from the requested resource by inspecting utURI, this was also done in the case of aPOST, which should not be done. -
New: Added simple helpers to
ViewQueryResponse.Row, which lets you read theKeyin different formats. - [Changed]: IClient is now IMyCouchClient
- [Changed]: Client is now MyCouchClient
- [Changed]: ClientBootstraper is now MyCouchClientBootstraper
- [Changed]: ICloudantClient is now IMyCouchCloudantClient
- [Changed]: CloudantClient is now MyCouchCloudantClient
- [Changed]: CloudantClientBootstraper is now MyCouchCloudantClientBootstraper
This release has mostly been about enabling more meta-data in documents.
- [Changed]:
$doctypeis now also injected forClient.Documentsoperations and not onlyClient.Entities. More info - [Changed]:
$doctypewill not be injected for anonymous types. More info -
New:
DocumentAttributecan be used to provide meta-data likeDocType, which will be used by the serializer to generated the$doctypevalue. If not specified, theType.Namewill be used instead. Read more here: More info -
New:
DocumentAttribute.DocNamespace- Read more -
New:
DocumentAttribute.DocVersion- Read more -
New:
Client.Documents.SerializervsClient.Serializer. The former has some convention support as$doctype; the later has no support what so ever for conventions. More a pure JSON.Net serializer. -
New:
PostDocumentRequestandPutDocumentRequestnow has a boolBatchproperty that can be set to true to get batch write behavior.
This was intended to be a pure fix release, hence v0.17.1 but since upgrade to VS2013 and me not adding the extension to keep supporting Windows Store 8 apps and only Windows store 8.1 apps, this release has updated the Windows store lib to 8.1. IF YOU WANT 8.0, please let me know. Also v0.19.0 is the same codebase, just messed up some NuGet stuff.
- [Fix/Changed]: Enums are now seraialized as strings. If you want to treat it as numeric, use the bootstraper to inject a custom serialization configuration: https://github.com/danielwertheim/mycouch/wiki/documentation#bootstraping
- [Fix]: When creating a query on keys, enums where not formatted correctly.
- [Changed]: Windows store lib has been updated to target 8.1 and not 8.0. Please let me know if you need 8.0 support.
This realease has been about getting MyCouch.Cloudant out, with support for Lucene Searches.
- [Fix]:
Stalefor View queries where formatted incorrectly. -
New: New NuGet package
MyCouch.Cloudantwhich contains cloudant specific features. The first feature to be released is support for Lucene searches according to Cloudant docs. - [Changed]: QueryViewRequest.View is now named QueryViewRequest.ViewIdentity
- [Changed]: All fields that represents a
sequencelikelast_seqin a Change feed response, is now treated as astring. This since Cloudant has the notion of abookmarkwhich is a string. And this will also be more future proof.
Small release to support inheritance for entities.
-
New: You can now have a
ModelIdandModelRevdefined in a base-class named:[ClassName]Idor[ClassName]Rev. This was raised by user request: read
Small release to simplify working with HttpRequest at the lowest level.
-
New: The HttpRequest now gets a custom header
mycouch-typeandmycouch-entitytype(defined inHttpRequest.CustomHeaders) which could be used in theIConnectionto perform additional logic before sending the actual request. NOTE! By default, these headers are removed right before sending them to e.g. CouchDb. You can read an example use-case with Cloudant here.
Main focus on Changes feed support. This is hopefully also the last "major" changes introduced of the public API, before going v1.0.0.
-
New:
GetChangesRequestis used to consume the_changesview of CouchDb and is accessed viaClient.Changes.GetChangesAsyncor viaClient.Perform(request). Supported feeds are:Normal, Longpolling and Continuous. Read more in the docs -
New:
ContentTypehas been added to responses. Mostly because you need it when working with attachments. -
New:
Client.Views.Query<TValue, TIncluded>(request)which should be used when you want anyIncludedDocof the view query to be of a specific type. If not set, it will be treated as RAW-JSON. - [Fixed/Changed]:
Attachmentswere wrongly base64 encoding data uponPUTof attachments before sending it to CouchDb and then decoding when doingGET. Only inline attachments should be base64 encoded and only on the way in. NOTE! You will have to decode any previously stored attachments when doingGETs. - [Changed]:
JsonViewQueryResponseis nowViewQueryResponse, hence there are nowViewQueryResponse<T>andViewQueryResponse(the latest is used to get raw JSON responses). - [Changed]: The internal custom deserialization of e.g. view query results has been rewritten and simplified, just to make the code-base much slimmer and easier to work with.
- [Changed]:
ICommandis nowIRequestand all commands are placed underRequests. - [Changed]:
ViewQueryis nowQueryViewRequestand placed underRequests. - [Changed]:
SystemViewQueryis nowQuerySystemViewRequest. - [Changed]:
ViewQueryOptionswhich was used inViewQuery.Optionsis now removed, and all options are instead located directly onQueryViewRequest. - [Changed]:
ViewQueryConfiguratoris nowQueryViewRequestConfiguratorand located underMyCouch.Requests.Configurators. - [Changed]: The simplifying Client extension methods for performing requests, e.g.
Client.ExecuteAsync(GetChangesRequest)is now renamed toPerformAsyncto better reflect that it is a request and not a command.
- [Fixed]: Disposal of requests and responses.
- [Fixed]: Misspelling of
ClientBootsraper, which now isClientBootstraper.
The work of this release has been focused on bringing in support for keys being other that strings. As integers, floats, booleans, dates and complex-keys (arrays).
- New: Support for keys other than string when building queries against views.
- New: Support for complex keys when building queries against views.
- [Changed]:
ViewQueryOptionsdoesn't specify defaults anymore. If you don't provide values for the query options, no default value will be sent to CouchDb, but the defaults in CouchDb will be used instead. This has required e.g. a change of some value types onViewQueryOptionsto becomeNullable<T>instead ofT.
This release has a bunch of internal changes and some public. The one breaking change you most likely will encounter is the change of client.Views.RunQueryAsync is now client.Views.QueryAsync.
- [Fixed]: Bug with query of views that does not return any keys, previously caused an exception. This has now been fixed.
- [Fixed]: Bug with
DeleteofEntitywithoutIdandRev, causing try of delete of db. - [Fixed]: Requests sent for querying views are now sent using
POSTto not get constraints of many keys creating a to long query-string. - [Changed]:
Views.RunQueryAsyncis now namedViews.QueryAsync. - [Changed]: No more
classrequirement onTofViewQueryResponse<T>. Hence you can now use it on simple reduces returning e.g. an integer. - [Changed]:
ViewQueryResponse<T>.Row.Docis now namedIncludedDoc. This since it better reflects that the value that ends up in there is the value included in the result if you useinclude_docs=true. - [Changed]:
ViewQueryResponse<T>supportsstring, string[], dynamic, entityand now even simple values likeint. - [Changed]: Everything with responses has been moved into namespace
MyCouch.Responses. - [Changed]: All "API-Context" implementations is now located under the namespace
MyCouch.Contexts - [Changed]: Internal dependencies to API-contexts like Documents, Attachments etc. to simplify bootstraping.
- [Changed]: Internals of response factories.
- [Changed]:
response.GenerateToStringDebugVersionis nowresponse.ToStringDebugVersion.
- [Fixed]: The NuGet package did not resolve dependencies correctly
-
New:
MyCouchUriBuilderfor assisting with buildingUris that has credentials. -
New:
Configurations.ConnectionStringsimple helper for allowing machine specific remote URLs when working on multiple machines.
Still not v1.0.0 and before starting to add more features, this release has been about redesigning stuff, adding bootstraping and making it modular. That means, you really don't need an IClient instance. You could easily use each sub-component (IDocuements, IEntities, IViews, IAttachments, IDatabases) on it's own, and thereby compose your own client. Some parts has been moved and renamed. Ping me if you encounter any issues and I'll help you sort them out.
- [Removed]: The synchronous API has been removed. More info
-
New: Added the possibility to inject a
ClientBootstraper. - [Changed]: The
Client.Serializerdoes not have the specific entity conventions anymore. For a serializer with that, use:Client.Entities.Serializer. - [Moved]:
IClient.EntityReflectornow lies beneathClient.Entities.
- [Fix]:
include_docswas not working properly as reported here.
This is mainly a release for bringing MyCouch to .Net4.0 and Windows Store apps (WinRT/NetCore4.5). During this redesign some slight internal differences might have occurred. There's still just ONE NuGet. Read more under Prerequisites
- [Fix]: Any
awaitis now used in conjunction withConfigureAwait(false)so that no marshaling is being done back to e.g UI context.
- [Changed]: All commands has been moved to namespace
MyCouch.Commands - [Changed]:
ViewQueryandSystemViewQueryhas been moved one level up fromMyCouch.QueryingtoMyCouch. -
New: Introduced command classes for almost everything you can do with MyCouch. These can be used on
client.Documents,client.Attachmentsandclient.Entitiesas well as viaclient.Execute(cmd)andclient.ExecuteAsync(cmd). This is done as a step, making it easier to execute the same command against several db-instances. -
New:
GetDocumentCommandused viaclient.Documents.Get(cmd)orclient.Execute -
New:
DeleteDocumentCommandused viaclient.Documents.Delete(cmd)orclient.Execute -
New:
PutDocumentCommandused viaclient.Documents.Put(cmd)orclient.Execute -
New:
PostDocumentCommandused viaclient.Documents.Post(cmd)orclient.Execute -
New:
DocumentExistsCommandused viaclient.Documents.Exists(cmd)orclient.Execute -
New:
GetEntityCommandused viaclient.Entities.Get(cmd)orclient.Execute
-
New: Simple support (
PUT, GET, DELETE) for attachments viaClient.Attachments. - [Changed]:
Client.Databasesis nowClient.Databaseand it operates on the database you specified in the path for the client and does not allow you to pass another database name anymore. For that you now need to create a specific client instance. - [Changed]:
JsonDocumentResponseis nowDocumentResponse.
- [Fixed]: Document conflicts (409 responses) did not return the
Idin the response. The_revis still not populated since the CouchDb response with the conflict does not provide the current_rev.
- [Changed]:
CopyDocumentResponseandReplaceDocumentResponseis replaced byDocumentHeaderResponsewhich represents a document without any body content. - [Changed:
Client.PostandClient.PutandClient.Deletenow returns the newDocumentHeaderResponsesince these operations has no body. -
New:
Client.Documents.Exists(id, [rev]):DocumentHeaderResponse- uses the possibility of a simpleHEADrequest, which doesn't return the actual document from CouchDb, just_idand_rev. -
New: The
debugcompiledToStringresult of a response is now available even inreleasebut then viaresponse.GenerateToStringDebugVersion()
-
New:
Client.Documents.Copy:CopyDocumentResponsewhich allows you to copy a document, by_idand/or_rev. Documentation -
New:
Client.Documents.Replace:ReplaceDocumentResponsewhich allows you to make a copy of a document and overwrite another document with that copy. Documentation - [Misc]: Some cleanups
-
New: Support for batch/bulk operations (http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API) by using
BulkCommandviaClient.Documents.Bulk(cmd):BulkResponse. - [Changed]: Separated
DocumentsandEntitiesby creatingClient.Entities. -
New: Simplified queries of views for JSON by not having to specify
<string>. If you want view result as JSON, you can now doClient.Views.RunQuery(query)instead ofClient.Views.RunQuery<string>(query)
- [Fix]: Removed unnecessary use of async/await.
-
New: You can now inject custom
IConnectionimplementations. E.g if you wan't to have some custom headers etc or wrap the connection for logging, diagnostics....what ever. -
New: The
BasicHttpClientConnectionnow supportsusername:pwdfor use with basic authentication via the URL, e.g.http://username:password@localhost:5984/testdb
First release which has support for Post, Put, Delete, Get and queries of views. Please note it's an early release.
- Prerequisites
- Using Cloudant
- External resources, Tips, Samples etc
- Install CouchDB and Getting started with MyCouch
- Install using NuGet
- Get connected
- Authentication
- Contextual client
- MyCouchStore - an opinionated abstraction/simplification
- MyCouchServerClient
- Asynchronous
- Modular - pick what you want
- Bootstrapping
- Intercept requests and/or responses
- OMG! X is not supported! What shall I do? Custom HTTP-Requests
- Documents vs Entities
- Serialization
- The result is a response
- Views & Queries
- System views
- List functions
- Show functions
- Attachments
- Batch mode writes (POST, PUT)
- Bulk operations
- Copy & Replace
- Consume the Changes feed
- Caching
- Conflicts