@ttoss/lambda-postgres-query 1.1.1 → 1.1.3
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.
- package/README.md +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -234,7 +234,7 @@ DATABASE_PORT=5432
|
|
|
234
234
|
|
|
235
235
|
### Query from a Consumer Lambda
|
|
236
236
|
|
|
237
|
-
Use the CloudFormation output value to configure the consumer. For example, set `
|
|
237
|
+
Use the CloudFormation output value to configure the consumer. For example, set `LAMBDA_POSTGRES_QUERY_FUNCTION` to the `LambdaPostgresReadQueryFunction` output for read traffic:
|
|
238
238
|
|
|
239
239
|
```typescript
|
|
240
240
|
import { query } from '@ttoss/lambda-postgres-query';
|
|
@@ -347,7 +347,7 @@ Accepts either a SQL string or an options object extending [`QueryConfig`](https
|
|
|
347
347
|
|
|
348
348
|
- `text` (string): SQL query text
|
|
349
349
|
- `values` (array, optional): Query parameter values
|
|
350
|
-
- `functionName` (string, optional): Physical query Lambda name or ARN. Default: `process.env.
|
|
350
|
+
- `functionName` (string, optional): Physical query Lambda name or ARN. Default: `process.env.LAMBDA_POSTGRES_QUERY_FUNCTION`
|
|
351
351
|
- `camelCaseKeys` (boolean, optional): Convert snake_case column names to camelCase. Default: `true`
|
|
352
352
|
|
|
353
353
|
#### Returns
|
package/dist/esm/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var query = /* @__PURE__ */__name(async params => {
|
|
|
16
16
|
text: params
|
|
17
17
|
} : params;
|
|
18
18
|
const input = {
|
|
19
|
-
FunctionName: functionName || process.env.
|
|
19
|
+
FunctionName: functionName || process.env.LAMBDA_POSTGRES_QUERY_FUNCTION,
|
|
20
20
|
Payload: JSON.stringify({
|
|
21
21
|
...pgParams
|
|
22
22
|
})
|
package/dist/index.js
CHANGED
|
@@ -61,7 +61,7 @@ var query = /* @__PURE__ */__name(async params => {
|
|
|
61
61
|
text: params
|
|
62
62
|
} : params;
|
|
63
63
|
const input = {
|
|
64
|
-
FunctionName: functionName || process.env.
|
|
64
|
+
FunctionName: functionName || process.env.LAMBDA_POSTGRES_QUERY_FUNCTION,
|
|
65
65
|
Payload: JSON.stringify({
|
|
66
66
|
...pgParams
|
|
67
67
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/lambda-postgres-query",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Create a Lambda function that queries a PostgreSQL database.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@aws-sdk/client-lambda": "^3.1025.0",
|
|
38
38
|
"camelcase-keys": "^7.0.2",
|
|
39
39
|
"pg": "^8.20.0",
|
|
40
|
-
"@ttoss/cloudformation": "^0.13.
|
|
40
|
+
"@ttoss/cloudformation": "^0.13.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/jest": "^30.0.0",
|