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

Function MAKE_system_privilege

src/dsql/make.cpp:551–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

549
550
551LiteralNode* MAKE_system_privilege(const char* privilege)
552{
553 thread_db* tdbb = JRD_get_thread_data();
554 Attachment* att = tdbb->getAttachment();
555 jrd_tra* tra = att->getSysTransaction();
556
557 string p(privilege);
558 p.upper();
559 USHORT value = SCL_convert_privilege(tdbb, tra, p);
560
561 USHORT* valuePtr = FB_NEW_POOL(*tdbb->getDefaultPool()) USHORT(value);
562
563 LiteralNode* literal = FB_NEW_POOL(*tdbb->getDefaultPool()) LiteralNode(*tdbb->getDefaultPool());
564 literal->litDesc.dsc_dtype = dtype_short;
565 literal->litDesc.dsc_length = sizeof(USHORT);
566 literal->litDesc.dsc_scale = 0;
567 literal->litDesc.dsc_sub_type = 0;
568 literal->litDesc.dsc_address = reinterpret_cast<UCHAR*>(valuePtr);
569
570 return literal;
571}

Callers

nothing calls this directly

Calls 7

JRD_get_thread_dataFunction · 0.85
getSysTransactionMethod · 0.80
upperMethod · 0.80
LiteralNodeClass · 0.70
USHORTEnum · 0.50
getAttachmentMethod · 0.45
getDefaultPoolMethod · 0.45

Tested by

no test coverage detected