-
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: The primary goal of this refactor is to remove hard dependency on `pg`. My intention is to move Slonik away from being a `pg` wrapper, to make it a universal client. The work in this PR abstracts all interactions with the database behind a pool and drivers (e.g. `createPgDriver`). This makes it very easy to implement drivers for `pg-native`, `postgres` and other drivers. * Drops dependency on `pg.Pool` * Implements a more efficient internal pooling mechanism. * For context, test execution time dropped from ~50 seconds down to ~6 seconds. * Renames `getPoolState()` to `state()` * Removes `createMockPool` * It was at best not useful, and at worst misleading. Even Slonik itself didn't use it. There are better ways to mock/spy connections. Refer to `createPoolWithSpy` as one of the possible ways. * Refactors all tests to use database connection instead of mocking.
- Loading branch information
Showing
68 changed files
with
1,984 additions
and
2,359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.