| 1396 | |
| 1397 | |
| 1398 | void makeDateDiff(DataTypeUtilBase* dataTypeUtil, const SysFunction*, dsc* result, int argsCount, const dsc** args) |
| 1399 | { |
| 1400 | if (dataTypeUtil->getDialect() == 1) |
| 1401 | result->makeDouble(); |
| 1402 | else |
| 1403 | { |
| 1404 | if (argsCount >= 1 && |
| 1405 | args[0]->dsc_address && // constant |
| 1406 | CVT_get_long(args[0], 0, JRD_get_thread_data()->getAttachment()->att_dec_status, ERR_post) == blr_extract_millisecond) |
| 1407 | { |
| 1408 | result->makeInt64(ISC_TIME_SECONDS_PRECISION_SCALE + 3); |
| 1409 | } |
| 1410 | else |
| 1411 | result->makeInt64(0); |
| 1412 | } |
| 1413 | |
| 1414 | bool isNullable; |
| 1415 | if (initResult(result, argsCount, args, &isNullable)) |
| 1416 | return; |
| 1417 | |
| 1418 | result->setNullable(isNullable); |
| 1419 | } |
| 1420 | |
| 1421 | |
| 1422 | void makeFirstLastDayResult(DataTypeUtilBase*, const SysFunction*, dsc* result, |
nothing calls this directly
no test coverage detected