@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
6262 cerr << PACKAGE_NAME " " GITREV << endl;
6363
6464 map<string,string> options;
65- regex optregex (" --(help|log-to|verbose|target|sqlite|monetdb|version|dump-all-graphs|seed|dry-run|max-queries|rng-state|exclude-catalog)(?:=((?:.|\n )*))?" );
65+ regex optregex (" --(help|log-to|verbose|target|sqlite|monetdb|version|dump-all-graphs|dump-all-queries| seed|dry-run|max-queries|rng-state|exclude-catalog)(?:=((?:.|\n )*))?" );
6666
6767 for (char **opt = argv+1 ;opt < argv+argc; opt++) {
6868 smatch match;
@@ -86,6 +86,7 @@ int main(int argc, char *argv[])
8686#endif
8787 " --log-to=connstr log errors to postgres database" << endl <<
8888 " --seed=int seed RNG with specified int instead of PID" << endl <<
89+ " --dump-all-queries print queries as they are generated" << endl <<
8990 " --dump-all-graphs dump generated ASTs" << endl <<
9091 " --dry-run print queries instead of executing them" << endl <<
9192 " --exclude-catalog don't generate queries using catalog relations" << endl <<
@@ -149,7 +150,10 @@ int main(int argc, char *argv[])
149150
150151 if (options.count (" dump-all-graphs" ))
151152 loggers.push_back (make_shared<ast_logger>());
152-
153+
154+ if (options.count (" dump-all-queries" ))
155+ loggers.push_back (make_shared<query_dumper>());
156+
153157 if (options.count (" dry-run" )) {
154158 while (1 ) {
155159 shared_ptr<prod> gen = statement_factory (&scope);
0 commit comments