Skip to content
Snippets Groups Projects
Forked from tardisDB / tardisDB
322 commits ahead of the upstream repository.
Delete.hpp 902 B
//
// Created by Blum Thomas on 2020-05-21.
//

#ifndef PROTODB_DELETE_HPP
#define PROTODB_DELETE_HPP

#include "algebra/physical/Operator.hpp"

namespace Algebra {
    namespace Physical {

        class Delete : public UnaryOperator {
        public:
            Delete(const logical_operator_t & logicalOperator, std::unique_ptr<Operator> input, iu_p_t &tidIU, Table & table, QueryContext &queryContext, branch_id_t branchId);

            virtual ~Delete();

            void produce() override;
            void consume(const iu_value_mapping_t & values, const Operator & src) override;

        private:
            Table & table;
            llvm::Value * tupleCountPtr;

            iu_p_t tidIU;
            branch_id_t branchId;

            void genDeleteCall(void* funcPtr, cg_size_t tid);
        };
    } // end namespace Physical
} // end namespace Algebra


#endif //PROTODB_DELETE_HPP