![]() |
SQLsmith
v1.2.1-5-gfacd7a8
A random SQL query generator
|
Base class for AST nodes. More...
#include <prod.hh>


Public Member Functions | |
| prod (prod *parent) | |
| virtual void | indent (std::ostream &out) |
| Newline and indent according to tree level. | |
| virtual void | out (std::ostream &out)=0 |
| Emit SQL for this production. | |
| virtual void | match () |
| Check with the impedance matching code whether this production has been blacklisted and throw an exception. | |
| virtual void | accept (prod_visitor *v) |
| Visitor pattern for walking the AST. More... | |
| virtual void | fail (const char *reason) |
| Report a "failed to generate" error. | |
| void | retry () |
| Increase the retry count and throw an exception when retry_limit is exceeded. | |
Public Attributes | |
| struct prod * | pprod |
| Parent production that instanciated this one. More... | |
| struct scope * | scope |
| Scope object to model column/table reference visibility. | |
| int | level |
| Level of this production in the AST. 0 for root node. | |
| long | retries = 0 |
| Number of retries in this production. More... | |
| long | retry_limit = 100 |
| Maximum number of retries allowed before reporting a failure to the Parent prod. | |
|
inlinevirtual |
Visitor pattern for walking the AST.
Make sure you visit all child production when deriving classes.
Reimplemented in common_table_expression, update_returning, merge_stmt, when_clause_insert, when_clause_update, when_clause, update_stmt, upsert_stmt, set_list, insert_stmt, delete_returning, delete_stmt, prepare_stmt, query_spec, select_list, from_clause, joined_table, expr_join_cond, table_subquery, window_function, bool_binop, exists_predicate, null_predicate, coalesce, funcall, and case_expr.
Definition at line 41 of file prod.hh.
Referenced by funcall::accept(), coalesce::accept(), window_function::accept(), from_clause::accept(), select_list::accept(), insert_stmt::accept(), set_list::accept(), and merge_stmt::accept().
| struct prod* prod::pprod |
| long prod::retries = 0 |