Skip to content

Commit

Permalink
db: export 'alias' from drizzle-orm/sqlite-core (withastro#10789)
Browse files Browse the repository at this point in the history
* db: export 'alias' from drizzle-orm/sqlite-core

* chore: changeset

* fix: changeset target

---------

Co-authored-by: Ben Holmes <hey@bholmes.dev>
  • Loading branch information
2 people authored and PeterDraex committed Apr 23, 2024
1 parent e0124fe commit 635d65c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-pets-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/db": patch
---

Expose the Drizzle `alias` utility from `astro:db` to enable self-joins on a table.
2 changes: 2 additions & 0 deletions packages/db/src/runtime/virtual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,5 @@ export {
max,
min,
} from 'drizzle-orm';

export { alias } from 'drizzle-orm/sqlite-core';
1 change: 1 addition & 0 deletions packages/db/virtual.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}

0 comments on commit 635d65c

Please sign in to comment.