2016-02-27 14:24:23 +01:00
|
|
|
#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 {
|
2016-02-27 14:24:23 +01:00
|
|
|
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:24:23 +01:00
|
|
|
|
2016-02-27 14:45:59 +01:00
|
|
|
// public properties
|
2016-02-27 14:24:23 +01:00
|
|
|
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:24:23 +01:00
|
|
|
};
|
|
|
|
|
2016-02-27 14:45:59 +01:00
|
|
|
} // namespace hsql
|
2016-02-27 14:24:23 +01:00
|
|
|
|
|
|
|
#endif // __SQLPARSERRESULT__
|