HyriseSQLParser/src/sql/InsertStatement.h

29 lines
687 B
C
Raw Normal View History

2014-11-26 00:26:20 +01:00
#ifndef __INSERT_STATEMENT_H__
#define __INSERT_STATEMENT_H__
2014-12-03 17:43:02 +01:00
#include "SQLStatement.h"
2014-11-26 00:26:20 +01:00
#include "SelectStatement.h"
namespace hsql {
2016-02-27 15:01:06 +01:00
/**
2016-02-27 15:22:22 +01:00
* Represents SQL Insert statements.
* Example: "INSERT INTO students VALUES ('Max', 1112233, 'Musterhausen', 2.3)"
2016-02-27 15:01:06 +01:00
*/
struct InsertStatement : SQLStatement {
enum InsertType {
kInsertValues,
kInsertSelect
};
InsertStatement(InsertType type);
virtual ~InsertStatement();
2016-02-27 15:01:06 +01:00
InsertType type;
2016-02-27 15:22:22 +01:00
const char* tableName;
2016-02-27 15:01:06 +01:00
std::vector<char*>* columns;
std::vector<Expr*>* values;
SelectStatement* select;
};
2014-11-26 00:26:20 +01:00
} // namsepace hsql
#endif