cloudflare / cloudflare/developer-platform
Durable Objects Sqlite: Javascript booleans are incorrectly bound as strings
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 1
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### 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_
Beitragsleitfaden
Rechercherichtung
Beginne mit der minimalen Reproduktion unter https://github.com/mon/cf-worker-do-bool-bug und vergleiche das Durable Objects SQLite exec binding mit dem im Issue gezeigten D1-Ergebnis. Verfolge die Verarbeitung boolescher Parameter und überprüfe, dass das Durable Objects-Ergebnis boolesche Werte als 0/1 speichert, während die anderen demonstrierten Datentypen unverändert bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, sqlite
- Bereich
- backend, databases
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100