add cleanall task
This commit is contained in:
parent
d5fad5ea56
commit
3719745fb4
1
Makefile
1
Makefile
|
@ -42,6 +42,7 @@ clean:
|
|||
cleanparser:
|
||||
make -C $(SRCPARSER)/ clean
|
||||
|
||||
cleanall: clean cleanparser
|
||||
|
||||
############
|
||||
### Test ###
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
// include the sql parser
|
||||
#include "SQLParser.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
@ -6,12 +7,12 @@ int main(int argc, char *argv[]) {
|
|||
fprintf(stderr, "Usage: ./example \"SELECT * FROM test;\"\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
std::string query = argv[1];
|
||||
|
||||
// parse a given query
|
||||
hsql::SQLStatementList* stmt_list = hsql::SQLParser::parseSQLString(query);
|
||||
|
||||
// check whether the parsing was successful
|
||||
if (stmt_list->isValid) {
|
||||
printf("Parsed successfully!\n");
|
||||
printf("Number of statements: %lu\n", stmt_list->numStatements());
|
||||
|
|
Loading…
Reference in New Issue