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

Function makeOverlay

src/jrd/SysFunction.cpp:1682–1717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1680
1681
1682void makeOverlay(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc* result,
1683 int argsCount, const dsc** args)
1684{
1685 fb_assert(argsCount >= function->minArgCount);
1686
1687 result->makeNullString();
1688
1689 bool isNullable;
1690 if (initResult(result, argsCount, args, &isNullable))
1691 return;
1692
1693 const dsc* value = args[0];
1694 const dsc* placing = args[1];
1695
1696 if (value->isBlob())
1697 *result = *value;
1698 else if (placing->isBlob())
1699 *result = *placing;
1700 else
1701 {
1702 result->clear();
1703 result->dsc_dtype = dtype_varying;
1704 }
1705
1706 result->setBlobSubType(dataTypeUtil->getResultBlobSubType(value, placing));
1707 result->setTextType(dataTypeUtil->getResultTextType(value, placing));
1708
1709 if (!value->isBlob() && !placing->isBlob())
1710 {
1711 result->dsc_length = static_cast<USHORT>(sizeof(USHORT)) +
1712 dataTypeUtil->convertLength(value, result) +
1713 dataTypeUtil->convertLength(placing, result);
1714 }
1715
1716 result->setNullable(isNullable);
1717}
1718
1719
1720void makePad(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc* result,

Callers

nothing calls this directly

Calls 10

initResultFunction · 0.85
makeNullStringMethod · 0.80
isBlobMethod · 0.80
setBlobSubTypeMethod · 0.80
getResultBlobSubTypeMethod · 0.80
setTextTypeMethod · 0.80
getResultTextTypeMethod · 0.80
setNullableMethod · 0.80
clearMethod · 0.45
convertLengthMethod · 0.45

Tested by

no test coverage detected