| 1275 | |
| 1276 | |
| 1277 | bool makeBlobAppendBlob(dsc* result, const dsc* arg, bid* blob_id = nullptr) |
| 1278 | { |
| 1279 | if (!arg) |
| 1280 | return false; |
| 1281 | |
| 1282 | ISC_QUAD* ptr = reinterpret_cast<ISC_QUAD*>(blob_id); |
| 1283 | |
| 1284 | if (arg->isBlob()) |
| 1285 | { |
| 1286 | result->makeBlob(arg->getBlobSubType(), arg->getTextType(), ptr); |
| 1287 | return true; |
| 1288 | } |
| 1289 | |
| 1290 | if (arg->isNull()) |
| 1291 | return false; |
| 1292 | |
| 1293 | if (arg->isText()) |
| 1294 | { |
| 1295 | USHORT ttype = arg->getTextType(); |
| 1296 | if (ttype == ttype_binary) |
| 1297 | result->makeBlob(isc_blob_untyped, ttype_binary, ptr); |
| 1298 | else |
| 1299 | result->makeBlob(isc_blob_text, ttype, ptr); |
| 1300 | } |
| 1301 | else |
| 1302 | { |
| 1303 | result->makeBlob(isc_blob_text, ttype_ascii, ptr); |
| 1304 | } |
| 1305 | |
| 1306 | return true; |
| 1307 | } |
| 1308 | |
| 1309 | |
| 1310 | void makeBlobAppend(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc* result, |
no test coverage detected