Package Exports
- @abku/d1
- @abku/d1/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@abku/d1) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@abku/d1
A simple package that allows you to connect with Cloudflare D1 and run queries.
Usage
import { d1 } from "@abku/d1";
const d1 = new d1(account_id, token, database_id);
async main(){
const response = await d1.listDatabase();
console.log(response)
}
main()Methods
d1.query('SQL QUERY HERE');d1.createDatabase('database-name');d1.deleteDatabase('database-id');d1.getDatabase('database-id');d1.listDatabase();Please make sure you setup token. docs.
Need Help? Join discord server.