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

Function par_update

src/gpre/sqe.cpp:3453–3492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3451//
3452
3453static void par_update(gpre_rse* select, bool have_union, bool view_flag)
3454{
3455 // Parse FOR UPDATE if present
3456 if (MSC_match(KW_FOR))
3457 {
3458 if (! MSC_match(KW_UPDATE))
3459 {
3460 CPR_s_error("UPDATE");
3461 return;
3462 }
3463 if (MSC_match(KW_OF))
3464 {
3465 do {
3466 CPR_token();
3467 } while (MSC_match(KW_COMMA));
3468 }
3469 select->rse_flags |= RSE_for_update;
3470 }
3471
3472 // Parse WITH LOCK if present
3473 if (MSC_match(KW_WITH))
3474 {
3475 if (! MSC_match(KW_LOCK))
3476 {
3477 CPR_s_error("LOCK");
3478 return;
3479 }
3480 if (have_union)
3481 {
3482 PAR_error("WITH LOCK in UNION");
3483 return;
3484 }
3485 if (view_flag)
3486 {
3487 PAR_error("WITH LOCK in VIEW");
3488 return;
3489 }
3490 select->rse_flags |= RSE_with_lock;
3491 }
3492}
3493
3494//____________________________________________________________
3495//

Callers 1

SQE_selectFunction · 0.85

Calls 4

MSC_matchFunction · 0.85
CPR_s_errorFunction · 0.85
CPR_tokenFunction · 0.85
PAR_errorFunction · 0.70

Tested by

no test coverage detected