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/facade_chewing_table2.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/facade_chewing_table2.h')
-rw-r--r-- | src/storage/facade_chewing_table2.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/storage/facade_chewing_table2.h b/src/storage/facade_chewing_table2.h index 1cf2a1f..941ca63 100644 --- a/src/storage/facade_chewing_table2.h +++ b/src/storage/facade_chewing_table2.h @@ -84,17 +84,25 @@ public: } if (user_filename) { m_user_chewing_table = new ChewingLargeTable2; - result = m_user_chewing_table->load_db - (user_filename) || result; + result = m_user_chewing_table->attach + (user_filename, ATTACH_READWRITE|ATTACH_CREATE) || result; } return result; } + bool sync() { + if (NULL == m_user_chewing_table) + return false; + return m_user_chewing_table->sync(); + } + +#if 0 bool store(const char * new_user_filename) { if (NULL == m_user_chewing_table) return false; return m_user_chewing_table->store_db(new_user_filename); } +#endif /** * FacadeChewingTable2::search: |