Skip to main content

Function: rowToHistoryEntry()

function rowToHistoryEntry(row: HistoryRow): StatusHistory;

Defined in: electron/services/database/utils/mappers/historyMapper.ts:132

Converts a single database row to a StatusHistory object.

Parameters

row

HistoryRow

The raw database row to convert.

Returns

StatusHistory

The mapped StatusHistory object.

Remarks

Performs safe number conversion and status validation. If a value is invalid, it defaults to a safe fallback and logs a warning or error.

Example

const entry = rowToHistoryEntry(dbRow);

Throws

Error If mapping fails due to unexpected data types or missing fields.