triangle-utils 1.4.172 → 1.4.173

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.
@@ -124,7 +124,7 @@ export class UtilsRDS {
124
124
  const attribute_names = Array.from(new Set(primary_keys.map(primary_key => Object.keys(primary_key)).flat())).sort();
125
125
  const items = [];
126
126
  for (let i = 0; i < primary_keys.length; i += batch_num_items) {
127
- const sql = "SELECT " + (options.attribute_names === undefined ? "*" : options.attribute_names.join(", ")) + " FROM " + table_id + " WHERE " + "(" + attribute_names.join(", ") + ")" + " IN " + "(" + primary_keys.map(primary_key => "(" + attribute_names.map(attribute_name => convert_postgres_input(primary_key[attribute_name])).join(", ") + ")").join(", ") + ")";
127
+ const sql = "SELECT " + (options.attribute_names === undefined ? "*" : options.attribute_names.join(", ")) + " FROM " + table_id + " WHERE " + "(" + attribute_names.join(", ") + ")" + " IN " + "(" + primary_keys.slice(i, i + batch_num_items).map(primary_key => "(" + attribute_names.map(attribute_name => convert_postgres_input(primary_key[attribute_name])).join(", ") + ")").join(", ") + ")";
128
128
  const new_items = await this.exec(sql, options);
129
129
  items.push(...new_items);
130
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-utils",
3
- "version": "1.4.172",
3
+ "version": "1.4.173",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
package/src/UtilsRDS.ts CHANGED
@@ -174,7 +174,7 @@ export class UtilsRDS {
174
174
  const attribute_names = Array.from(new Set(primary_keys.map(primary_key => Object.keys(primary_key)).flat())).sort()
175
175
  const items = []
176
176
  for (let i = 0; i < primary_keys.length; i += batch_num_items) {
177
- const sql = "SELECT " + (options.attribute_names === undefined ? "*" : options.attribute_names.join(", ")) + " FROM " + table_id + " WHERE " + "(" + attribute_names.join(", ") + ")" + " IN " + "(" + primary_keys.map(primary_key => "(" + attribute_names.map(attribute_name => convert_postgres_input(primary_key[attribute_name])).join(", ") + ")" ).join(", ") + ")"
177
+ const sql = "SELECT " + (options.attribute_names === undefined ? "*" : options.attribute_names.join(", ")) + " FROM " + table_id + " WHERE " + "(" + attribute_names.join(", ") + ")" + " IN " + "(" + primary_keys.slice(i, i + batch_num_items).map(primary_key => "(" + attribute_names.map(attribute_name => convert_postgres_input(primary_key[attribute_name])).join(", ") + ")" ).join(", ") + ")"
178
178
  const new_items = await this.exec(sql, options)
179
179
  items.push(...new_items)
180
180
  }