I'm following the docs and trying to get a basic example working where I read some values out of my database. F# insists that (row?mood).Value is an indeterminate type. It's not clear from the example blog posts, or the unit tests, why this wouldn't work.
The relevant portions of my code:
open FsSql
// declare execReader etc. shortcuts as outlined in blog post
let private sleepOfSql (row:IDataRecord) =
let x = (row?mood).Value
// do more stuff
execReader "select * from sleeps where userId = @userId and @start <= date and date <= @fin" [P("@userId", userId'); P("@start", start); P("@fin", fin)]
|> Seq.ofDataReader
|> Seq.map (sleepOfSql)
I'm following the docs and trying to get a basic example working where I read some values out of my database. F# insists that
(row?mood).Value
is an indeterminate type. It's not clear from the example blog posts, or the unit tests, why this wouldn't work.The relevant portions of my code: