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

Function MAKE_str_constant

src/dsql/make.cpp:345–362  ·  view source on GitHub ↗

MAKE_str_constant @brief Make a constant node when the character set ID is already known. @param constant @param character_set **/

Source from the content-addressed store, hash-verified

343
344 **/
345LiteralNode* MAKE_str_constant(const IntlString* constant, SSHORT character_set)
346{
347 thread_db* tdbb = JRD_get_thread_data();
348
349 const string& str = constant->getString();
350
351 LiteralNode* literal = FB_NEW_POOL(*tdbb->getDefaultPool()) LiteralNode(*tdbb->getDefaultPool());
352 literal->litDesc.dsc_dtype = dtype_text;
353 literal->litDesc.dsc_sub_type = 0;
354 literal->litDesc.dsc_scale = 0;
355 literal->litDesc.dsc_length = static_cast<USHORT>(str.length());
356 literal->litDesc.dsc_address = (UCHAR*) str.c_str();
357 literal->litDesc.dsc_ttype() = character_set;
358
359 literal->dsqlStr = constant;
360
361 return literal;
362}
363
364
365/**

Callers

nothing calls this directly

Calls 7

JRD_get_thread_dataFunction · 0.85
dsc_ttypeMethod · 0.80
LiteralNodeClass · 0.70
getStringMethod · 0.45
getDefaultPoolMethod · 0.45
lengthMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected