Welcome Guest, you are in: Login

dbones docs

RSS RSS

Navigation (ArmChair)





Search the wiki
»

Database API

RSS
Modified on 2014/09/14 05:26 by Dave Categorized as Uncategorized

Table of Contents [Hide/Show]

Overview

This article looks briefly into the Database object

Database

The Database object is a thread-safe representation of a single database instance. There should only be one Database object per CouchDb Database.

Ctor

At the moment to create this object, we need to provide the name of the database and the connection object to the database server.

NOTE:
The Connection object support a few Authentications strategies, and also allows setting of the WebProxy. Both are detailed in the Advanced Section


var database = new Database("library", new Connection("http://localhost:5984"));

CreateSession

Creates a session with the database.

NOTE:
Please open the Session API for more information on the Session


var database = new Database("library", new Connection("http://localhost:5984"));
using (var session = database.CreateSession())
{
    //Do awesome work here    
}

Settings

The settings of the Database allows access to overriding the Id and Revision naming conventions, and access to the load and commit pipelines.
dbones docs, is a sub-site of dbones.co.uk, all its content belongs to dbones.co.uk, this also includes logo's.