That isn't an issue with D1, `undefined` has never been supported.
That isn't an issue with D1,
undefined has never been supported.Not supported. Queries with undefined values will return a D1_TYPE_ERROR
undefined to bindbind and seeing which one is undefined, and going from there - the part of the D1 binding that throws that error hasn't changed functionally in a very long time.wrangler.toml in production: https://developers.cloudflare.com/pages/platform/functions/bindings/#d1-databases
SELECT on an indexed unique column. {'result': [], 'success': False, 'errors': [{'code': 7500, 'message': 'Internal error in D1 storage caused object to be reset.'}], 'messages': []}0/1 in my function code. I expect to have true/false in my function code instead.drizzle, a relatively new ORM that has a lot of momentum and is build with edge in mind.integer('id', { mode: 'boolean' }), same for timestamps, json etc
bindbind[env.staging]
d1_databases = [
{ binding = "DB", database_name = "test1", database_id = "1111", preview_database_id = "DB" },
]
wrangler pages deploy ./public --project-name myproj --env staging # works
[env.production]
d1_databases = [
{ binding = "DB", database_name = "test1-prod", database_id = "1111" },
]
wrangler pages deploy ./public --project-name myproj --env production --branch main # throw "Cannot read properties of undefined (reading 'prepare')"SELECT{'result': [], 'success': False, 'errors': [{'code': 7500, 'message': 'Internal error in D1 storage caused object to be reset.'}], 'messages': []}01integer('id', { mode: 'boolean' })let d1ReadResults = await env.DB.prepare("SELECT * FROM Entries WHERE hash = ?1")
.bind(hash)
.first();