drizzle-team / drizzle-team/drizzle-orm

[BUG]: node-postgres client doesn't have end function

Open
#3,402 5 comments 3 reactions 0 assignees View on GitHub
bug bug/cant-reproduce driver/pg
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### What version of `drizzle-orm` are you using?

0.36.0

### What version of `drizzle-kit` are you using?

0.27.1

### Describe the Bug

Give this code

```ts
import { drizzle } from "drizzle-orm/node-postgres";

export const db = await drizzle({
schema: schema,
connection: {
// ...
},
});
```

In tests i need to close the connection but there's no function called `end` in `db.$client.end()`. It's only exposed when manually creating `pg` Pool. Drizzle is not creating pool by itself?

### Expected behavior

It should expose `end` function

### Environment & setup

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.