ToRow converts a Haskell value into the list of SQLData values that sqlite-simple binds to ? placeholders in query and execute calls. Tuple and list instances cover common parameter groups when their elements support ToField. section 16.3.2 section 16.3.1
Common values already fit ToRow:
- Only wraps one value when a query needs a single parameter; a one-element tuple is unavailable. section 16.3.2
Mapping a record to a database row
A TodoEntry instance can call toField for each record field: entryId, text, checked, and rank. Nothing becomes SQLNull, while Bool becomes an integer because SQLite has no dedicated Boolean type. The resulting row can be passed directly to execute.
For application records, define ToRow explicitly with toField calls or use the generic ToRow instance. Reading the row back requires the separate FromRow class. section 16.3.2
