@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
62
62
cerr << PACKAGE_NAME " " GITREV << endl;
63
63
64
64
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 )*))?" );
66
66
67
67
for (char **opt = argv+1 ;opt < argv+argc; opt++) {
68
68
smatch match;
@@ -86,6 +86,7 @@ int main(int argc, char *argv[])
86
86
#endif
87
87
" --log-to=connstr log errors to postgres database" << endl <<
88
88
" --seed=int seed RNG with specified int instead of PID" << endl <<
89
+ " --dump-all-queries print queries as they are generated" << endl <<
89
90
" --dump-all-graphs dump generated ASTs" << endl <<
90
91
" --dry-run print queries instead of executing them" << endl <<
91
92
" --exclude-catalog don't generate queries using catalog relations" << endl <<
@@ -149,7 +150,10 @@ int main(int argc, char *argv[])
149
150
150
151
if (options.count (" dump-all-graphs" ))
151
152
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
+
153
157
if (options.count (" dry-run" )) {
154
158
while (1 ) {
155
159
shared_ptr<prod> gen = statement_factory (&scope);
0 commit comments