JSPM

@abku/d1

1.0.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q34119F
    • License MIT

    A package that allow you to connect with Cloudflare D1.

    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.