import { dbFetch } from '@odatnurd/d1-query';
const result = await dbFetch(ctx.env.DB, 'get_users',
`SELECT * FROM Users WHERE userId = :userId
OR username = :userName`,
{ userId: 69, userName: 'jim'}
) @odatnurd/d1-query is a lightweight utility wrapper designed to simplify
interactions with Cloudflare D1 databases.
When building serverless applications on Cloudflare Workers, managing database connections and raw query execution can introduce repetitive boilerplate. This package streamlines the process of preparing statements, binding parameters, and handling the resulting data payloads, allowing you to focus directly on your application logic.