wrangler.toml localConnectionStringgo attempt 
random() or some other non-deterministic function will have the same effect._, ! and ^. Are these likely to be the problem?password is a top level value (https://developers.cloudflare.com/api/operations/create-hyperdrive), in our testing we’ve found that it should be nested within origin.password in origin? Or the API updated to expose password at the top level?password should be nested within the origin object - e.g. https://github.com/cloudflare/workers-sdk/blob/d637bd59a8ea6612d59ed4b73e115287615e617d/packages/wrangler/src/hyperdrive/client.ts#L23pg@8.11.0, initiating kysely like this:LOCAL_DATABASE_URL for local development (connectionstring including ?sslmode=require), I'm able to setup the connection, but any query will yield Error: Connection terminated unexpectedly. localConnectionString instead of bypassing hyperdrive in local dev, but it transforms my connectionstring to some hyperdrive.local url.?sslmode=require in my connection stringNODE_EXTRA_CA_CERTS=./assets/certificate.pem wrangler dev solved the issue.
localConnectionStringlocalConnectionStringgorandom()_!^wrangler hyperdrive create "my-db" --connection-string="postgres://user:pass@host:5432/db"originoriginoriginpg@8.11.0const connectionString =
env.LOCAL_DATABASE_URL || env.HYPERDRIVE.connectionString;
new Kysely<DB>({
dialect: new PostgresDialect({
pool: new Pool({
max: 1,
connectionString,
ssl: {
rejectUnauthorized: false,
},
}),
}),
});LOCAL_DATABASE_URL?sslmode=require?sslmode=requireError: Connection terminated unexpectedlyhyperdrive.local[wrangler:err] Error: internal error
at cachedError (/x/node_modules/postgres/cf/src/query.js:170:23)
at new Query (/x/node_modules/postgres/cf/src/query.js:36:24)
at sql2 (/x/node_modules/postgres/cf/src/index.js:113:11)
at Object.fetch (/x/index.ts:9:23)import postgres from 'postgres';
export default {
async fetch(request: Request, env: any) {
const connectionString =
env.DATABASE_URL || env.HYPERDRIVE.connectionString;
console.log('fetch', request.url, env.DATABASE_URL);
const sql = postgres(connectionString);
const abc = await sql`SELECT * FROM tenant LIMIT 10`;
console.log('abc', abc);
return new Response(JSON.stringify({ ok: true }));
},
};{
"name": "x",
"dependencies": {
"postgres": "^3.4.3"
}
}name = "xyz"
compatibility_flags = ["nodejs_compat"]NODE_EXTRA_CA_CERTS=./assets/certificate.pem wrangler dev