4 namespace monazilla { namespace GikoMona { namespace core {
6 struct model::model_pimpl {
11 * date()|bbs-name()|board-name()|thread-id()|thread-name()
18 model::model() noexcept {
20 pimpl = std::make_shared<model_pimpl>();
25 bool model::load_file(const boost::filesystem::path& file_path,
26 const mona_string& loaded_table_name) {
27 if(!boost::filesystem::exists(file_path)) {
34 void model::exec_inserted_query() {
35 inserted_query_triv_copyable_type q;
36 if(inserted_query_queue.empty()) {
39 inserted_query_queue.pop(q);
44 std::tie(*q, into, tup);
46 if(into.find_first_of("application", 0, into.length()) != mona_string::npos) {
48 } else if (into.find_first_of("session", 0, into.length()) != mona_string::npos) {
50 if(into.find("history", 0, into.length()) != mona_string::npos) {
51 pimpl->history_db.insert(into, tup);
52 } else if(into.find("tab-window") != mona_string::npos != mona_string::npos) {
53 pimpl->tab_db.insert(into, tup);
55 } else if(into.find_first_of("extension", 0, into.length()) != mona_string::npos) {