MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / PAR_validation_blr

Function PAR_validation_blr

src/jrd/par.cpp:219–249  ·  view source on GitHub ↗

PAR_blr equivalent for validation expressions. Validation expressions are boolean expressions, but may be prefixed with a blr_stmt_expr.

Source from the content-addressed store, hash-verified

217// PAR_blr equivalent for validation expressions.
218// Validation expressions are boolean expressions, but may be prefixed with a blr_stmt_expr.
219BoolExprNode* 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.

Callers

nothing calls this directly

Calls 9

SET_TDBBFunction · 0.85
BlrReaderClass · 0.85
getBlrVersionFunction · 0.85
PAR_parse_stmtFunction · 0.85
PAR_parse_booleanFunction · 0.85
PAR_syntax_errorFunction · 0.85
peekByteMethod · 0.80
getDefaultPoolMethod · 0.45
getByteMethod · 0.45

Tested by

no test coverage detected