HyriseSQLParser/src/sql/DeleteStatement.h

34 lines
521 B
C
Raw Normal View History

#ifndef __DELETE_STATEMENT_H__
#define __DELETE_STATEMENT_H__
2014-12-03 17:43:02 +01:00
#include "SQLStatement.h"
namespace hsql {
/**
* @struct DeleteStatement
2014-12-15 18:32:46 +01:00
* @brief Represents "DELETE FROM students WHERE grade > 3.0"
*
* If expr == NULL => delete all rows (truncate)
*/
2014-12-03 17:43:02 +01:00
struct DeleteStatement : SQLStatement {
DeleteStatement() :
2014-12-03 17:43:02 +01:00
SQLStatement(kStmtDelete),
2014-11-26 18:20:10 +01:00
table_name(NULL),
expr(NULL) {};
2014-12-15 18:32:46 +01:00
virtual ~DeleteStatement() {
delete table_name;
delete expr;
}
char* table_name;
Expr* expr;
};
} // namespace hsql
#endif