11 void schema::generate_indexes() {
13 cerr <<
"Generating indexes...";
15 for (
auto &type: types) {
17 for(
auto &r: aggregates) {
18 if (type->consistent(r.restype))
19 aggregates_returning_type.insert(pair<sqltype*, routine*>(type, &r));
22 for(
auto &r: routines) {
23 if (!type->consistent(r.restype))
25 routines_returning_type.insert(pair<sqltype*, routine*>(type, &r));
26 if(!r.argtypes.size())
27 parameterless_routines_returning_type.insert(pair<sqltype*, routine*>(type, &r));
30 for (
auto &t: tables) {
31 for (
auto &c: t.columns()) {
32 if (type->consistent(c.type)) {
33 tables_with_columns_of_type.insert(pair<sqltype*, table*>(type, &t));
39 for (
auto &concrete: types) {
40 if (type->consistent(concrete))
41 concrete_type.insert(pair<sqltype*, sqltype*>(type, concrete));
44 for (
auto &o: operators) {
45 if (type->consistent(o.result))
46 operators_returning_type.insert(pair<sqltype*, op*>(type, &o));
50 for (
auto &t: tables) {
52 base_tables.push_back(&t);
55 cerr <<
"done." << endl;
supporting classes for the grammar
Base class providing schema information to grammar.