D1 read request

I have a worker(production env) which makes requests to D1 and gets data using D1 client. All of a sudden, it does not give any results but there is no error as such (results property is an empty array). Same sql statement through the D1 console fetches multiple columns of data. This is the response from D1
{
“results”: ,
“success”: true,
“meta”: {
“served_by”: “v3-prod”,
“duration”: 0.1914,
“changes”: 0,
“last_row_id”: 0,
“changed_db”: false,
“size_after”: 3907584,
“rows_read”: 10,
“rows_written”: 0
}
}

I am trying to read data from D1 through workers using D1 client (select * from table limit 10). It responds with empty array in results field but success is true, rows read in the meta object is non zero(it is 10 if limit is 10). When the same sql statement is used in D1 console, it returns with multiple rows. There is no problem with inserting data into D1. Problem is only with getting data.

I am having this problem also

I have this same probelm, did you find a solution?

What code are you using? There was a recent change here:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.