MAKE_str_constant @brief Make a constant node when the character set ID is already known. @param constant @param character_set **/
| 343 | |
| 344 | **/ |
| 345 | LiteralNode* 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 | /** |
nothing calls this directly
no test coverage detected