@joystick.js/node-canary 0.0.0-canary.83 → 0.0.0-canary.84

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.
@@ -23,9 +23,10 @@ var postgresql_default = async (settings = {}, databasePort = 2610) => {
23
23
  });
24
24
  return {
25
25
  pool,
26
- query: (...args) => {
27
- return pool.query(...args).then((response) => {
28
- return response?.rows || [];
26
+ query: async (...args) => {
27
+ const client = await pool.connect();
28
+ const response = await client.query(...args).then((response2) => {
29
+ return response2?.rows || [];
29
30
  }).catch((error) => {
30
31
  console.log(chalk.redBright(`
31
32
  Failed SQL Statement:
@@ -39,6 +40,8 @@ Failed Values:
39
40
  console.log(args[1]);
40
41
  throw error;
41
42
  });
43
+ client.release();
44
+ return response;
42
45
  }
43
46
  };
44
47
  } catch (exception) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joystick.js/node-canary",
3
- "version": "0.0.0-canary.83",
3
+ "version": "0.0.0-canary.84",
4
4
  "type": "module",
5
5
  "description": "A Node.js framework for building web apps.",
6
6
  "main": "./dist/index.js",