From 4765769c2caca7f5c9c92b26138546b69c7856f4 Mon Sep 17 00:00:00 2001 From: Nick Dubelman Date: Sat, 13 Apr 2024 10:59:19 -0700 Subject: [PATCH 1/3] db: export 'alias' from drizzle-orm/sqlite-core --- packages/db/src/runtime/virtual.ts | 2 ++ packages/db/virtual.d.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/db/src/runtime/virtual.ts b/packages/db/src/runtime/virtual.ts index ac118d6930b6..4159e74c1a5c 100644 --- a/packages/db/src/runtime/virtual.ts +++ b/packages/db/src/runtime/virtual.ts @@ -92,3 +92,5 @@ export { max, min, } from 'drizzle-orm'; + +export { alias } from 'drizzle-orm/sqlite-core'; diff --git a/packages/db/virtual.d.ts b/packages/db/virtual.d.ts index efe9e8387d30..6c93137a20b5 100644 --- a/packages/db/virtual.d.ts +++ b/packages/db/virtual.d.ts @@ -42,4 +42,5 @@ declare module 'astro:db' { export const sumDistinct: RuntimeConfig['sumDistinct']; export const max: RuntimeConfig['max']; export const min: RuntimeConfig['min']; + export const alias: RuntimeConfig['alias']; } From dcfdcde9d4af1bd5b5077ec7223487f88c1ec1d1 Mon Sep 17 00:00:00 2001 From: Ben Holmes Date: Tue, 16 Apr 2024 17:24:19 -0400 Subject: [PATCH 2/3] chore: changeset --- .changeset/few-pets-relax.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/few-pets-relax.md diff --git a/.changeset/few-pets-relax.md b/.changeset/few-pets-relax.md new file mode 100644 index 000000000000..783e132e6389 --- /dev/null +++ b/.changeset/few-pets-relax.md @@ -0,0 +1,5 @@ +--- +"@fake-scope/fake-pkg": patch +--- + +Expose the Drizzle `alias` utility from `astro:db` to enable self-joins on a table. From 37ee95cd95c277027e6ba8388d2ccc7ac123be37 Mon Sep 17 00:00:00 2001 From: Ben Holmes Date: Tue, 16 Apr 2024 17:28:02 -0400 Subject: [PATCH 3/3] fix: changeset target --- .changeset/few-pets-relax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/few-pets-relax.md b/.changeset/few-pets-relax.md index 783e132e6389..7e2682c27470 100644 --- a/.changeset/few-pets-relax.md +++ b/.changeset/few-pets-relax.md @@ -1,5 +1,5 @@ --- -"@fake-scope/fake-pkg": patch +"@astrojs/db": patch --- Expose the Drizzle `alias` utility from `astro:db` to enable self-joins on a table.