I'm trying to do async db query using SQLProvider and sqlite as db. The server side function looks like this
[Rpc]
let dbAsyncCall () =
async {
return! query {
// ...
} |> Seq.executeQueryAsync
}
|> Async.StartAsTask
|> Async.AwaitTask
On the client side I call it like this
async {
let! data = Server.dbAsyncCall ()
// ...
} |> Doc.Async
When the code gets executed I receive the following error
What's going on?
Thanks!
UPDATE:
Ok, it seems that the problem is somehow related to executing queries on sqlite. I mean if try to do a simple async operation async { return 5}
, it gets executed without any problems, but when I do any db related queries and surround it with async
, I receive the error. I know that SQLProvider supports async queries, maybe the problem with sqlite lib itself?
UPDATE 2: