15 using std::shared_ptr;
18 vector<shared_ptr<named_relation> > refs;
19 static shared_ptr<table_ref> factory(
prod *p);
25 virtual void out(std::ostream &
out);
32 virtual void out(std::ostream &
out);
39 virtual void out(std::ostream &
out);
50 virtual void out(std::ostream &
out);
51 shared_ptr<struct query_spec> query;
65 :
prod(p) { (void) lhs; (void) rhs;}
69 std::string condition;
71 virtual void out(std::ostream &
out);
75 struct scope joinscope;
76 shared_ptr<bool_expr> search;
78 virtual void out(std::ostream &
out);
86 virtual void out(std::ostream &
out);
90 virtual std::string ident() {
return alias; }
91 shared_ptr<table_ref> lhs;
92 shared_ptr<table_ref> rhs;
93 shared_ptr<join_cond> condition;
105 std::vector<shared_ptr<table_ref> > reflist;
106 virtual void out(std::ostream &
out);
111 for (
auto p : reflist)
117 std::vector<shared_ptr<value_expr> > value_exprs;
121 virtual void out(std::ostream &
out);
125 for (
auto p : value_exprs)
131 std::string set_quantifier;
134 shared_ptr<bool_expr> search;
135 std::string limit_clause;
136 struct scope myscope;
137 virtual void out(std::ostream &
out);
148 const char *lockmode;
149 virtual void out(std::ostream &
out);
158 out <<
"prepare prep" <<
id <<
" as " << q;
171 struct scope myscope;
174 virtual void pick_victim();
178 shared_ptr<bool_expr> search;
182 out <<
"delete from " << victim->ident();
184 out <<
"where " << std::endl << *search;
207 vector<shared_ptr<value_expr> > value_exprs;
210 virtual void out(std::ostream &
out);
213 for (
auto p : value_exprs) p->
accept(v);
218 vector<shared_ptr<value_expr> > value_exprs;
219 vector<string> names;
222 virtual void out(std::ostream &
out);
225 for (
auto p : value_exprs) p->
accept(v);
230 shared_ptr<struct set_list>
set_list;
232 shared_ptr<bool_expr> search;
236 out <<
" on conflict on constraint " << constraint <<
" do update ";
248 shared_ptr<bool_expr> search;
249 shared_ptr<struct set_list>
set_list;
252 virtual void out(std::ostream &
out);
261 shared_ptr<bool_expr> condition;
265 static shared_ptr<when_clause> factory(
struct merge_stmt *p);
266 virtual void out(std::ostream &
out);
271 shared_ptr<struct set_list>
set_list;
272 struct scope myscope;
275 virtual void out(std::ostream &
out);
280 vector<shared_ptr<value_expr> > exprs;
283 virtual void out(std::ostream &
out);
289 shared_ptr<table_ref> target_table_;
290 shared_ptr<table_ref> data_source;
291 shared_ptr<join_cond> join_condition;
292 vector<shared_ptr<when_clause> > clauselist;
294 virtual void out(std::ostream &
out);
313 shared_ptr<prod> statement_factory(
struct scope *s);
316 vector<shared_ptr<prod> > with_queries;
317 shared_ptr<prod> query;
318 vector<shared_ptr<named_relation> > refs;
319 struct scope myscope;
320 virtual void out(std::ostream &
out);
grammar: Value expression productions
Base class for grammar productions.
supporting classes for the grammar
Base class providing schema information to grammar.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
Base class for walking the AST.
Base class for AST nodes.
virtual void indent(std::ostream &out)
Newline and indent according to tree level.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void out(std::ostream &out)
Emit SQL for this production.
virtual void accept(prod_visitor *v)
Visitor pattern for walking the AST.