-
Notifications
You must be signed in to change notification settings - Fork 70
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
CancellationToken
forView.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+ & PCL
but for.Net4.0
there'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.config
orWeb.config
orMachine.config
according 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
drilldown
when using theCloudantClient.Searches
-
New: Thanks to @indranilatcal there's now support for
counts
andranges
when using theCloudantClient.Searches
- [Fix]:
MyCouchCloudantServerClient
was 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
Query
used inMyCouchStore
orQueryViewRequest
used inClient.Views
; e.g.Configure(q => q.Keys(mykeys))
wheremykeys
was 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:bool
to 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.SetAsync
used to overwrite last revision of a document without knowing the last known revision. To minimize overhead, it uses a simpleHEAD
request to look up the revision. NOTE If you know therev
, useStoreAsync
instead. -
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:bool
if set to true, the JSON returned will include the_conflicts
array. -
New:
GetEntityRequest.Conflicts:bool
if set to true, the JSON returned will include the_conflicts
array. - [Fix]: Only top level members of entities should fall under the convention rules with:
_id, DocumentId, EntityId and Id
. - [Fix]: Ensure that
Rev
is populated inGET
of Document or Entity. - [Fix]: Ensure that
ids
etc. are URL encoded before sending as part of URLs. - [CHANGED]: When using the convention based serialization via
Client.Entities
wherePUT
andPOST
inserts documents, it adds a value for$docType
. PREVIOUSLY the value (name of the class) vaslower-case
, it's nowcamel-cased
instead. You can configure this via theMyCouchClientBootstrapper.SerializationConfiguration
. Let it return aSerializationConfiguration
object whereconfiguration.Conventions.DocType
is assigned to one that supports the old format. - [Changed]:
GET
on documents now returnsGetDocumentResponse
but it still extendsDocumentResponse
. - [Changed]:
GET
on entities now returnsGetEntityResponse<T>
but it still extendsEntityResponse<T>
. - [Changed]: Replication via
ServerClient.Databases.Replicate
is now accessed viaServerClient.Replicator.Replicate
instead, and now uses the_replicator
database instead. This ensures that e.g. continuous replications survives restarts. To stop a continuous replication, just delete the document from the_replicator
db. - [Changed]: The
HttpRequestFactories
now returns a customHttpRequest
instead ofHttpRequestMessage
and they now generate relative URLs instead of complete URIs. The complete URI is generated atSend
in the underlyingConnection
implementation. - [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.Serializer
is vanilla serialization. Then forEntities
andViews
andIMyCouchClient.DocumentSerializer
there is one that supports some conventions. It should now only try to map_id
between e.g.DocumentId, Id, _Id, EntityId, [Class]Id
if it's a property on the root. - [Changed]: There is now only one
MyCouchClientBootstrapper
and it's configuration has changed. - [Changed]:
Connection
now accepts aHttpRequest
instead ofHttpRequestMessage
. - [Remove]: The member that was marked as obsolete
EntityResponse.Entity
has been removed. UseContent
instead.
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
IMyCouchStore
andIViews
has been removed. If needed, add simplification overloads as extension methods instead. -
[Removed]: Some search overloads to
Cloudant.ISearches
has been removed. If needed, add simplification overloads as extension methods instead. -
[Removed]:
ClientExecuteExtensions
which had extension methods for allowing e.g.client.PerformAsync(request)
. If needed, add as custom extension methods in your code-base. -
[Removed]:
Ensure.That
as NuGet package dependency. Instead included as source. -
[Changed]:
Database.GetAsync
now returns typedGetDatabaseResponse
instead ofTextResponse
. -
[Changed]:
Database(s)
operations that previously returned genericTextResponse
now returns specificDatabaseHeaderResponse
. -
[Changed]: The custom request header that is added to each
HttpRequest
and removed inConnection
just before it's sent to CouchDb, is now namedmycouch-request-type
instead ofmycouch-type
. -
[Changed]:
Query
used in conjunction withIMyCouchStore
is 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.ObservableQuery
is nowIMyCouchStore.Query
. -
[Changed]:
MyCouchException
is 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.ViewCleanup
is nowclient.Database.ViewCleanupAsync
-
New: Support for
Windows store 8 & 8.1
is now provided using a Portable class library. -
New:
IMyCouchStore.QueryAsync
returns a slimmed down result with e.gTotalRows
,Offset
etc. while you get the actual row-data via a callback. -
New:
GetDocumentRequest
now has aConflicts:bool
property that can be set to have_conflicts
being part of the document response. -
New:
MyCouchServerClient
used 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.MyCouchStore
simplified 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.Content
will contain JSON with db-info. - [Changed]:
Client.Databases
is nowClient.Database
since it operates on the current database. - [Changed]:
Documents.ExistsAsync
is nowDocuments.HeadAsync
. Exists is now part of an abstraction/simplification in the newMyCouch.MyCouchStore
. - [Changed]: Internal changes to Responses and ResponseFactories.
- [Changed]:
EntityResponses
now haveContent
instead ofEntity
as a property. TheEntity
property is marked as obsolete. - [Changed]:
QuerySystemViewRequest
has been removed. TheQueryViewRequest
now supports either only specifyingViewName
and notDesignDocument
or by injecting aSystemViewIdentity
. - [Changed]: Fixed misspell of
Bootstraper
toBootstrapper
, affectingMyCouchClientBootstraper
andMyCouchCloudantClientBootstraper
- [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]:
PUT
now accepts id's with chars that should be escaped, e.g._design/some_name
. - [Fix]: In some responses, if no
_id
was 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 theKey
in 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]:
$doctype
is now also injected forClient.Documents
operations and not onlyClient.Entities
. More info - [Changed]:
$doctype
will not be injected for anonymous types. More info -
New:
DocumentAttribute
can be used to provide meta-data likeDocType
, which will be used by the serializer to generated the$doctype
value. If not specified, theType.Name
will be used instead. Read more here: More info -
New:
DocumentAttribute.DocNamespace
- Read more -
New:
DocumentAttribute.DocVersion
- Read more -
New:
Client.Documents.Serializer
vsClient.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:
PostDocumentRequest
andPutDocumentRequest
now has a boolBatch
property 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]:
Stale
for View queries where formatted incorrectly. -
New: New NuGet package
MyCouch.Cloudant
which 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
sequence
likelast_seq
in a Change feed response, is now treated as astring
. This since Cloudant has the notion of abookmark
which is a string. And this will also be more future proof.
Small release to support inheritance for entities.
-
New: You can now have a
ModelId
andModelRev
defined in a base-class named:[ClassName]Id
or[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-type
andmycouch-entitytype
(defined inHttpRequest.CustomHeaders
) which could be used in theIConnection
to 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:
GetChangesRequest
is used to consume the_changes
view of CouchDb and is accessed viaClient.Changes.GetChangesAsync
or viaClient.Perform(request)
. Supported feeds are:Normal, Longpolling and Continuous
. Read more in the docs -
New:
ContentType
has 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 anyIncludedDoc
of the view query to be of a specific type. If not set, it will be treated as RAW-JSON. - [Fixed/Changed]:
Attachments
were wrongly base64 encoding data uponPUT
of 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]:
JsonViewQueryResponse
is 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]:
ICommand
is nowIRequest
and all commands are placed underRequests
. - [Changed]:
ViewQuery
is nowQueryViewRequest
and placed underRequests
. - [Changed]:
SystemViewQuery
is nowQuerySystemViewRequest
. - [Changed]:
ViewQueryOptions
which was used inViewQuery.Options
is now removed, and all options are instead located directly onQueryViewRequest
. - [Changed]:
ViewQueryConfigurator
is nowQueryViewRequestConfigurator
and located underMyCouch.Requests.Configurators
. - [Changed]: The simplifying Client extension methods for performing requests, e.g.
Client.ExecuteAsync(GetChangesRequest)
is now renamed toPerformAsync
to 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]:
ViewQueryOptions
doesn'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 onViewQueryOptions
to 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
Delete
ofEntity
withoutId
andRev
, causing try of delete of db. - [Fixed]: Requests sent for querying views are now sent using
POST
to not get constraints of many keys creating a to long query-string. - [Changed]:
Views.RunQueryAsync
is now namedViews.QueryAsync
. - [Changed]: No more
class
requirement onT
ofViewQueryResponse<T>
. Hence you can now use it on simple reduces returning e.g. an integer. - [Changed]:
ViewQueryResponse<T>.Row.Doc
is 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, entity
and 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.GenerateToStringDebugVersion
is nowresponse.ToStringDebugVersion
.
- [Fixed]: The NuGet package did not resolve dependencies correctly
-
New:
MyCouchUriBuilder
for assisting with buildingUri
s that has credentials. -
New:
Configurations.ConnectionString
simple 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.Serializer
does not have the specific entity conventions anymore. For a serializer with that, use:Client.Entities.Serializer
. - [Moved]:
IClient.EntityReflector
now lies beneathClient.Entities
.
- [Fix]:
include_docs
was 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
await
is 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]:
ViewQuery
andSystemViewQuery
has been moved one level up fromMyCouch.Querying
toMyCouch
. -
New: Introduced command classes for almost everything you can do with MyCouch. These can be used on
client.Documents
,client.Attachments
andclient.Entities
as 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:
GetDocumentCommand
used viaclient.Documents.Get(cmd)
orclient.Execute
-
New:
DeleteDocumentCommand
used viaclient.Documents.Delete(cmd)
orclient.Execute
-
New:
PutDocumentCommand
used viaclient.Documents.Put(cmd)
orclient.Execute
-
New:
PostDocumentCommand
used viaclient.Documents.Post(cmd)
orclient.Execute
-
New:
DocumentExistsCommand
used viaclient.Documents.Exists(cmd)
orclient.Execute
-
New:
GetEntityCommand
used viaclient.Entities.Get(cmd)
orclient.Execute
-
New: Simple support (
PUT, GET, DELETE
) for attachments viaClient.Attachments
. - [Changed]:
Client.Databases
is nowClient.Database
and 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]:
JsonDocumentResponse
is nowDocumentResponse
.
- [Fixed]: Document conflicts (409 responses) did not return the
Id
in the response. The_rev
is still not populated since the CouchDb response with the conflict does not provide the current_rev
.
- [Changed]:
CopyDocumentResponse
andReplaceDocumentResponse
is replaced byDocumentHeaderResponse
which represents a document without any body content. - [Changed:
Client.Post
andClient.Put
andClient.Delete
now returns the newDocumentHeaderResponse
since these operations has no body. -
New:
Client.Documents.Exists(id, [rev]):DocumentHeaderResponse
- uses the possibility of a simpleHEAD
request, which doesn't return the actual document from CouchDb, just_id
and_rev
. -
New: The
debug
compiledToString
result of a response is now available even inrelease
but then viaresponse.GenerateToStringDebugVersion()
-
New:
Client.Documents.Copy:CopyDocumentResponse
which allows you to copy a document, by_id
and/or_rev
. Documentation -
New:
Client.Documents.Replace:ReplaceDocumentResponse
which 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
BulkCommand
viaClient.Documents.Bulk(cmd):BulkResponse
. - [Changed]: Separated
Documents
andEntities
by 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
IConnection
implementations. E.g if you wan't to have some custom headers etc or wrap the connection for logging, diagnostics....what ever. -
New: The
BasicHttpClientConnection
now supportsusername:pwd
for 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