MCPcopy Create free account
hub / github.com/TanStack/db / dropTestTables

Function dropTestTables

packages/db-collection-e2e/src/fixtures/test-schema.ts:62–73  ·  view source on GitHub ↗
(
  dbClient: { query: (sql: string) => Promise<void> },
  tableNames: {
    users: string
    posts: string
    comments: string
  },
)

Source from the content-addressed store, hash-verified

60 * Helper to drop all test tables
61 */
62export async function dropTestTables(
63 dbClient: { query: (sql: string) => Promise<void> },
64 tableNames: {
65 users: string
66 posts: string
67 comments: string
68 },
69): Promise<void> {
70 await dbClient.query(`DROP TABLE IF EXISTS ${tableNames.comments}`)
71 await dbClient.query(`DROP TABLE IF EXISTS ${tableNames.posts}`)
72 await dbClient.query(`DROP TABLE IF EXISTS ${tableNames.users}`)
73}
74
75/**
76 * Type-safe table column mappings

Callers

nothing calls this directly

Calls 1

queryMethod · 0.45

Tested by

no test coverage detected