diff options
Diffstat (limited to 'src/libparser/node/roundnode.h')
| -rw-r--r-- | src/libparser/node/roundnode.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/libparser/node/roundnode.h b/src/libparser/node/roundnode.h new file mode 100644 index 0000000..0bf49b7 --- /dev/null +++ b/src/libparser/node/roundnode.h @@ -0,0 +1,31 @@ +#ifndef ROUNDNODE_H +#define ROUNDNODE_H + +#include "executionnode.h" +#include "scalarresult.h" + +class RoundNode : public ExecutionNode +{ +public: + enum Mode { + FLOOR, + CEIL, + ROUND + }; + RoundNode(Mode mode); + + // ExecutionNode interface +public: + void run(ExecutionNode *previous); + QString toString(bool withLabel) const; + qint64 getPriority() const; + ExecutionNode *getCopy() const; + void setCommand(ExecutionNode* cmd); + +private: + std::unique_ptr<ScalarResult> m_scalarResult; + ExecutionNode* m_cmd= nullptr; + Mode m_mode{ROUND}; +}; + +#endif // ROUNDNODE_H |