| 1338 | |
| 1339 | |
| 1340 | void makeCeilFloor(DataTypeUtilBase*, const SysFunction* function, dsc* result, |
| 1341 | int argsCount, const dsc** args) |
| 1342 | { |
| 1343 | fb_assert(argsCount == function->minArgCount); |
| 1344 | |
| 1345 | const dsc* value = args[0]; |
| 1346 | |
| 1347 | if (value->isNull()) |
| 1348 | { |
| 1349 | result->makeLong(0); |
| 1350 | result->setNull(); |
| 1351 | return; |
| 1352 | } |
| 1353 | |
| 1354 | switch (value->dsc_dtype) |
| 1355 | { |
| 1356 | case dtype_short: |
| 1357 | result->makeLong(0); |
| 1358 | break; |
| 1359 | |
| 1360 | case dtype_long: |
| 1361 | case dtype_int64: |
| 1362 | result->makeInt64(0); |
| 1363 | break; |
| 1364 | |
| 1365 | case dtype_int128: |
| 1366 | result->makeInt128(0); |
| 1367 | break; |
| 1368 | |
| 1369 | case dtype_dec128: |
| 1370 | case dtype_dec64: |
| 1371 | result->makeDecimal128(0); |
| 1372 | break; |
| 1373 | |
| 1374 | default: |
| 1375 | result->makeDouble(); |
| 1376 | break; |
| 1377 | } |
| 1378 | |
| 1379 | result->setNullable(value->isNullable()); |
| 1380 | } |
| 1381 | |
| 1382 | |
| 1383 | void makeDateAdd(DataTypeUtilBase*, const SysFunction*, dsc* result, int argsCount, const dsc** args) |
nothing calls this directly
no test coverage detected