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

Thank you!!! ddbb159c-feb2-4ff0-a86c-

Thank you!!! ddbb159c-feb2-4ff0-a86c-022d0d3b336a

I'm trying to import data from an sql

I'm trying to import data from an sql file trough the http api but getting statement too long: SQLITE_TOOBIG error. The whole sql file is 24mb and has one insert statement per line (each statement ends with a semicolon followed by a line break). The table has 13 columns I'm inserting into. The longer insert statement line is 751 byte. Are there any limitations for the D1 HTTP API I'm not aware of? Could this be a bug? Or I'm maybe doing something wrong? Update: Problem was with quotes not been escaped. Escaped those by doubling them and the problem was solved!...

Unexplained row reads in billable usage

Did anyone else had any unexplained reporting in billable usage for D1? On the 25th of October it's saying it suddenly had 1 million row reads, though it's not verifiable through the D1 analytics page, see thread for screenshots:

Hello. I'm getting this error when

Hello. I'm getting this error when running npx drizzle-kit push command. Anyone know what's going on? ``` [✓] Pulling schema from database... Error: 7500: not authorized: SQLITE_AUTH...

We are also seeing this error.

We are also seeing this error. We are trying to deploy the code using npx wrangler deploy Partial toml file ```toml...

I'm trying to run multiple SQL

I'm trying to run multiple SQL statements at once. - When running multiple multi-line queries via D1 REST API everything works. - When running multiple multi-line queries via env.DB.exec(), I get an error. It can only parse multiple queries if each query is only a single line. works via db.exec() ```sql...

yes, there is a .sqlite file in .

yes, there is a .sqlite file in .wrangler directory. you can open that in Navicat.

Is the D1 HTTP API down right now?

Is the D1 HTTP API down right now?

hi all. I am using import API for D1

hi all. I am using import API for D1 https://developers.cloudflare.com/api/operations/cloudflare-d1-import-database. Does anybody used it before and are any limits on the file size? I am getting 500 internal server all the time. Thank you

I switched and couldn't believe how easy

I switched and couldn't believe how easy it was and how beautiful multi-tenant works with Turso.

Thanks guys for this brainstorm.

Thanks guys for this brainstorm. Multiple independent DB's isn't something I can do. I needed one DB, with read and write replicas. Where the write happens also to the nearest DB but would eventually propagate to all others.

Do you have to use the REST API? Might

Do you have to use the REST API? Might be easier to use the D1 API in Workers directly.

Hi, I am having troubble setting up

Hi, I am having troubble setting up drizzle with the local d1 database, when running bun drizzle-kit migrate i receive the following error: ```bash $ bun db:migrate $ drizzle-kit migrate No config path provided, using default 'drizzle.config.ts'...

Anyone know why BLOB fields return

Anyone know why BLOB fields return number[] instead of ArrayBuffer? Seems weird because the docs show that they should map to ArrayBuffers.

I'm using nuxt + drizzle orm +

I'm using nuxt + drizzle orm + cloudflare D1. I can insert, delete, update data from drizzle studio (binded with D1), but I defined api and make api calls from by webapp page to perform those actions, it returns status 200 (OK) but nothing changes in database...

Hi folks. i have a bunch of data in a

Hi folks. i have a bunch of data in a csv file which i would like to dump into my table i d1 db. Which is the best way to do this? Seems like d1 doesn't support csv yet (cmiiw)

Hi All, I am facing an issue using D1

Hi All, I am facing an issue using D1 locally. The issue is my worker cannot see any of the DB objects I have created. First, I setup my DB with some DDL: wrangler d1 execute appdb-dev --local --file=./1.sql...

I am trying to follow the instructions

I am trying to follow the instructions and set up this DB environment variable in my nextjs app but I am stuck at the very first step.
No description

What are your thoughts of separate

What are your thoughts of separate databases? I have a users table in an auth database, but user-owned resources are in product-specific databases, making foreign key references impossible. 😦 Should I cave and put the tables in the same database so that I can have foreign keys on user IDs, or should I keep a separation of concerns to decrease the blast radius of a security incident?

hi all, i'm developing a worker that has

hi all, i'm developing a worker that has access to D1 databases through D1 database bindings (set as variables under D1 Database Bindings). how am i able to reach those databases when i'm developing locally? using queries like this: {results} = await env.IRADB.prepare(<here goes the query>).bind(<binds>).run();
Next