triangle-utils 1.4.136 → 1.4.137

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.
@@ -30,6 +30,9 @@ function convert_rds_output(input) {
30
30
  else if (input.stringValue !== undefined) {
31
31
  return input.stringValue;
32
32
  }
33
+ else if (input.doubleValue !== undefined) {
34
+ return input.doubleValue;
35
+ }
33
36
  else if (input.longValue !== undefined) {
34
37
  return input.longValue;
35
38
  }
@@ -94,10 +97,10 @@ export class UtilsRDS {
94
97
  sql: sql,
95
98
  includeResultMetadata: true
96
99
  })
97
- // .then(response => {
98
- // console.log(response)
99
- // return response
100
- // })
100
+ .then(response => {
101
+ console.log(JSON.stringify(response, undefined, 4));
102
+ return response;
103
+ })
101
104
  .then(response => (response.records || [])
102
105
  .map((item) => Object.fromEntries((response.columnMetadata || [])
103
106
  .map((column, i) => [column.name || "", column.typeName === "numeric" ? Number(convert_rds_output(item[i])) : convert_rds_output(item[i])])
package/dist/src/f.js CHANGED
@@ -73,4 +73,5 @@ const utils = new TriangleUtils(config);
73
73
  // name : "2026 Election in North Dakota",
74
74
  // target_ids : ["TURNOUT-2026-11-03"]
75
75
  // }, { is_verbose : true }))
76
- // console.log(await utils.rds.exec("SELECT * FROM prisms", { is_verbose : true }))
76
+ // console.log(await utils.rds.exec("SELECT * FROM prisms", { is_verbose : true }))\
77
+ console.log(await utils.rds.exec("SELECT * FROM state_voter_targets WHERE state_id = 'ND' AND voter_id = '187195'"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-utils",
3
- "version": "1.4.136",
3
+ "version": "1.4.137",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
package/src/UtilsRDS.ts CHANGED
@@ -25,6 +25,8 @@ function convert_rds_output(input : Field) {
25
25
  return undefined
26
26
  } else if (input.stringValue !== undefined) {
27
27
  return input.stringValue
28
+ } else if (input.doubleValue !== undefined) {
29
+ return input.doubleValue
28
30
  } else if (input.longValue !== undefined) {
29
31
  return input.longValue
30
32
  } else if (input.booleanValue !== undefined) {
@@ -113,10 +115,10 @@ export class UtilsRDS {
113
115
  sql : sql,
114
116
  includeResultMetadata : true
115
117
  })
116
- // .then(response => {
117
- // console.log(response)
118
- // return response
119
- // })
118
+ .then(response => {
119
+ console.log(JSON.stringify(response, undefined, 4))
120
+ return response
121
+ })
120
122
  .then(response => (response.records || [])
121
123
  .map((item : any) => Object.fromEntries((response.columnMetadata || [])
122
124
  .map((column, i) => [column.name || "", column.typeName === "numeric" ? Number(convert_rds_output(item[i])) : convert_rds_output(item[i])])
package/src/f.ts CHANGED
@@ -91,4 +91,7 @@ const utils = new TriangleUtils(config)
91
91
  // target_ids : ["TURNOUT-2026-11-03"]
92
92
  // }, { is_verbose : true }))
93
93
 
94
- // console.log(await utils.rds.exec("SELECT * FROM prisms", { is_verbose : true }))
94
+ // console.log(await utils.rds.exec("SELECT * FROM prisms", { is_verbose : true }))\
95
+
96
+
97
+ console.log(await utils.rds.exec("SELECT * FROM state_voter_targets WHERE state_id = 'ND' AND voter_id = '187195'"))