forked from eveningkid/denodb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added pool feature for the postgres connector * added stable support for postgres pool, added tests * Update lib/connectors/connector.ts * fixed stuff as previously mentioned in eveningkid#363 * making getClient & _getClientOrPool optional * update test Co-authored-by: Matteo Stellato <matteo.stellato.external@atos.net> Co-authored-by: Arnaud <eveningkid@users.noreply.github.com>
- Loading branch information
1 parent
324c26d
commit 62ae2f7
Showing
9 changed files
with
175 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"importMap": "./import_map.json" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"imports": { | ||
"https://dev.jspm.io/npm:@jspm/core@1/nodelibs/timers.js": "https://deno.land/std@0.159.0/node/timers.ts", | ||
"https://dev.jspm.io/npm:@jspm/core@1/nodelibs/url.js": "https://deno.land/std@0.159.0/node/url.ts", | ||
"https://dev.jspm.io/npm:@jspm/core@1/nodelibs/events.js": "https://deno.land/std@0.159.0/node/events.ts" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { getPostgreSQLPoolConnection, getPostgreSQLConnection } from "../../../connection.ts"; | ||
import { assertEquals } from "../../../deps.ts"; | ||
|
||
Deno.test({ name: "PostgreSQL: Connection", sanitizeResources: false}, async function () { | ||
const connection = getPostgreSQLConnection(); | ||
const ping = await connection.ping(); | ||
await connection.close(); | ||
|
||
assertEquals(ping, true); | ||
}); | ||
|
||
Deno.test({ name: "PostgreSQL: Pool Connection", sanitizeResources: false}, async function () { | ||
const connection = getPostgreSQLPoolConnection(); | ||
const ping = await connection.ping(); | ||
await connection.close(); | ||
|
||
assertEquals(ping, true); | ||
}); |