| 926 | // |
| 927 | |
| 928 | static bool check_relation() |
| 929 | { |
| 930 | // The current token is (i.e. should be) either a relation |
| 931 | // name or a database name. If it's a database name, search |
| 932 | // it for the relation name. If it's an unqualified relation |
| 933 | // name, search all databases for the name |
| 934 | |
| 935 | gpre_sym* symbol = gpreGlob.token_global.tok_symbol; |
| 936 | if (symbol && symbol->sym_type == SYM_database) |
| 937 | return true; |
| 938 | |
| 939 | for (gpre_dbb* db = gpreGlob.isc_databases; db; db = db->dbb_next) |
| 940 | { |
| 941 | if (MET_get_relation(db, gpreGlob.token_global.tok_string, "")) |
| 942 | return true; |
| 943 | } |
| 944 | |
| 945 | return false; |
| 946 | } |
| 947 | |
| 948 | |
| 949 | //____________________________________________________________ |
no test coverage detected