pgsql-client 2.1.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client.d.ts CHANGED
@@ -21,6 +21,11 @@ export declare class PgClient {
21
21
  rollback(name?: string): Promise<void>;
22
22
  commit(): Promise<void>;
23
23
  setContext(ctx: Record<string, string | null>): void;
24
+ /**
25
+ * Get the current context settings for the session.
26
+ * Returns a copy of the internal context settings object.
27
+ */
28
+ getContext(): Record<string, string | null>;
24
29
  /**
25
30
  * Set authentication context for the current session.
26
31
  * Configures role and user ID using cascading defaults from options -> opts.auth -> RoleMapping.
package/client.js CHANGED
@@ -59,6 +59,13 @@ class PgClient {
59
59
  Object.assign(this.contextSettings, ctx);
60
60
  this.ctxStmts = (0, context_utils_1.generateContextStatements)(this.contextSettings);
61
61
  }
62
+ /**
63
+ * Get the current context settings for the session.
64
+ * Returns a copy of the internal context settings object.
65
+ */
66
+ getContext() {
67
+ return { ...this.contextSettings };
68
+ }
62
69
  /**
63
70
  * Set authentication context for the current session.
64
71
  * Configures role and user ID using cascading defaults from options -> opts.auth -> RoleMapping.
package/esm/client.js CHANGED
@@ -56,6 +56,13 @@ export class PgClient {
56
56
  Object.assign(this.contextSettings, ctx);
57
57
  this.ctxStmts = generateContextStatements(this.contextSettings);
58
58
  }
59
+ /**
60
+ * Get the current context settings for the session.
61
+ * Returns a copy of the internal context settings object.
62
+ */
63
+ getContext() {
64
+ return { ...this.contextSettings };
65
+ }
59
66
  /**
60
67
  * Set authentication context for the current session.
61
68
  * Configures role and user ID using cascading defaults from options -> opts.auth -> RoleMapping.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgsql-client",
3
- "version": "2.1.1",
3
+ "version": "3.0.0",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "PostgreSQL client utilities with query helpers, RLS context management, and database administration",
6
6
  "main": "index.js",
@@ -45,11 +45,11 @@
45
45
  "makage": "^0.1.12"
46
46
  },
47
47
  "dependencies": {
48
- "@pgpmjs/core": "^5.2.1",
48
+ "@pgpmjs/core": "^6.0.0",
49
49
  "@pgpmjs/logger": "^2.1.0",
50
50
  "@pgpmjs/types": "^2.16.0",
51
51
  "pg": "^8.17.1",
52
52
  "pg-env": "^1.4.0"
53
53
  },
54
- "gitHead": "49049ad3ddd762d35625f657cb42fa0862b829a0"
54
+ "gitHead": "b2daeefe49cdefb3d01ea63cf778fb9b847ab5fe"
55
55
  }