This project isn't what I needed, it's a proxy to uses a remote D1 database, and could be used with as a REST API to be hosted in local, but the database is still on CF servers (online).
In fact, I was confused with the Cloudflare API, that permit to create a D1 database and to query it through REST API too, but it's create the D1 database in CF servers too (need to be online too).
I suppose there is not an equivalent Cloudflare API to call in REST on localhost, that could permit us to create a new database (offline) inside our .wrangler/d1/ folder
Implement simulators as Durable Objects by @mrbbot in #656. Allow GET requests with bodies in entry worker by @mrbbot in #677 Remove unused handleQueue() function from entry wor...
Thank you, indeed there is example to access any kind of databases, ( « const d1Database = await mf.getD1Database("DATABASE");» ), I'm not sure this also permit to create one, but I'll check, thank you for the link!
The latest dev blog about D1 says the limit will be upped coming weeks and months. (note, Several times) Once they have fast read on big sizes they would love to be on double-digit GB size. And they are aiming on GA Q1 2024. So i would guess.. "soon"
KV is extremely fast (faster than D1 without query caching) if the read is hot. If it's a cold read, it would probably depend on the location of you D1 database relative to the person requesting.
2 different pricing models is super confusing hence why they are removing the bundled/unbound models and making 1 standard pricing.
And SQL in general almost never follows denormalization as its pretty much built to normalize and support joins. But im not sure how the new billing model encourages normalization when it costs more to get 2 records via a join than it does to get 1?
As far as I know D1 databases are not currently replicated to different regions so there's only primary location. But I'm too hoping this will be added when replication is introduced.
Apologies if this has been answered, but I am not able to find the answer.
If I create a D1 database using the REST api, is there anyway to then use it in an existing worker without needing to define the Binding at design time? I.e, is it possible to create a dynamic binding to a D1 inside a worker at runtime?