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

Function makeBinShift

src/jrd/SysFunction.cpp:1238–1274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1236
1237
1238void makeBinShift(DataTypeUtilBase*, const SysFunction* function, dsc* result,
1239 int argsCount, const dsc** args)
1240{
1241 fb_assert(argsCount == 2);
1242 fb_assert(function->minArgCount == 2);
1243 fb_assert(function->maxArgCount == 2);
1244
1245 UCHAR t = dtype_int64;
1246 if (args[0]->isInt128())
1247 t = dtype_int128;
1248
1249 result->clear();
1250 result->dsc_dtype = t;
1251 result->dsc_length = type_lengths[t];
1252
1253 bool isNullable = false;
1254
1255 for (int i = 0; i < argsCount; ++i)
1256 {
1257 if (args[i]->isNull())
1258 {
1259 result->setNull();
1260 return;
1261 }
1262
1263 if (args[i]->isNullable())
1264 isNullable = true;
1265
1266 if (!args[i]->isExact() || args[i]->dsc_scale != 0)
1267 {
1268 status_exception::raise(Arg::Gds(isc_expression_eval_err) <<
1269 Arg::Gds(isc_sysf_argmustbe_exact) << Arg::Str(function->name));
1270 }
1271 }
1272
1273 result->setNullable(isNullable);
1274}
1275
1276
1277bool makeBlobAppendBlob(dsc* result, const dsc* arg, bid* blob_id = nullptr)

Callers

nothing calls this directly

Calls 10

raiseFunction · 0.85
GdsClass · 0.85
StrClass · 0.85
isInt128Method · 0.80
isExactMethod · 0.80
setNullableMethod · 0.80
clearMethod · 0.45
isNullMethod · 0.45
setNullMethod · 0.45
isNullableMethod · 0.45

Tested by

no test coverage detected