-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
677fdf0
commit 341f200
Showing
21 changed files
with
85 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM denoland/deno:alpine-1.40.3 | ||
FROM denoland/deno:alpine-2.1.4 | ||
WORKDIR /app | ||
|
||
# Install wait utility | ||
|
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 |
---|---|---|
@@ -1,22 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Deno Postgres</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | ||
<meta name="description" content="🦕 Lightweight PostgreSQL driver for Deno focused on developer experience"> | ||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css"> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script> | ||
window.$docsify = { | ||
name: 'deno-postgres', | ||
repo: 'buildondata/deno-postgres', | ||
} | ||
</script> | ||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script> | ||
<script src="//unpkg.com/prismjs/components/prism-typescript.min.js"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Deno Postgres</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | ||
<meta | ||
name="description" | ||
content="🦕 Lightweight PostgreSQL driver for Deno focused on developer experience" | ||
> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" | ||
> | ||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css"> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script> | ||
window.$docsify = { | ||
name: "deno-postgres", | ||
repo: "buildondata/deno-postgres", | ||
}; | ||
</script> | ||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script> | ||
<script | ||
src="//unpkg.com/prismjs/components/prism-typescript.min.js" | ||
></script> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
import { assertEquals, assertNotEquals, assertRejects } from "./test_deps.ts"; | ||
import { | ||
assertEquals, | ||
assertNotEquals, | ||
assertRejects, | ||
} from "jsr:@std/[email protected]"; | ||
import { Client as ScramClient, Reason } from "../connection/scram.ts"; | ||
|
||
Deno.test("Scram client reproduces RFC 7677 example", async () => { | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { assertEquals, assertThrows } from "./test_deps.ts"; | ||
import { assertEquals, assertThrows } from "jsr:@std/[email protected]"; | ||
import { fromFileUrl } from "@std/path"; | ||
import { createParams } from "../connection/connection_params.ts"; | ||
import { ConnectionParamsError } from "../client/error.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { assertEquals, assertRejects, copyStream } from "./test_deps.ts"; | ||
import { assertEquals, assertRejects } from "jsr:@std/[email protected]"; | ||
import { join as joinPath } from "@std/path"; | ||
import { | ||
getClearConfiguration, | ||
|
@@ -32,10 +32,8 @@ function createProxy( | |
outbound.close(); | ||
aborted = true; | ||
}); | ||
await Promise.all([ | ||
copyStream(conn, outbound), | ||
copyStream(outbound, conn), | ||
]).catch(() => {}); | ||
await conn.readable.pipeTo(outbound.writable, { preventClose: true }); | ||
await outbound.readable.pipeTo(conn.writable, { preventClose: true }); | ||
|
||
if (!aborted) { | ||
conn.close(); | ||
|
@@ -397,7 +395,7 @@ Deno.test("Closes connection on bad TLS availability verification", async functi | |
await client.connect(); | ||
} catch (e) { | ||
if ( | ||
e instanceof Error || | ||
e instanceof Error && | ||
e.message.startsWith("Could not check if server accepts SSL connections") | ||
) { | ||
bad_tls_availability_message = true; | ||
|
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import { assertEquals, formatDate } from "./test_deps.ts"; | ||
import { parse as parseDate } from "@std/datetime/parse"; | ||
import { assertEquals } from "jsr:@std/[email protected]"; | ||
import { decodeBase64, encodeBase64 } from "@std/encoding/base64"; | ||
import { getMainConfiguration } from "./config.ts"; | ||
import { generateSimpleClientTest } from "./helpers.ts"; | ||
|
@@ -933,7 +932,7 @@ Deno.test( | |
); | ||
|
||
assertEquals(result.rows[0], [ | ||
parseDate(date_text, "yyyy-MM-dd"), | ||
new Date(date_text), | ||
Infinity, | ||
]); | ||
}), | ||
|
@@ -943,7 +942,7 @@ Deno.test( | |
"date array", | ||
testClient(async (client) => { | ||
await client.queryArray(`SET SESSION TIMEZONE TO '${timezone}'`); | ||
const dates = ["2020-01-01", formatDate(new Date(), "yyyy-MM-dd")]; | ||
const dates = ["2020-01-01", (new Date()).toISOString().split("T")[0]]; | ||
|
||
const { rows: result } = await client.queryArray<[[Date, Date]]>( | ||
"SELECT ARRAY[$1::DATE, $2]", | ||
|
@@ -952,7 +951,7 @@ Deno.test( | |
|
||
assertEquals( | ||
result[0][0], | ||
dates.map((d) => parseDate(d, "yyyy-MM-dd")), | ||
dates.map((d) => new Date(d)), | ||
); | ||
}), | ||
); | ||
|
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ import { | |
decodePoint, | ||
decodeTid, | ||
} from "../query/decoders.ts"; | ||
import { assertEquals, assertThrows } from "./test_deps.ts"; | ||
import { assertEquals, assertThrows } from "jsr:@std/[email protected]"; | ||
import { Oid } from "../query/oid.ts"; | ||
|
||
Deno.test("decodeBigint", function () { | ||
|
Oops, something went wrong.