summary refs log tree commit diff stats
path: root/lib/statement.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/statement.h')
-rw-r--r--lib/statement.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/statement.h b/lib/statement.h index aa56568..15c4ac3 100644 --- a/lib/statement.h +++ b/lib/statement.h
@@ -13,13 +13,14 @@
13namespace verbly { 13namespace verbly {
14 14
15 class filter; 15 class filter;
16 class order;
16 17
17 class statement { 18 class statement {
18 public: 19 public:
19 20
20 statement(object context, filter queryFilter); 21 statement(object context, filter queryFilter);
21 22
22 std::string getQueryString(std::list<std::string> select, bool random, int limit) const; 23 std::string getQueryString(std::list<std::string> select, order sortOrder, int limit, bool debug = false) const;
23 24
24 std::list<binding> getBindings() const; 25 std::list<binding> getBindings() const;
25 26
@@ -153,10 +154,12 @@ namespace verbly {
153 154
154 // Utility 155 // Utility
155 156
156 std::string toSql() const; 157 std::string toSql(bool toplevel, bool debug = false) const;
157 158
158 std::list<binding> flattenBindings() const; 159 std::list<binding> flattenBindings() const;
159 160
161 condition flatten() const;
162
160 private: 163 private:
161 union { 164 union {
162 struct { 165 struct {
@@ -246,8 +249,8 @@ namespace verbly {
246 { 249 {
247 return (context == object::notion) ? "notions" 250 return (context == object::notion) ? "notions"
248 : (context == object::word) ? "words" 251 : (context == object::word) ? "words"
249 : (context == object::group) ? "groups"
250 : (context == object::frame) ? "frames" 252 : (context == object::frame) ? "frames"
253 : (context == object::part) ? "parts"
251 : (context == object::lemma) ? "lemmas_forms" 254 : (context == object::lemma) ? "lemmas_forms"
252 : (context == object::form) ? "forms" 255 : (context == object::form) ? "forms"
253 : (context == object::pronunciation) ? "pronunciations" 256 : (context == object::pronunciation) ? "pronunciations"