diff options
author | Anton Adamansky <adamansky@gmail.com> | 2015-05-06 23:17:19 +0600 |
---|---|---|
committer | Anton Adamansky <adamansky@gmail.com> | 2015-05-06 23:17:19 +0600 |
commit | c1ea0a5c1386951107350b6ccb37743a981a8da5 (patch) | |
tree | b0eeaee0b0a59cf38017e40f405d582e05998b50 /src/tctdb/tctdb.h | |
parent | 3e4473cecdd2a5840d776f498231d5044a108f7c (diff) | |
download | ejdb-c1ea0a5c1386951107350b6ccb37743a981a8da5.tar.gz ejdb-c1ea0a5c1386951107350b6ccb37743a981a8da5.tar.bz2 ejdb-c1ea0a5c1386951107350b6ccb37743a981a8da5.zip |
Fixed #139
Diffstat (limited to 'src/tctdb/tctdb.h')
-rw-r--r-- | src/tctdb/tctdb.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/tctdb/tctdb.h b/src/tctdb/tctdb.h index 82cee8f..ee29a28 100644 --- a/src/tctdb/tctdb.h +++ b/src/tctdb/tctdb.h @@ -1094,6 +1094,33 @@ EJDB_EXPORT int tctdbqrystrtoordertype(const char *str); The return value is the set operation type or -1 on failure. */ EJDB_EXPORT int tctdbmetastrtosettype(const char *str); +/** + * @brief + * Return a maximum size of opaque data can be stored. + */ +EJDB_EXPORT size_t tctdbmaxopaquesz(); + +/** + * Get opaque data into specified buffer `dst` + * `bsiz` Max size to be read. + * Return -1 if error, otherwise number of bytes writen in dst. + */ +EJDB_EXPORT int tctdbreadopaque(TCTDB *tdb, void *dst, int off, int bsiz); + +/** + * Write opaque data. + * Number of bytes specified bt `nb` + * can be truncated if it greater than max opaque data size. + * Return -1 if error, otherwise number of bytes read from src. + */ +EJDB_EXPORT int tctdbwriteopaque(TCTDB *tdb, const void *src, int off, int nb); + +/** + * Copy opaque data between databases. + * Return -1 if error, otherwise number of bytes copied. + */ +EJDB_EXPORT int tctdbcopyopaque(TCTDB *dst, TCTDB *src, int off, int nb); + /* Add a record into indices of a table database object. `tdb' specifies the table database object. |