From ced7cd5afff2f79b91f364f713d9851038e3b6ab Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Fri, 2 Jul 2010 03:02:12 -0400 Subject: update for mem3 refactor, more robust DB create/delete --- src/fabric.erl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/fabric.erl') diff --git a/src/fabric.erl b/src/fabric.erl index badc1379..b233677b 100644 --- a/src/fabric.erl +++ b/src/fabric.erl @@ -1,8 +1,8 @@ -module(fabric). % DBs --export([all_dbs/0, all_dbs/1, create_db/2, delete_db/2, get_db_info/1, - get_doc_count/1]). +-export([all_dbs/0, all_dbs/1, create_db/1, create_db/2, delete_db/1, + delete_db/2, get_db_info/1, get_doc_count/1]). % Documents -export([open_doc/3, open_revs/4, get_missing_revs/2, update_doc/3, @@ -36,11 +36,17 @@ get_db_info(DbName) -> get_doc_count(DbName) -> fabric_db_doc_count:go(dbname(DbName)). +create_db(DbName) -> + create_db(DbName, []). + create_db(DbName, Options) -> - fabric_db_create:create_db(dbname(DbName), opts(Options)). + fabric_db_create:go(dbname(DbName), opts(Options)). + +delete_db(DbName) -> + delete_db(DbName, []). delete_db(DbName, Options) -> - fabric_db_delete:delete_db(dbname(DbName), opts(Options)). + fabric_db_delete:go(dbname(DbName), opts(Options)). % doc operations -- cgit v1.2.3