00001 #ifndef UPDATE_QBOX_H 00002 #define UPDATE_QBOX_H 00003 00004 #include "QBox.h" 00005 #include "Table.h" 00006 #include "SQLUpdate.h" 00007 00008 BOREALIS_NAMESPACE_BEGIN; 00009 00010 class UpdateQBox : public QBox { 00011 private: 00012 ptr<SQLUpdate> _sql; 00013 Table *_table; 00014 ptr<UpdateQueryHandle> _query_handle; 00015 bool _has_output_expressions; 00016 EvalContext _ctxt; 00017 vector<ptr<Expression> > _expressions; 00018 00019 bool _pass_input; 00020 size_t _input_tuple_size; 00021 00022 void setupOutput() throw (AuroraException); 00023 00024 public: 00025 UpdateQBox() : _ctxt(3) {} 00026 00027 protected: 00028 void setupImpl() throw (AuroraException); 00029 void initImpl() throw (AuroraException); 00030 void runImpl(QBoxInvocation&) throw (AuroraException); 00031 00032 AURORA_DECLARE_QBOX(UpdateQBox, "update"); 00033 }; 00034 00035 BOREALIS_NAMESPACE_END; 00036 00037 #endif