PAR_blr equivalent for validation expressions. Validation expressions are boolean expressions, but may be prefixed with a blr_stmt_expr.
| 217 | // PAR_blr equivalent for validation expressions. |
| 218 | // Validation expressions are boolean expressions, but may be prefixed with a blr_stmt_expr. |
| 219 | BoolExprNode* PAR_validation_blr(thread_db* tdbb, jrd_rel* relation, const UCHAR* blr, ULONG blr_length, |
| 220 | CompilerScratch* view_csb, CompilerScratch** csb_ptr, USHORT flags) |
| 221 | { |
| 222 | SET_TDBB(tdbb); |
| 223 | |
| 224 | #ifdef CMP_DEBUG |
| 225 | cmp_trace("BLR code given for JRD parsing:"); |
| 226 | // CVC: Couldn't find isc_trace_printer, so changed it to gds__trace_printer. |
| 227 | fb_print_blr(blr, blr_length, gds__trace_printer, 0, 0); |
| 228 | #endif |
| 229 | |
| 230 | BlrParseWrapper csb(*tdbb->getDefaultPool(), relation, view_csb, csb_ptr, false, flags); |
| 231 | |
| 232 | csb->csb_blr_reader = BlrReader(blr, blr_length); |
| 233 | |
| 234 | getBlrVersion(csb); |
| 235 | |
| 236 | if (csb->csb_blr_reader.peekByte() == blr_stmt_expr) |
| 237 | { |
| 238 | // Parse it and ignore. This legacy and broken verb is transformed while parsing expressions. |
| 239 | csb->csb_blr_reader.getByte(); |
| 240 | PAR_parse_stmt(tdbb, csb); |
| 241 | } |
| 242 | |
| 243 | BoolExprNode* const expr = PAR_parse_boolean(tdbb, csb); |
| 244 | |
| 245 | if (csb->csb_blr_reader.getByte() != (UCHAR) blr_eoc) |
| 246 | PAR_syntax_error(csb, "end_of_command"); |
| 247 | |
| 248 | return expr; |
| 249 | } |
| 250 | |
| 251 | |
| 252 | // Parse a BLR datatype. Return the alignment requirements of the datatype. |
nothing calls this directly
no test coverage detected