Function: convertToDbValue()
function convertToDbValue(value: unknown): DbValue | undefined;
Defined in: electron/services/database/utils/converters/valueConverters.ts:41
Converts an unknown input to a SQLite-bindable DbValue.
Parameters
value
unknown
Returns
DbValue | undefined
Remarks
- Finite
numberandstringvalues pass through booleanbecomes1/0nullbecomesnull- Non-finite numbers,
undefined, and all other types returnundefined(caller decides whether to skip the field or coerce tonull)
Prefer this helper instead of ad-hoc typeof chains so the conversion rules
stay consistent across repositories and mappers.