.sqlite export is being specced out but is unlikely to arrive within the month, i would look at spli
.sqlite export is being specced out but is unlikely to arrive within the month, i would look at splitting the workload across multiple dbs in the meanwhile or using a query limit on nora's tool
14 Replies
Fixing in a PR
Changelog going out soon, but for those here:
* D1's
.raw()
, .all()
and .run()
query statement methods (https://developers.cloudflare.com/d1/build-databases/query-databases/#query-statement-methods) have been updated to reflect their intended behaviour and improving compatibility with ORMs.
* .raw()
now correctly returns results an array of arrays, allowing the correct handling of duplicate column names (such as when joining tables), as compared to .all()
, which is unchanged and returns an array of objects. To include an array of column names in the results when using .raw()
, use .raw({columnNames: true})
.
* .run()
no longer incorrectly returns a D1Result
and instead returns a D1ExecResult
(https://developers.cloudflare.com/d1/build-databases/query-databases/#return-object) as originally intended and documented.
This may be a breaking change for some applications that expected .raw()
to return an array of objects.It was indeed a breaking change for us, even if it was never intended to work that way. Replacing the .run() with .all() seemed to have done the trick for now. Back to sleep 😅
That’s what a betas for tho 🤝
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
Is anyone having an issue with D1? It looks like it is failing to return results.
![No description](https://cdn.answeroverflow.com/1207233511010861127/image.png)
![No description](https://cdn.answeroverflow.com/1207233511308787742/image.png)
A basic simple select query does not return any result array.
Same issue here @sultan.xh.
Yes, the Return object is missing results.
@sultan.xh if you are using .run() it is now won't be returning any results
What should I use then?
@sultan.xh .all() instead
Okay, it is a small change, but it has a big impact. I need to modify everything now.
Thanks!