diff options
author | Peng Wu <alexepico@gmail.com> | 2017-06-19 10:53:55 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2017-06-19 11:16:17 +0800 |
commit | 5607752c2b989849923676f4a925e5315a3303d4 (patch) | |
tree | d25737cc780a8d0d2d8b90794044431a29281ca5 /src/storage/ngram_bdb.h | |
parent | 071deb522f26534861c75897db80344f045b1db1 (diff) | |
download | libpinyin-5607752c2b989849923676f4a925e5315a3303d4.tar.gz libpinyin-5607752c2b989849923676f4a925e5315a3303d4.tar.xz libpinyin-5607752c2b989849923676f4a925e5315a3303d4.zip |
not use in-memory DBM in src/storage
Diffstat (limited to 'src/storage/ngram_bdb.h')
-rw-r--r-- | src/storage/ngram_bdb.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/storage/ngram_bdb.h b/src/storage/ngram_bdb.h index 76a3116..8ab3c1b 100644 --- a/src/storage/ngram_bdb.h +++ b/src/storage/ngram_bdb.h @@ -56,6 +56,7 @@ public: */ ~Bigram(); +#if 0 /** * Bigram::load_db: * @dbfile: the Berkeley DB file name. @@ -75,6 +76,7 @@ public: * */ bool save_db(const char * dbfile); +#endif /** * Bigram::attach: @@ -87,6 +89,12 @@ public: */ bool attach(const char * dbfile, guint32 flags); + bool sync() { + assert(NULL != m_db); + m_db->sync(m_db, 0); + return true; + } + /** * Bigram::load: * @index: the previous token in the bi-gram. |