// InsertQuery.h #ifndef dset__InsertQuery_H #define dset__InsertQuery_H // Chitra Kannan // July 2004 // // Class to build a Sql Insert Query. It is intended to carry the fields/columns // and the corresponding values. #include #include #include #include "dataset_sql/SqlRow.h" namespace dset { class InsertQuery { public: // typedefs typedef SqlRow Row; private: // data members Row m_row; bool m_validity; public: // methods // Default constructor. explicit InsertQuery(Row row); // Destructor. virtual ~InsertQuery(); // Is the sql query valid bool is_valid() const; // Set the query. InsertQuery& set(Row row); // Return the Row in the curent query. Row get_row() const; // Output stream. std::ostream& ostr(std::ostream& str) const; }; } // end dataset namespace // Output stream. std::ostream& operator<< (std::ostream& lhs, const dset::InsertQuery& rhs); #endif