Skip to content

Testing and experiment with drizzle-orm and cloudflare D1

Notifications You must be signed in to change notification settings

gerhardcit/drizzle-orm-samples

Repository files navigation

Drizzle ORM and Clouddlare's D1

Steps to see the problem

  1. pnpm drizzle-kit generate:sqlite --schema=./schema.ts
  2. Run using SQLite DB only
    1. pnpm tsx run-sqlite-core-json.ts
  3. Run using D1 SQLite DB
    1. pnpm tsx run-sqlite-d1-json.ts

Expected output

[
  {
    id: 1,
    name: 'test',
    roles: { foo: 'bar' },
    jobs: [ 'foo', 'bar' ]
  }
]

Vitests

There are also a set of tests using vitest.

pnpm vitest

About

Testing and experiment with drizzle-orm and cloudflare D1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published