Closed dtbuchholz closed 1 year ago
Latest commit: f96d35e552d4bed8eff2a204330a5cc85803acbd
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Summary
The D1 Database
exec
method has changed an now expects aExecResult
instead of aResult<T>
. If you're using the latest@cloudflare/workers-types
, the ORM response will be incorrect for methods likeCreateTable
orDropTable
, which useexec
under the hood. This PR bumps to the latest version and makes slight changes to fix this return type.Details
The latest D1 APIs can be found here. The is what
exec
looks like:And
D1ExecResult
:The proposed changes simply swap out the outdated return type of
D1Result<T>
forD1ExecResult
where needed. Also,chai
was updated in order to fix an import issue in the tests.How it was tested
After updating these deps and making slight changes to
database.ts
andmodel.ts
, the tests pass without needing any changes.