
Does Cloudflare D1 support database connection pooling like Supabase or Neon?D1 is not postgres. It's sqlite, which doesn't have a remote connection protocol. You can connect via the Rest API( not recommended, goes through core/higher latency and api rate limits) or via Workers, which just make requests to your d1 instance.
If not, it's not a good option to choose D1 instead Supabase or Neon, right? (also considering other issues like lack of transactions support)Supabase and Neon are both Postgres DBs. Compared to D1, they have more scaling options (D1 is locked to a single instance in a single region right now), higher max storage (D1 has a hard limit of 10 gb), and is postgres/instead of sqlite, less vendor lockin and such. So it's pretty different in general. D1 aims to have you scale with many DBs rather then one big one, but lacks the dynamic bindings to make that easy right now
D1 is designed for horizontal scale out across multiple, smaller (10 GB) databases, such as per-user, per-tenant or per-entity databases.
npx @outerbase/studio and It works perfectly for the local SQLite in the Wrangler project.npx @outerbase/studio --config="$pwd\d1-outerbase.config-local.json"
{
"driver": "sqlite",
"connection": {
"file": ".wrangler/state/v3/d1/miniflare-D1DatabaseObject/15c63002ced39d198237431f852a8e7204274c5a10e9861150529b8b00db0f6c.sqlite"
},
"port": 4000
}@outerbase/studio packagenpx @outerbase/studio --config="$pwd\d1-outerbase.config-remote.json"
{
"driver": "cloudflare-d1",
"connection": {
"accountId": "your-account-id",
"apiToken": "your-api-token",
"databaseId": "your-database-id"
},
"port": 4000
}
npx @outerbase/studionpx @outerbase/studionpx @outerbase/studio --config="$pwd\d1-outerbase.config-local.json"
{
"driver": "sqlite",
"connection": {
"file": ".wrangler/state/v3/d1/miniflare-D1DatabaseObject/15c63002ced39d198237431f852a8e7204274c5a10e9861150529b8b00db0f6c.sqlite"
},
"port": 4000
}@outerbase/studionpx @outerbase/studio --config="$pwd\d1-outerbase.config-remote.json"
{
"driver": "cloudflare-d1",
"connection": {
"accountId": "your-account-id",
"apiToken": "your-api-token",
"databaseId": "your-database-id"
},
"port": 4000
}