Skip to content

Commit 2bf5ae5

Browse files
committed
added ssl option to connection config
1 parent 4c7e1cd commit 2bf5ae5

File tree

10 files changed

+11
-2
lines changed

10 files changed

+11
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ where `options` should have the following form:
7676
connection: { // required connection settings
7777
host : string;
7878
port? : number; // optional, default 5432
79+
ssl? : boolean; // optional, defaults to false
7980
user : string;
8081
password : string;
8182
database : string;

bin/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ where `options` should have the following form:
7676
connection: { // required connection settings
7777
host : string;
7878
port? : number; // optional, default 5432
79+
ssl? : boolean; // optional, defaults to false
7980
user : string;
8081
password : string;
8182
database : string;

bin/lib/Database.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/lib/defaults.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pg-io",
3-
"version": "0.8.1",
3+
"version": "0.8.2",
44
"description": "Promise-based PostgreSQL client for node.js written in TypeScript",
55
"keywords": [
66
"pg",

bin/pg-io.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ declare module "pg-io" {
1616
export interface ConnectionSettings {
1717
host : string;
1818
port? : number;
19+
ssl? : boolean;
1920
user : string;
2021
password : string;
2122
database : string;

lib/Database.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface DatabaseOptions {
2323
export interface ConnectionSettings {
2424
host : string;
2525
port? : number;
26+
ssl? : boolean;
2627
user : string;
2728
password : string;
2829
database : string;
@@ -125,6 +126,7 @@ function buildPgPoolOptions(conn: ConnectionSettings, pool: PoolOptions): pg.Cli
125126
return {
126127
host : conn.host,
127128
port : conn.port,
129+
ssl : conn.ssl,
128130
user : conn.user,
129131
password : conn.password,
130132
database : conn.database,

lib/defaults.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const defaults: Defaults = {
2222
connection: {
2323
host : undefined,
2424
port : 5432,
25+
ssl : false,
2526
user : undefined,
2627
password : undefined,
2728
database : undefined,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pg-io",
3-
"version": "0.8.1",
3+
"version": "0.8.2",
44
"description": "Promise-based PostgreSQL client for node.js written in TypeScript",
55
"keywords": [
66
"pg",

pg-io.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ declare module "pg-io" {
1616
export interface ConnectionSettings {
1717
host : string;
1818
port? : number;
19+
ssl? : boolean;
1920
user : string;
2021
password : string;
2122
database : string;

0 commit comments

Comments
 (0)