triangle-utils 1.4.71 → 1.4.72

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.
@@ -197,8 +197,7 @@ export class UtilsDynamoDB {
197
197
  const compile = options.compile !== undefined ? options.compile : true;
198
198
  // const project = options.project !== undefined ? options.project : false
199
199
  const attribute_names = options.attribute_names !== undefined ? options.attribute_names : [];
200
- if (index_name === undefined && Object.keys(primary_key).length !== 1 ||
201
- index_name !== undefined && Object.keys(primary_key).length !== index_name.split(".")[0].split("-").length) {
200
+ if (index_name === undefined && Object.keys(primary_key).length !== 1) {
202
201
  return [];
203
202
  }
204
203
  const projection_expression = attribute_names.map(attribute_name => "#" + attribute_name).join(", ");
@@ -251,8 +250,7 @@ export class UtilsDynamoDB {
251
250
  const undefined_attribute_names = options.undefined_attribute_names !== undefined ? options.undefined_attribute_names : [];
252
251
  const defined_attribute_names = options.defined_attribute_names !== undefined ? options.defined_attribute_names : [];
253
252
  const attribute_names = options.attribute_names !== undefined ? options.attribute_names : [];
254
- if (index_name === undefined && Object.keys(primary_key).length !== 1 ||
255
- index_name !== undefined && Object.keys(primary_key).length !== index_name.split(".")[0].split("-").length) {
253
+ if (index_name === undefined && Object.keys(primary_key).length !== 1) {
256
254
  return [];
257
255
  }
258
256
  const projection_expression = attribute_names.map(attribute_name => "#" + attribute_name).join(", ");
@@ -312,8 +310,7 @@ export class UtilsDynamoDB {
312
310
  const undefined_attribute_names = options.undefined_attribute_names !== undefined ? options.undefined_attribute_names : [];
313
311
  const defined_attribute_names = options.defined_attribute_names !== undefined ? options.defined_attribute_names : [];
314
312
  const attribute_names = options.attribute_names !== undefined ? options.attribute_names : [];
315
- if (index_name === undefined && Object.keys(primary_key).length !== 1 ||
316
- index_name !== undefined && Object.keys(primary_key).length !== index_name.split(".")[0].split("-").length) {
313
+ if (index_name === undefined && Object.keys(primary_key).length !== 1) {
317
314
  return [];
318
315
  }
319
316
  const projection_expression = attribute_names.map(attribute_name => "#" + attribute_name).join(", ");
package/dist/src/f.js CHANGED
@@ -211,8 +211,10 @@ const utils = new TriangleUtils(config);
211
211
  // ]
212
212
  // })
213
213
  // console.log(JSON.stringify(tweet, undefined, 4))
214
- const results = await utils.twitter.get_tweets("1603470469608374272", {
215
- compile: true,
216
- min_twitter_tweet_id: "2061610563679985813"
217
- });
218
- console.log(results);
214
+ // const results = await utils.twitter.get_tweets("1603470469608374272", {
215
+ // compile : true,
216
+ // min_twitter_tweet_id : "2061610563679985813"
217
+ // })
218
+ // console.log(results)
219
+ const f = await utils.dynamodb.query_range("federal_election_donations:donor_address_state_id.federal_election_committee_id-receipt_date-federal_election_donation_id", { donor_address_state_id: "NH", federal_election_committee_id: "C00694323" }, { receipt_date: ["2021", "2023"] }, { compile: false });
220
+ console.log(f);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-utils",
3
- "version": "1.4.71",
3
+ "version": "1.4.72",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -244,8 +244,7 @@ export class UtilsDynamoDB {
244
244
  // const project = options.project !== undefined ? options.project : false
245
245
  const attribute_names : string[] = options.attribute_names !== undefined ? options.attribute_names : []
246
246
 
247
- if (index_name === undefined && Object.keys(primary_key).length !== 1 ||
248
- index_name !== undefined && Object.keys(primary_key).length !== index_name.split(".")[0].split("-").length
247
+ if (index_name === undefined && Object.keys(primary_key).length !== 1
249
248
  ) {
250
249
  return []
251
250
  }
@@ -314,8 +313,7 @@ export class UtilsDynamoDB {
314
313
  const defined_attribute_names : string[] = options.defined_attribute_names !== undefined ? options.defined_attribute_names : []
315
314
  const attribute_names : string[] = options.attribute_names !== undefined ? options.attribute_names : []
316
315
 
317
- if (index_name === undefined && Object.keys(primary_key).length !== 1 ||
318
- index_name !== undefined && Object.keys(primary_key).length !== index_name.split(".")[0].split("-").length
316
+ if (index_name === undefined && Object.keys(primary_key).length !== 1
319
317
  ) {
320
318
  return []
321
319
  }
@@ -391,8 +389,7 @@ export class UtilsDynamoDB {
391
389
  const defined_attribute_names : string[] = options.defined_attribute_names !== undefined ? options.defined_attribute_names : []
392
390
  const attribute_names : string[] = options.attribute_names !== undefined ? options.attribute_names : []
393
391
 
394
- if (index_name === undefined && Object.keys(primary_key).length !== 1 ||
395
- index_name !== undefined && Object.keys(primary_key).length !== index_name.split(".")[0].split("-").length
392
+ if (index_name === undefined && Object.keys(primary_key).length !== 1
396
393
  ) {
397
394
  return []
398
395
  }
package/src/f.ts CHANGED
@@ -243,9 +243,13 @@ const utils = new TriangleUtils(config)
243
243
 
244
244
  // console.log(JSON.stringify(tweet, undefined, 4))
245
245
 
246
- const results = await utils.twitter.get_tweets("1603470469608374272", {
247
- compile : true,
248
- min_twitter_tweet_id : "2061610563679985813"
249
- })
246
+ // const results = await utils.twitter.get_tweets("1603470469608374272", {
247
+ // compile : true,
248
+ // min_twitter_tweet_id : "2061610563679985813"
249
+ // })
250
+
251
+ // console.log(results)
252
+
253
+ const f = await utils.dynamodb.query_range("federal_election_donations:donor_address_state_id.federal_election_committee_id-receipt_date-federal_election_donation_id", { donor_address_state_id : "NH", federal_election_committee_id : "C00694323" }, { receipt_date : ["2021", "2023"] }, { compile : false })
250
254
 
251
- console.log(results)
255
+ console.log(f)
package/f.txt DELETED
Binary file