@travetto/model-postgres 5.0.17 → 5.0.18

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 ArcSine Technologies
3
+ Copyright (c) 2020 ArcSine Technologies
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-postgres",
3
- "version": "5.0.17",
3
+ "version": "5.0.18",
4
4
  "description": "PostgreSQL backing for the travetto model module, with real-time modeling support for SQL schemas.",
5
5
  "keywords": [
6
6
  "sql",
@@ -27,12 +27,12 @@
27
27
  "directory": "module/model-postgres"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/cli": "^5.0.16",
31
- "@travetto/config": "^5.0.13",
32
- "@travetto/context": "^5.0.13",
33
- "@travetto/model": "^5.0.14",
34
- "@travetto/model-query": "^5.0.14",
35
- "@travetto/model-sql": "^5.0.17",
30
+ "@travetto/cli": "^5.0.17",
31
+ "@travetto/config": "^5.0.14",
32
+ "@travetto/context": "^5.0.14",
33
+ "@travetto/model": "^5.0.15",
34
+ "@travetto/model-query": "^5.0.15",
35
+ "@travetto/model-sql": "^5.0.18",
36
36
  "@types/pg": "^8.11.10",
37
37
  "pg": "^8.13.1"
38
38
  },
package/src/connection.ts CHANGED
@@ -49,10 +49,10 @@ export class PostgreSQLConnection extends Connection<PoolClient> {
49
49
  ShutdownManager.onGracefulShutdown(() => this.#pool.end(), this);
50
50
  }
51
51
 
52
- async execute<T = unknown>(conn: PoolClient, query: string): Promise<{ count: number, records: T[] }> {
52
+ async execute<T = unknown>(conn: PoolClient, query: string, values?: unknown[]): Promise<{ count: number, records: T[] }> {
53
53
  console.debug('Executing query', { query });
54
54
  try {
55
- const out = await conn.query(query);
55
+ const out = await conn.query(query, values);
56
56
  const records: T[] = [...out.rows].map(v => ({ ...v }));
57
57
  return { count: out.rowCount!, records };
58
58
  } catch (err) {
@@ -1,6 +1,6 @@
1
1
  import type { ServiceDescriptor } from '@travetto/cli';
2
2
 
3
- const version = process.env.POSTGRESQL_VERSION || '15.4';
3
+ const version = process.env.POSTGRESQL_VERSION || '17.2';
4
4
 
5
5
  export const service: ServiceDescriptor = {
6
6
  name: 'postgresql',