HyriseSQLParser/src/SQLParserResult.h

35 lines
649 B
C
Raw Normal View History

#ifndef __SQLPARSERRESULT__
#define __SQLPARSERRESULT__
#include "sql/SQLStatement.h"
namespace hsql {
/**
* Represents the result of the SQLParser.
* If parsing was successful it contains a list of SQLStatement.
*/
2016-02-27 14:45:59 +01:00
class SQLParserResult {
public:
2016-02-27 14:45:59 +01:00
SQLParserResult();
SQLParserResult(SQLStatement* stmt);
virtual ~SQLParserResult();
void addStatement(SQLStatement* stmt);
SQLStatement* getStatement(int id);
size_t size();
2016-02-27 14:45:59 +01:00
// public properties
std::vector<SQLStatement*> statements;
bool isValid;
2016-02-27 14:45:59 +01:00
const char* errorMsg;
int errorLine;
int errorColumn;
};
2016-02-27 14:45:59 +01:00
} // namespace hsql
#endif // __SQLPARSERRESULT__