| 1236 | |
| 1237 | |
| 1238 | void 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 | |
| 1277 | bool makeBlobAppendBlob(dsc* result, const dsc* arg, bid* blob_id = nullptr) |
nothing calls this directly
no test coverage detected