outerbase / sdk

Typescript ORM and automated model generation direct from your database schema. Supports Outerbase features for saved queries & AI.
https://outerbase.com
MIT License
12 stars 5 forks source link

Add a Cloudflare D1 connection #9

Closed Brayden closed 6 months ago

Brayden commented 6 months ago

Purpose

Adding a new connection type that directly utilizes the Cloudflare D1 HTTP API for running SQL queries against your D1 database.

NOTE: The Cloudflare D1 HTTP API does not support CORS so the queries must be initiated on a server and not from a browser.

Tasks

Verify

Before

After

Query:  INSERT INTO table_name (something, another, id) VALUES (?, ?, ?)
Params:  [ 'hello', 'world', 3 ]