Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does it support correlated subquery ? #29

Open
a-eid opened this issue Oct 31, 2024 · 1 comment
Open

does it support correlated subquery ? #29

a-eid opened this issue Oct 31, 2024 · 1 comment

Comments

@a-eid
Copy link

a-eid commented Oct 31, 2024

I am not able to get this syntax to work

const result = await db
  .selectFrom('person')
  .select((eb) => [
    'id',
    jsonArrayFrom(
      eb.selectFrom('pet')
        .select(['pet.id as pet_id', 'pet.name'])
        .whereRef('pet.owner_id', '=', 'person.id')
        .orderBy('pet.name')
    ).as('pets')
  ])
  .execute()

does d1 support it ?

@a-eid
Copy link
Author

a-eid commented Nov 8, 2024

also does it support CTE ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant