Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

I like using DOs for transactions more

I like using DOs for transactions more simply because you control the thread of processing. Run a bunch of SQL in synchronous code with the right error handling in place and you have transactions. Another approach I use when coordinating changes async across D1/DO other resources in a saga pattern....

You will see metrics for each region

You will see metrics for each region serving queries, yes. But, replicas are used only on-demand for queries inside each region, they don't run all the time. For example, if you have traffic in ENAM and EEUR, you should see the primary and the replicas in those two regions being in your metrics.

Named Parameters Timeline

In the future, D1 will support named parameters as well.
What's the timeline on this?...

Can you DM me details of the database ID

Can you DM me details of the database ID and account ID, and timeranges that you saw this? This is new error for D1 so far, so I want to make sure we investigate in case there is some regression in the SQLite engine under the hood.

Yea I ended up using durable objects for

Yea I ended up using durable objects for the tenant based data and D1 for auth. I would have liked tenant specific auth data to be stored in the tenant database but theres not a real way to do that with the way the app architecture and durable objects work

What issues are you facing with HD and

What issues are you facing with HD and psql?

Workers Binding API

So the Typescript Support section on this page: https://developers.cloudflare.com/d1/worker-api/#typescript-support Shows a typed run() function:...

can we timetravel with local d1 ?

can we timetravel with local d1 ?

So I have created a D1 database with

So I have created a D1 database with wrangler and I have added a table to the database using the D1 web console. I can get the db schema just fine via PRAGMA: npx wrangler d1 execute spendydb --command='PRAGMA table_list' --remote However if I try to execute any SQL with wrangler I get an auth error. This happens for remote and local instances:...

Hi,

Hi, I am trying to run D1 in remote mode in locally but I got this error ```console [wrangler:info] GET / 500 Internal Server Error (99ms)...

Am I able to have a D1 Database that reads and writes in Johannesburg

It doesn’t look like Durable Objects currently run in South Africa, so probably not(D1 Databases are built on top of Durable Objects)

> We think its because of D1

We think its because of D1
Did you see specific errors?...

Yeah the batteries included things are

Yeah the batteries included things are what gradually I would like us (personal opinion) to also make available for DOs, and then the choice is simpler. If D1 got dynamic bindings then it would be 90% identical to DOs, and duplicated effort from all fronts. But, yeah, everything you say is a common internal debate we are having.

really? I couldnt get it to work before

really? I couldnt get it to work before, maybe fixed now, will try again. would be helpful. back when I added this I ran into some issue deep in drizzle that the Date was not properly being constructed if I did it another way

Thread

Migrations, because better auth wants an exported auth object, which is not possible with how bindings with d1 work

How accurate are the numbers in the "

How accurate are the numbers in the "Queries" section of the "Overview"? I have a query which always shows zero rows read. Yet I know from testing (and logging) that the query is successful and would return data. It must have read some rows. Yet it's always zero. Is this just an analytics issue, rounding error (I think the query would read two rows when successful)?

Currently the column Rows Read is using

Currently the column Rows Read is using averages, so 45.6K*662=30M, which matches what you said. We should probably make that sum as well, but it might confuse folks with the count in that case.

Hello y'all, i used d1 export for one of

Hello y'all, i ran d1 export for one of my databases and now it says Error in worker: Error: D1_ERROR: Currently processing a long-running export. and i'm not sure it's currently processing because it errored out on my terminal. Is there a way to cancel this process?

Durable Object Storage

This is so much clearer!! Would it be possible to maybe clarify the same for durable objects sql api? I’ve been trying to figure out if sql methods protect against sql injection https://developers.cloudflare.com/durable-objects/api/storage-api/#returns...
Next