uranio 1.1.2 → 1.1.4

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.
@@ -28,6 +28,6 @@
28
28
  "mongodb": "^7.1.0",
29
29
  "mysql2": "^3.17.5",
30
30
  "pg": "^8.18.0",
31
- "uranio": "1.1.2"
31
+ "uranio": "1.1.4"
32
32
  }
33
33
  }
@@ -94,11 +94,9 @@ export class PostgreSQLClient {
94
94
 
95
95
  // Replace each :paramName with $1, $2, etc.
96
96
  for (const key of sortedKeys) {
97
- const namedParam = `:${key}`;
98
- // Replace all occurrences of this named parameter
99
- while (convertedQuery.includes(namedParam)) {
100
- convertedQuery = convertedQuery.replace(namedParam, `$${paramIndex}`);
101
- }
97
+ // Replace ALL occurrences of this named parameter with the SAME positional parameter
98
+ const regex = new RegExp(`:${key}\\b`, 'g');
99
+ convertedQuery = convertedQuery.replace(regex, `$${paramIndex}`);
102
100
  paramValues.push(namedParams[key]);
103
101
  paramIndex++;
104
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uranio",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Uranio is a type-safe ODM for MongoDB",
5
5
  "main": "dist/index.js",
6
6
  "repository": {