MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / select

Function select

apps/cloud/src/auth/member-directory.ts:57–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 // One projection for every read, so the seam's row shape is built in exactly
56 // one place. `membershipId` is non-null by the `known` predicate below.
57 const select = () =>
58 db
59 .select({
60 accountId: memberships.accountId,
61 membershipId: memberships.membershipId,
62 organizationId: memberships.organizationId,
63 role: memberships.role,
64 status: memberships.status,
65 email: accounts.email,
66 firstName: accounts.firstName,
67 lastName: accounts.lastName,
68 avatarUrl: accounts.avatarUrl,
69 lastSignInAt: accounts.lastSignInAt,
70 })
71 .from(memberships)
72 .innerJoin(accounts, eq(accounts.id, memberships.accountId))
73 .$dynamic();
74
75 type Row = Awaited<ReturnType<typeof select>>[number];
76

Callers 3

selectVersionFunction · 0.85
membersFunction · 0.85
makeServiceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected