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

Function isTaken

apps/cloud/scripts/backfill-org-slugs.ts:41–45  ·  view source on GitHub ↗
(slug: string)

Source from the content-addressed store, hash-verified

39// slugs without round-tripping after every insert.
40const planned = new Set<string>();
41const isTaken = async (slug: string) => {
42 if (planned.has(slug)) return true;
43 const hits = await sql`SELECT 1 FROM organizations WHERE slug = ${slug}`;
44 return hits.length > 0;
45};
46
47let updated = 0;
48for (const row of rows) {

Callers 1

generateOrgSlugFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected