diff options
Diffstat (limited to 'lib/statement.h')
| -rw-r--r-- | lib/statement.h | 16 |
1 files changed, 13 insertions, 3 deletions
| diff --git a/lib/statement.h b/lib/statement.h index a528d60..8188ec0 100644 --- a/lib/statement.h +++ b/lib/statement.h | |||
| @@ -184,13 +184,15 @@ namespace verbly { | |||
| 184 | std::map<std::string, std::string> tables, | 184 | std::map<std::string, std::string> tables, |
| 185 | std::string topTable, | 185 | std::string topTable, |
| 186 | condition where, | 186 | condition where, |
| 187 | std::list<join> joins) : | 187 | std::list<join> joins, |
| 188 | bool recursive) : | ||
| 188 | identifier_(std::move(identifier)), | 189 | identifier_(std::move(identifier)), |
| 189 | field_(f), | 190 | field_(f), |
| 190 | tables_(std::move(tables)), | 191 | tables_(std::move(tables)), |
| 191 | topTable_(std::move(topTable)), | 192 | topTable_(std::move(topTable)), |
| 192 | topCondition_(std::move(where)), | 193 | topCondition_(std::move(where)), |
| 193 | joins_(std::move(joins)) | 194 | joins_(std::move(joins)), |
| 195 | recursive_(recursive) | ||
| 194 | { | 196 | { |
| 195 | } | 197 | } |
| 196 | 198 | ||
| @@ -224,6 +226,11 @@ namespace verbly { | |||
| 224 | return joins_; | 226 | return joins_; |
| 225 | } | 227 | } |
| 226 | 228 | ||
| 229 | bool isRecursive() const | ||
| 230 | { | ||
| 231 | return recursive_; | ||
| 232 | } | ||
| 233 | |||
| 227 | private: | 234 | private: |
| 228 | std::string identifier_; | 235 | std::string identifier_; |
| 229 | field field_; | 236 | field field_; |
| @@ -231,6 +238,7 @@ namespace verbly { | |||
| 231 | std::string topTable_; | 238 | std::string topTable_; |
| 232 | condition topCondition_; | 239 | condition topCondition_; |
| 233 | std::list<join> joins_; | 240 | std::list<join> joins_; |
| 241 | bool recursive_; | ||
| 234 | 242 | ||
| 235 | }; | 243 | }; |
| 236 | 244 | ||
| @@ -254,7 +262,9 @@ namespace verbly { | |||
| 254 | 262 | ||
| 255 | std::string instantiateTable(std::string name); | 263 | std::string instantiateTable(std::string name); |
| 256 | 264 | ||
| 257 | condition integrate(statement subStmt); | 265 | std::string instantiateWith(std::string name); |
| 266 | |||
| 267 | condition integrate(statement subStmt, bool cte = false); | ||
| 258 | 268 | ||
| 259 | int nextTableId_; | 269 | int nextTableId_; |
| 260 | int nextWithId_; | 270 | int nextWithId_; |
