AstroDB, export alias from drizzle #889
NickDubelman
started this conversation in
Proposal
Replies: 1 comment 1 reply
-
Sounds good to me, if you want to submit a PR I think we could definitely accept it. thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Should be able to
import { alias } from 'astro:db'
Background & Motivation
I just hit a situation where I needed to join on the same table twice in the same query (sports-themed app where there is a home team and an away team).
I consulted the Drizzle docs and found
alias
. In order to use it, I had to add drizzle itself. I checked out the types exported byastro:db
and I see things likeeq
,gt
, etc. It seems likealias
belongs in these set of exports that are automatically included from Drizzle.Goals
Example
This is what I did to get alias:
I'd prefer to:
Beta Was this translation helpful? Give feedback.
All reactions