2016-02-27 14:24:23 +01:00
|
|
|
#ifndef __SQLPARSERRESULT__
|
|
|
|
#define __SQLPARSERRESULT__
|
|
|
|
|
|
|
|
#include "sql/SQLStatement.h"
|
|
|
|
|
|
|
|
namespace hsql {
|
2017-02-08 02:06:15 +01:00
|
|
|
/**
|
|
|
|
* Represents the result of the SQLParser.
|
|
|
|
* If parsing was successful it contains a list of SQLStatement.
|
|
|
|
*/
|
|
|
|
class SQLParserResult {
|
|
|
|
public:
|
2016-02-27 15:01:06 +01:00
|
|
|
|
2017-02-08 02:06:15 +01:00
|
|
|
SQLParserResult();
|
|
|
|
SQLParserResult(SQLStatement* stmt);
|
|
|
|
virtual ~SQLParserResult();
|
2016-02-27 15:01:06 +01:00
|
|
|
|
2017-02-08 02:06:15 +01:00
|
|
|
void addStatement(SQLStatement* stmt);
|
2016-02-27 15:01:06 +01:00
|
|
|
|
2017-02-08 02:06:15 +01:00
|
|
|
SQLStatement* getStatement(int id);
|
2016-02-27 15:01:06 +01:00
|
|
|
|
2017-02-08 02:06:15 +01:00
|
|
|
size_t size();
|
2016-02-27 15:01:06 +01:00
|
|
|
|
2017-02-08 02:06:15 +01:00
|
|
|
// public properties
|
|
|
|
std::vector<SQLStatement*> statements;
|
|
|
|
bool isValid;
|
2016-02-27 15:01:06 +01:00
|
|
|
|
2017-02-08 02:06:15 +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__
|