| 1617 | |
| 1618 | |
| 1619 | void makeLeftRight(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc* result, |
| 1620 | int argsCount, const dsc** args) |
| 1621 | { |
| 1622 | fb_assert(argsCount == function->minArgCount); |
| 1623 | |
| 1624 | const dsc* value = args[0]; |
| 1625 | const dsc* length = args[1]; |
| 1626 | |
| 1627 | if (value->isNull() || length->isNull()) |
| 1628 | { |
| 1629 | result->makeNullString(); |
| 1630 | return; |
| 1631 | } |
| 1632 | |
| 1633 | if (value->isBlob()) |
| 1634 | result->makeBlob(value->getBlobSubType(), value->getTextType()); |
| 1635 | else |
| 1636 | { |
| 1637 | result->clear(); |
| 1638 | result->dsc_dtype = dtype_varying; |
| 1639 | result->setTextType(value->getTextType()); |
| 1640 | result->setNullable(value->isNullable() || length->isNullable()); |
| 1641 | |
| 1642 | result->dsc_length = dataTypeUtil->fixLength(result, |
| 1643 | dataTypeUtil->convertLength(value, result)) + static_cast<USHORT>(sizeof(USHORT)); |
| 1644 | } |
| 1645 | } |
| 1646 | |
| 1647 | |
| 1648 | void makeMod(DataTypeUtilBase*, const SysFunction* function, dsc* result, |
nothing calls this directly
no test coverage detected