jrydberg
jrydberg
Explore posts from servers
CDCloudflare Developers
Created by jrydberg on 10/6/2024 in #kv
I'm running a worker locally (`wrangler
I'll try to run it with logging turned up when I get to the (real) computer.
8 replies
CDCloudflare Developers
Created by jrydberg on 10/6/2024 in #kv
I'm running a worker locally (`wrangler
Yes, it works then.
8 replies
CDCloudflare Developers
Created by jrydberg on 10/6/2024 in #kv
I'm running a worker locally (`wrangler
Unfortunately not.
8 replies
CDCloudflare Developers
Created by jrydberg on 10/6/2024 in #kv
I'm running a worker locally (`wrangler
Yes, this is the command I'm using
wrangler kv key put --local --namespace-id 1301af669c344294b1d174d5a4a63525 pk_cy2albwg5u3mibmhauf8bacmjfbj36y2 test-workspace
wrangler kv key put --local --namespace-id 1301af669c344294b1d174d5a4a63525 pk_cy2albwg5u3mibmhauf8bacmjfbj36y2 test-workspace
When I'm starting the dev mode it prints this, which matches;
Your worker has access to the following bindings:
- KV Namespaces:
- PUBLISHED_KEYS_MAPPING: 1301af669c344294b1d174d5a4a63525
Your worker has access to the following bindings:
- KV Namespaces:
- PUBLISHED_KEYS_MAPPING: 1301af669c344294b1d174d5a4a63525
8 replies
CDCloudflare Developers
Created by jrydberg on 10/4/2024 in #workers-help
Binding outside of the fetch handler?
Can you do save a ref to the env without the worker breaking?
2 replies
DTDrizzle Team
Created by jrydberg on 8/3/2024 in #help
How to get the type of transaction from a database?
best i've come up with is:
export const db = drizzle(sqlite, { schema: { ...schema } });
export type Database = typeof db;

type ArgumentTypes<F extends Function> = F extends (...args: infer A) => any
? A
: never;
export type Transaction = ArgumentTypes<
ArgumentTypes<Database['transaction']>[0]
>[0];
export const db = drizzle(sqlite, { schema: { ...schema } });
export type Database = typeof db;

type ArgumentTypes<F extends Function> = F extends (...args: infer A) => any
? A
: never;
export type Transaction = ArgumentTypes<
ArgumentTypes<Database['transaction']>[0]
>[0];
6 replies
DTDrizzle Team
Created by jrydberg on 8/3/2024 in #help
How to get the type of transaction from a database?
but how can i get the transaction type, enriched with the schema types?
6 replies