UNPKG

@clickup/pg-microsharding

Version:
14 lines (12 loc) 427 B
import { createConnectedClient } from "../../internal/createConnectedClient"; import { libSchema } from "../../internal/names"; /** * Creates a connected client to the test database. */ export async function createTestConnectedClient( dsn: string, ): ReturnType<typeof createConnectedClient> { const client = await createConnectedClient(dsn); await client.query(`SET search_path = ${libSchema()}`); return client; }