| 1680 | |
| 1681 | |
| 1682 | void 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 | |
| 1720 | void makePad(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc* result, |
nothing calls this directly
no test coverage detected