summary refs log tree commit diff stats
path: root/lib/database.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/database.h')
-rw-r--r--lib/database.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/database.h b/lib/database.h index ef50739..0b10eba 100644 --- a/lib/database.h +++ b/lib/database.h
@@ -4,13 +4,15 @@
4#include <string> 4#include <string>
5#include <exception> 5#include <exception>
6#include <list> 6#include <list>
7#include <set>
7#include "notion.h" 8#include "notion.h"
8#include "word.h" 9#include "word.h"
9#include "group.h"
10#include "frame.h" 10#include "frame.h"
11#include "part.h"
11#include "lemma.h" 12#include "lemma.h"
12#include "form.h" 13#include "form.h"
13#include "pronunciation.h" 14#include "pronunciation.h"
15#include "order.h"
14 16
15struct sqlite3; 17struct sqlite3;
16 18
@@ -46,19 +48,21 @@ namespace verbly {
46 48
47 // Queries 49 // Queries
48 50
49 query<notion> notions(filter where, bool random = true, int limit = 1) const; 51 query<notion> notions(filter where, order sortOrder = {}, int limit = 1) const;
50 52
51 query<word> words(filter where, bool random = true, int limit = 1) const; 53 query<word> words(filter where, order sortOrder = {}, int limit = 1) const;
52 54
53 query<group> groups(filter where, bool random = true, int limit = 1) const; 55 query<frame> frames(filter where, order sortOrder = {}, int limit = 1) const;
54 56
55 query<frame> frames(filter where, bool random = true, int limit = 1) const; 57 query<part> parts(filter where, order sortOrder = {}, int limit = 1) const;
56 58
57 query<lemma> lemmas(filter where, bool random = true, int limit = 1) const; 59 query<lemma> lemmas(filter where, order sortOrder = {}, int limit = 1) const;
58 60
59 query<form> forms(filter where, bool random = true, int limit = 1) const; 61 query<form> forms(filter where, order sortOrder = {}, int limit = 1) const;
60 62
61 query<pronunciation> pronunciations(filter where, bool random = true, int limit = 1) const; 63 query<pronunciation> pronunciations(filter where, order sortOrder = {}, int limit = 1) const;
64
65 std::set<std::string> synrestrs(int partId) const;
62 66
63 private: 67 private:
64 68