![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@atinux/kysely-d1
Advanced tools
Kysely adapter for Cloudflare D1.
npm i kysely-d1
This project was largely adapted from kysely-planetscale.
Pass your D1 binding into the dialect in order to configure the Kysely client. Follow these docs for instructions on how to do so.
import { Kysely } from 'kysely';
import { D1Dialect } from 'kysely-d1';
export interface Env {
DB: D1Database;
}
interface KvTable {
key: string;
value: string;
}
interface Database {
kv: KvTable;
}
export default {
async fetch(request: Request, env: Env): Promise<Response> {
const { searchParams } = new URL(request.url);
const key = searchParams.get('key');
if (!key) {
return new Response('No key defined.', { status: 400 });
}
// Create Kysely instance with kysely-d1
const db = new Kysely<Database>({ dialect: new D1Dialect({ database: env.DB }) });
// Read row from D1 table
const result = await db.selectFrom('kv').selectAll().where('key', '=', key).executeTakeFirst();
if (!result) {
return new Response('No value found', { status: 404 });
}
return new Response(result.value);
},
};
There is a working example also included, which implements a K/V style store using D1.
FAQs
Kysely dialect for Cloudflare D1
We found that @atinux/kysely-d1 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.