MCPcopy Create free account
hub / github.com/anse1/sqlsmith / for_update_verify

Class for_update_verify

grammar.cc:254–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254struct for_update_verify : prod_visitor {
255 virtual void visit(prod *p) {
256 if (dynamic_cast<window_function*>(p))
257 throw("window function");
258 joined_table* join = dynamic_cast<joined_table*>(p);
259 if (join && join->type != "inner")
260 throw("outer join");
261 query_spec* subquery = dynamic_cast<query_spec*>(p);
262 if (subquery)
263 subquery->set_quantifier = "";
264 table_or_query_name* tab = dynamic_cast<table_or_query_name*>(p);
265 if (tab) {
266 table *actual_table = dynamic_cast<table*>(tab->t);
267 if (actual_table && !actual_table->is_insertable)
268 throw("read only");
269 if (actual_table->name.find("pg_"))
270 throw("catalog");
271 }
272 table_sample* sample = dynamic_cast<table_sample*>(p);
273 if (sample) {
274 table *actual_table = dynamic_cast<table*>(sample->t);
275 if (actual_table && !actual_table->is_insertable)
276 throw("read only");
277 if (actual_table->name.find("pg_"))
278 throw("catalog");
279 }
280 } ;
281};
282
283
284select_for_update::select_for_update(prod *p, struct scope *s, bool lateral)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected