© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago
liv

types from nested relational queries

wondering what the type of
user
user
is?
async function getUserWithSettings(steamId: string): Promise<User> {
  const user = await db.query.users.findFirst({
    where: (user, { eq }) => eq(user.steamId, steamId),
    with: {
      settings: {
        columns : {
          steamId: false,
        },
      },
    }
  });
  return user;
}
async function getUserWithSettings(steamId: string): Promise<User> {
  const user = await db.query.users.findFirst({
    where: (user, { eq }) => eq(user.steamId, steamId),
    with: {
      settings: {
        columns : {
          steamId: false,
        },
      },
    }
  });
  return user;
}
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Nested where clauses in relational queries
Drizzle TeamDTDrizzle Team / help
3y ago
Relational queries result types are not working
Drizzle TeamDTDrizzle Team / help
3y ago
Conditional Relational Queries
Drizzle TeamDTDrizzle Team / help
3y ago
Relational queries (PlanetScale)
Drizzle TeamDTDrizzle Team / help
3y ago