-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added C4Key, a wrapper around Collatable * No more map & emit callbacks in C view API. Instead the client uses a doc enumerator and tells the indexer what's emitted. (No tests yet) * Added options structs for enumeration APIs.
- Loading branch information
Showing
10 changed files
with
620 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// | ||
// c4Impl.h | ||
// CBForest | ||
// | ||
// Created by Jens Alfke on 9/15/15. | ||
// Copyright © 2015 Couchbase. All rights reserved. | ||
// | ||
|
||
#ifndef c4Impl_h | ||
#define c4Impl_h | ||
|
||
#include "slice.hh" | ||
|
||
typedef forestdb::slice C4Slice; | ||
|
||
typedef struct { | ||
const void *buf; | ||
size_t size; | ||
} C4SliceResult; | ||
|
||
#define kC4SliceNull forestdb::slice::null | ||
|
||
|
||
#define C4_IMPL | ||
#include "c4Database.h" | ||
|
||
|
||
#include "Error.hh" | ||
#include "Database.hh" | ||
|
||
using namespace forestdb; | ||
|
||
Database* internal(C4Database*); | ||
|
||
|
||
void recordError(C4ErrorDomain domain, int code, C4Error* outError); | ||
void recordHTTPError(int httpStatus, C4Error* outError); | ||
void recordError(error e, C4Error* outError); | ||
void recordUnknownException(C4Error* outError); | ||
|
||
#define catchError(OUTERR) \ | ||
catch (error err) { \ | ||
recordError(err, OUTERR); \ | ||
} catch (...) { \ | ||
recordUnknownException(OUTERR); \ | ||
} | ||
|
||
|
||
#endif /* c4Impl_h */ |
Oops, something went wrong.