| 800 | } |
| 801 | |
| 802 | void UtilInterface::convert(Firebird::CheckStatusWrapper* status, |
| 803 | unsigned sourceType, unsigned sourceScale, unsigned sourceLength, const void* source, |
| 804 | unsigned targetType, unsigned targetScale, unsigned targetLength, void* target) |
| 805 | { |
| 806 | dsc sourceDesc; |
| 807 | memset(&sourceDesc, 0, sizeof(sourceDesc)); |
| 808 | sourceDesc.dsc_dtype = fb_utils::sqlTypeToDscType(sourceType); |
| 809 | sourceDesc.dsc_scale = sourceScale; |
| 810 | sourceDesc.dsc_length = sourceLength; |
| 811 | if (sourceDesc.isText()) |
| 812 | sourceDesc.setTextType(CS_dynamic); |
| 813 | sourceDesc.dsc_address = (UCHAR*) source; |
| 814 | |
| 815 | dsc targetDesc; |
| 816 | memset(&targetDesc, 0, sizeof(targetDesc)); |
| 817 | targetDesc.dsc_dtype = fb_utils::sqlTypeToDscType(targetType); |
| 818 | targetDesc.dsc_scale = targetScale; |
| 819 | targetDesc.dsc_length = targetLength; |
| 820 | if (targetDesc.isText()) |
| 821 | targetDesc.setTextType(CS_dynamic); |
| 822 | targetDesc.dsc_address = static_cast<UCHAR*>(target); |
| 823 | |
| 824 | try |
| 825 | { |
| 826 | CVT_move(&sourceDesc, &targetDesc, 0, |
| 827 | [](const Arg::StatusVector& status) |
| 828 | { |
| 829 | status.raise(); |
| 830 | } |
| 831 | ); |
| 832 | } |
| 833 | catch (const Exception& ex) |
| 834 | { |
| 835 | ex.stuffException(status); |
| 836 | } |
| 837 | } |
| 838 | |
| 839 | ISC_DATE UtilInterface::encodeDate(unsigned year, unsigned month, unsigned day) |
| 840 | { |
nothing calls this directly
no test coverage detected