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

Function EVL_make_value

src/jrd/evl.cpp:467–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465
466
467void EVL_make_value(thread_db* tdbb, const dsc* desc, impure_value* value, MemoryPool* pool)
468{
469/**************************************
470 *
471 * E V L _ m a k e _ v a l u e
472 *
473 **************************************
474 *
475 * Functional description
476 * Make a value block reflect the value of a descriptor.
477 *
478 **************************************/
479 SET_TDBB(tdbb);
480
481 // Handle the fixed length data types first. They're easy.
482
483 const dsc from = *desc;
484 value->vlu_desc = *desc;
485 value->vlu_desc.dsc_address = (UCHAR*) &value->vlu_misc;
486
487 switch (from.dsc_dtype)
488 {
489 case dtype_short:
490 value->vlu_misc.vlu_short = *((SSHORT*) from.dsc_address);
491 return;
492
493 case dtype_long:
494 case dtype_real:
495 value->vlu_misc.vlu_long = *((SLONG*) from.dsc_address);
496 return;
497
498 case dtype_int64:
499 value->vlu_misc.vlu_int64 = *((SINT64*) from.dsc_address);
500 return;
501
502 case dtype_double:
503 value->vlu_misc.vlu_double = *((double*) from.dsc_address);
504 return;
505
506 case dtype_dec64:
507 value->vlu_misc.vlu_dec64 = *((Decimal64*) from.dsc_address);
508 return;
509
510 case dtype_dec128:
511 value->vlu_misc.vlu_dec128 = *((Decimal128*) from.dsc_address);
512 return;
513
514 case dtype_int128:
515 value->vlu_misc.vlu_int128 = *((Int128*) from.dsc_address);
516 return;
517
518 case dtype_sql_time:
519 value->vlu_misc.vlu_sql_time = *(GDS_TIME*) from.dsc_address;
520 return;
521
522 case dtype_ex_time_tz:
523 case dtype_sql_time_tz:
524 value->vlu_misc.vlu_sql_time_tz = *(ISC_TIME_TZ*) from.dsc_address;

Callers 15

aggExecuteMethod · 0.85
executeMethod · 0.85
performMethod · 0.85
aggExecuteMethod · 0.85
aggPassMethod · 0.85
evlAbsFunction · 0.85
evlBlobAppendFunction · 0.85
evlCeilFunction · 0.85
evlCharToUuidFunction · 0.85
evlDateAddFunction · 0.85
~DataPipeMethod · 0.85
nextMethod · 0.85

Calls 5

SET_TDBBFunction · 0.85
MOV_get_string_ptrFunction · 0.85
setTextTypeMethod · 0.80
VaryingStringClass · 0.70
getDefaultPoolMethod · 0.45

Tested by

no test coverage detected