diff --git a/README.md b/README.md index e480c2e..aeb6382 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # deno-postgres -![Build Status](https://img.shields.io/github/workflow/status/denodrivers/postgres/ci?label=Build&logo=github&style=flat-square) +![Build Status](https://img.shields.io/github/actions/workflow/status/denodrivers/postgres/ci.yml?branch=main&label=Build&logo=github&style=flat-square) [![Discord server](https://img.shields.io/discord/768918486575480863?color=blue&label=Ask%20for%20help%20here&logo=discord&style=flat-square)](https://discord.gg/HEdTCvZUSf) [![Manual](https://img.shields.io/github/v/release/denodrivers/postgres?color=orange&label=Manual&logo=deno&style=flat-square)](https://deno-postgres.com) [![Documentation](https://img.shields.io/github/v/release/denodrivers/postgres?color=yellow&label=Documentation&logo=deno&style=flat-square)](https://doc.deno.land/https/deno.land/x/postgres/mod.ts) @@ -86,8 +86,8 @@ result assertions. To run the tests, run the following commands: -1. `docker-compose build tests` -2. `docker-compose run tests` +1. `docker compose build tests` +2. `docker compose run tests` The build step will check linting and formatting as well and report it to the command line diff --git a/connection/connection.ts b/connection/connection.ts index 5dd5339..a43ab1c 100644 --- a/connection/connection.ts +++ b/connection/connection.ts @@ -362,6 +362,8 @@ export class Connection { // https://www.postgresql.org/docs/14/protocol-flow.html#id-1.10.5.7.11 if (accepts_tls) { try { + // TODO: handle connection type without castinggaa + // https://github.com/denoland/deno/issues/10200 await this.#openTlsConnection(this.#conn as Deno.TcpConn, { hostname, caCerts: caCertificates, @@ -401,7 +403,8 @@ export class Connection { if (e instanceof Deno.errors.InvalidData && tls_enabled) { if (tls_enforced) { throw new Error( - "The certificate used to secure the TLS connection is invalid.", + "The certificate used to secure the TLS connection is invalid: " + + e.message, ); } else { console.error( diff --git a/docker-compose.yml b/docker-compose.yml index bab1310..4981d43 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.8' - x-database-env: &database-env POSTGRES_DB: "postgres" diff --git a/query/query.ts b/query/query.ts index ba02a5d..fa4eae8 100644 --- a/query/query.ts +++ b/query/query.ts @@ -38,7 +38,8 @@ export type CommandType = | "SELECT" | "MOVE" | "FETCH" - | "COPY"; + | "COPY" + | "CREATE"; /** Type of a query result */ export enum ResultType { diff --git a/tests/README.md b/tests/README.md index c8c3e4e..38cc8c4 100644 --- a/tests/README.md +++ b/tests/README.md @@ -16,8 +16,8 @@ From within the project directory, run: deno test --allow-read --allow-net --allow-env # run in docker container -docker-compose build --no-cache -docker-compose run tests +docker compose build --no-cache +docker compose run tests ``` ## Docker Configuration