Function: rowToMonitorOrUndefined()
function rowToMonitorOrUndefined(
row:
| MonitorRow
| null
| undefined
): Monitor | undefined;
Defined in: electron/services/database/utils/mappers/monitorMapper.ts:402
Converts a database row to a monitor object, or returns undefined if the
row is missing.
Parameters
row
| MonitorRow
| null
| undefined
The raw database row or undefined.
Returns
| Monitor
| undefined
The mapped monitor object, or undefined if the row is missing.
Remarks
Returns undefined if the input row is undefined or null.
- Otherwise, delegates to the internal row mapper.
- Used by repository methods where a missing monitor is not an error.
Example
const monitor = rowToMonitorOrUndefined(dbRowOrUndefined);
Throws
Error if mapping fails for a valid row.