summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-02-16 22:36:33 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2023-02-16 22:36:33 -0500
commitc66c279fb65328c5a5f5d8ca6e0df035fc5c5555 (patch)
tree09c2930bced82d7ea8ffd543ca8cbf73fdfafb71 /lib
parente5d8d42eae6ce486678d87e33c1a7c26e2a6c1a1 (diff)
downloadverbly-c66c279fb65328c5a5f5d8ca6e0df035fc5c5555.tar.gz
verbly-c66c279fb65328c5a5f5d8ca6e0df035fc5c5555.tar.bz2
verbly-c66c279fb65328c5a5f5d8ca6e0df035fc5c5555.zip
Added optional database query timeout
Diffstat (limited to 'lib')
-rw-r--r--lib/database.cpp5
-rw-r--r--lib/database.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/database.cpp b/lib/database.cpp index d5ff37e..d30926c 100644 --- a/lib/database.cpp +++ b/lib/database.cpp
@@ -85,6 +85,11 @@ namespace verbly {
85 return result; 85 return result;
86 } 86 }
87 87
88 void database::setTimeout(int ms)
89 {
90 ppdb_.setTimeout(ms);
91 }
92
88 std::string database_version_mismatch::generateMessage(int right, int wrong) 93 std::string database_version_mismatch::generateMessage(int right, int wrong)
89 { 94 {
90 std::ostringstream msgbuilder; 95 std::ostringstream msgbuilder;
diff --git a/lib/database.h b/lib/database.h index 83c4c1c..a9d711e 100644 --- a/lib/database.h +++ b/lib/database.h
@@ -73,6 +73,8 @@ namespace verbly {
73 73
74 std::set<std::string> synrestrs(int partId) const; 74 std::set<std::string> synrestrs(int partId) const;
75 75
76 void setTimeout(int ms);
77
76 private: 78 private:
77 79
78 mutable hatkirby::database ppdb_; 80 mutable hatkirby::database ppdb_;