All Projects → danielwertheim → Mycouch

danielwertheim / Mycouch

Licence: mit
MyCouch is the asynchronous CouchDB client for .NET

Labels

Projects that are alternatives of or similar to Mycouch

Slouch
A JS client for CouchDB that does the heavy lifting
Stars: ✭ 116 (-45.02%)
Mutual labels:  couchdb
Nosqlmap
Automated NoSQL database enumeration and web application exploitation tool.
Stars: ✭ 1,928 (+813.74%)
Mutual labels:  couchdb
Zend Diagnostics
Universal set of diagnostic tests for PHP applications.
Stars: ✭ 192 (-9%)
Mutual labels:  couchdb
Awesome Couchdb
CouchDB - curated meta resources & best practices list
Stars: ✭ 124 (-41.23%)
Mutual labels:  couchdb
Couchdb Documentation
Apache CouchDB Documentation
Stars: ✭ 128 (-39.34%)
Mutual labels:  couchdb
Avancedb
An in-memory database based on the CouchDB REST API and containing the CouchDB Futon and Fauxton web sites
Stars: ✭ 161 (-23.7%)
Mutual labels:  couchdb
World Cleanup Day
☀️ World Cleanup Day: App (React Native) & Platform (Node). Join us in building software for a cleaner planet! PRs welcome!
Stars: ✭ 110 (-47.87%)
Mutual labels:  couchdb
Todo Apps
Sample ToDo application (various languages) running on IBM Cloud
Stars: ✭ 195 (-7.58%)
Mutual labels:  couchdb
Treehouses.github.io
A Markdown Wiki for treehouses 🏡
Stars: ✭ 132 (-37.44%)
Mutual labels:  couchdb
Phpfastcache
A high-performance backend cache system. It is intended for use in speeding up dynamic web applications by alleviating database load. Well implemented, it can drops the database load to almost nothing, yielding faster page load times for users, better resource utilization. It is simple yet powerful.
Stars: ✭ 2,171 (+928.91%)
Mutual labels:  couchdb
Couchimport
CouchDB import tool to allow data to be bulk inserted
Stars: ✭ 125 (-40.76%)
Mutual labels:  couchdb
Vue Pouch Db
Vue Pouch DB is a VueJS Plugin that binds PouchDB with Vue and keeps a synchronised state with the database. Has support for Mango queries which are processed locally within the VuePouchDB state.
Stars: ✭ 127 (-39.81%)
Mutual labels:  couchdb
Pifpaf
Python fixtures and daemon managing tools for functional testing
Stars: ✭ 161 (-23.7%)
Mutual labels:  couchdb
Envoy
A CouchDB proxy to enable replication of database subsets
Stars: ✭ 123 (-41.71%)
Mutual labels:  couchdb
Firecamp
Serverless Platform for the stateful services
Stars: ✭ 194 (-8.06%)
Mutual labels:  couchdb
Opennote
OpenNote was built to be an open web-based alternative to Microsoft OneNote (T) and EverNote.
Stars: ✭ 1,489 (+605.69%)
Mutual labels:  couchdb
Docker Couchdb
🐳 Source of the official Apache CouchDB Docker image ⚠️ NOTICE ⚠️: moved to the CouchDB org
Stars: ✭ 157 (-25.59%)
Mutual labels:  couchdb
Kivik
Kivik provides a common interface to CouchDB or CouchDB-like databases for Go and GopherJS.
Stars: ✭ 200 (-5.21%)
Mutual labels:  couchdb
Couchdb Docker
Semi-official Apache CouchDB Docker images
Stars: ✭ 194 (-8.06%)
Mutual labels:  couchdb
Metadata.js
Library for building offline-first browser-based applications :: платформа автономных веб-приложений
Stars: ✭ 165 (-21.8%)
Mutual labels:  couchdb

MyCouch

The asynchronous CouchDB client for .NET - builds on top of the asynchronous HTTP client and uses JSON.Net to provide flexible serialization behaviour. It tries to keep the domain language of CouchDB instead of bringing in generic repositories and other confusing stuff. MyCouch lets you work with raw JSON and/or entities/POCOS without requiring any implementation of interfaces, baseclasses etc. MyCouch provides you with some model conventions like injection of $doctype to the document.

Multiple target frameworks: .NET Standard 1.1, .NET Standard 2.0; using a .NET Standard project.

Build Status Nuget

The documentation is contained in the project wiki.

Quick sample - using Requests and Responses

using(var client = new MyCouchClient("http://localhost:5984/", "mydb"))
{
    //POST with server generated id
    await client.Documents.PostAsync("{\"name\":\"Daniel\"}");

	//POST with client generated id - possible but wrong
    await client.Documents.PostAsync("{\"_id":\"someId", \"name\":\"Daniel\"}");

    //PUT for client generated id
    await client.Documents.PutAsync("someId", "{\"name\":\"Daniel\"}");

    //PUT for updates
    await client.Documents.PutAsync("someId", "docRevision", "{\"name\":\"Daniel Wertheim\"}");

	//PUT for updates with _rev in JSON
    await client.Documents.PutAsync("someId", "{\"_rev\": \"docRevision\", \"name\":\"Daniel Wertheim\"}");

    //Using entities
    var me = new Person {Id = "SomeId", Name = "Daniel"};
    await client.Entities.PutAsync(me);

    //Using anonymous entities
    await client.Entities.PostAsync(new { Name = "Daniel" });
}
using(var client = new MyCouchServerClient("http://localhost:5984"))
{
    var r = await client.Replicator.ReplicateAsync(id, source, target);
}

Quick sample - using MyCouchStore

using(var store = new MyCouchStore("http://localhost:5984", "mydb"))
{
    var mySomething = await store.StoreAsync(new Something("foo", "bar", 42));

    var retrieved = await store.GetByIdAsync(mySomething.Id);

    var deleted = await store.DeleteAsync(mySomething.Id, mySomething.Rev);

    //... ... and so on... ...
}

Integration tests

The ./.env file and ./src/tests/IntegrationTests/integrationtests.local.ini files are .gitignored. In order to create sample files of these, you can run:

. init-local-config.sh

Docker-Compose

There's a docker-compose.yml file, that defines usage of a single node CouchDB over port 5984. The COUCHDB_USER and COUCHDB_PASSWORD is configured via environment key MyCouch_User and MyCouch_Pass; which can either be specified via:

  • Environment variable: MyCouch_User and MyCouch_Pass, e.g.:
MyCouch_User=sample_user
MyCouch_Pass=sample_password
  • Docker Environment file ./.env (.gitignored), e.g.:
MyCouch_User=sample_user
MyCouch_Pass=sample_password

Test configuration

Credentials need to be provided, either via:

  • Local-INI-file (.gitignored): ./src/tests/IntegrationTests/integrationtests.local.ini, e.g.:
User=sample_user
Pass=sample_password
  • Environment variables: MyCouch_User and MyCouch_Pass, e.g.:
MyCouch_User=sample_user
MyCouch_Pass=sample_password
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].