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

Function makeBlobAppendBlob

src/jrd/SysFunction.cpp:1277–1307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1275
1276
1277bool 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
1310void makeBlobAppend(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc* result,

Callers 2

makeBlobAppendFunction · 0.85
evlBlobAppendFunction · 0.85

Calls 6

isBlobMethod · 0.80
makeBlobMethod · 0.80
getBlobSubTypeMethod · 0.80
getTextTypeMethod · 0.80
isTextMethod · 0.80
isNullMethod · 0.45

Tested by

no test coverage detected