cloudflare / cloudflare/developer-platform
Durable Objects Sqlite: Javascript booleans are incorrectly bound as strings
- Dominant language
- No language data
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### What versions & operating system are you using?
wrangler 4.24.3, node v23.11.0, macOS Sonoma
### Please provide a link to a minimal reproduction
https://github.com/mon/cf-worker-do-bool-bug
### Describe the Bug
When binding a javascript boolean to a sqlite `exec` call in a Durable Object, the value is serialised as the string value of the boolean instead of 0/1 as it is in D1.
This appears to be the only datatype with this issue.
From the linked repro case - note that only the `bool` column differs:
```
D1 select result: {
n: null,
integer: 123,
real: 123.456,
text: 'hello',
blob: 'world',
numeric: 5.3,
bool: 1,
bool2: 1
}
DO select result: {
n: null,
integer: 123,
real: 123.456,
text: 'hello',
blob: 'world',
numeric: 5.3,
bool: 'true',
bool2: 1
}
```
### Please provide any relevant error logs
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.