Skip to content

Commit 392efb3

Browse files
committed
Release 6.0.1
1 parent 966bbf8 commit 392efb3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+23434
-2203
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
# node-oracledb-prebuilt-for-lambda
22

33
- This module is forked from the currently un-maintained [node-oracledb-for-lambda](https://github.com/nalbion/node-oracledb-for-lambda).
4-
- Core oracledb libraries are derived from [node-oracledb](https://github.com/oracle/node-oracledb) v5.5.0
5-
- 5.5.0: Prebuilt for use with AWS Lambda nodejs14.x Runtime (Built using nodejsv14.20.0 (LTS))
6-
- Also tested to work with AWS Lambda nodejs12.x and nodejs16.x Runtime
4+
- Core oracledb libraries are derived from [node-oracledb](https://github.com/oracle/node-oracledb) v6.0.1
5+
- 6.0.1: Prebuilt for use with AWS Lambda nodejs16.x Runtime
6+
- Also tested to work with AWS Lambda nodejs14.x and nodejs18.x Runtime
77

88
The scripts to reproduce the build process can be found at [node-oracledb-lambda-test](https://github.com/romanbalayan/node-oracledb-lambda-test).
99

1010
# Usage
1111

1212
```bash
13-
npm install --save oracledb-prebuilt-for-lambda@5.5.0
13+
npm install --save oracledb-prebuilt-for-lambda@6.0.1
1414
```
1515

1616
# Versioning
1717
- Changed release version to match that of underlying node-oracledb version.
18-
- i.e. for release based on oracledb 5.5.0, release will be oracledb-prebuilt-for-lambda@5.5.0
18+
- i.e. for release based on oracledb 6.0.1, release will be oracledb-prebuilt-for-lambda@6.0.1
1919

2020

2121
# Releases
2222
| node-oracledb | oracledb-prebuilt-for-lambda |
2323
| ------------------- | ---------- |
24+
| 6.0.1 | 6.0.1 |
2425
| 5.5.0 | 5.5.0 |
2526
| 5.4.0 | 5.4.0 |
2627
| 5.3.0 | 5.3.0 |
@@ -33,6 +34,7 @@ npm install --save oracledb-prebuilt-for-lambda@5.5.0
3334

3435

3536
# Changelog
37+
- v6.0.1: [node-oracledb v6.0.1 changelog](https://node-oracledb.readthedocs.io/en/latest/release_notes.html#node-oracledb-v6-0-1-07-jun-2023)
3638
- v5.5.0: [node-oracledb v5.5.0 changelog](https://github.com/oracle/node-oracledb/blob/main/CHANGELOG.md#node-oracledb-v550-7-sep-2022)
3739
- v5.4.0: [node-oracledb v5.4.0 changelog](https://github.com/oracle/node-oracledb/blob/main/CHANGELOG.md#node-oracledb-v540-9-jun-2022)
3840
- v5.3.0: [node-oracledb v5.3.0 changelog](https://github.com/oracle/node-oracledb/blob/main/CHANGELOG.md#node-oracledb-v530-22-oct-2021)
@@ -51,14 +53,15 @@ npm install --save oracledb-prebuilt-for-lambda@5.5.0
5153

5254
| Name | Identifier | Operating System |
5355
| ------------- | ---------- | ----------------- |
56+
| Node.js 18 | nodejs18.x | AWS Linux 2 |
5457
| Node.js 16 | nodejs16.x | AWS Linux 2 |
5558
| Node.js 14 | nodejs14.x | AWS Linux 2 |
56-
| Node.js 12 | nodejs12.x | AWS Linux 2 |
5759

5860
# AWS Lambda Runtime Deprecation Policy
5961

6062
| Name | Identifier | Operating System | Deprecation Phase 1 | Deprecation Phase 2 |
6163
| ------------- | ---------- | ----------------- | ------------------- | ------------------- |
64+
| Node.js 12 | nodejs12.x | AWS Linux 2 | Mar 21, 2023 | Apr 30, 2023 |
6265
| Node.js 10 | nodejs10.x | AWS Linux 2 | July 30, 2021 | Feb 14, 2022 |
6366
| Node.js 8.10 | nodejs8.10 | AWS Linux | N/A | March 6, 2020 |
6467

build/Release/oracledb.node

-31 KB
Binary file not shown.

lib/aqDeqOptions.js

Lines changed: 148 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,167 @@
1-
// Copyright (c) 2019, 2022, Oracle and/or its affiliates.
1+
// Copyright (c) 2019, 2023, Oracle and/or its affiliates.
22

33
//-----------------------------------------------------------------------------
44
//
5-
// You may not use the identified files except in compliance with the Apache
6-
// License, Version 2.0 (the "License.")
5+
// This software is dual-licensed to you under the Universal Permissive License
6+
// (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
7+
// 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
8+
// either license.
79
//
10+
// If you elect to accept the software under the Apache License, Version 2.0,
11+
// the following applies:
12+
//
13+
// Licensed under the Apache License, Version 2.0 (the "License");
14+
// you may not use this file except in compliance with the License.
815
// You may obtain a copy of the License at
9-
// http://www.apache.org/licenses/LICENSE-2.0.
1016
//
11-
// Unless required by applicable law or agreed to in writing, software
12-
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13-
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// https://www.apache.org/licenses/LICENSE-2.0
1418
//
19+
// Unless required by applicable law or agreed to in writing, software
20+
// distributed under the License is distributed on an "AS IS" BASIS,
21+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1522
// See the License for the specific language governing permissions and
1623
// limitations under the License.
1724
//
1825
//-----------------------------------------------------------------------------
1926

2027
'use strict';
2128

29+
const { Buffer } = require('buffer');
30+
const constants = require('./constants.js');
31+
const errors = require('./errors.js');
32+
2233
class AqDeqOptions {
2334

24-
_extend(oracledb) { //eslint-disable-line
35+
//---------------------------------------------------------------------------
36+
// condition
37+
//
38+
// Property for the condition to use for dequeuing messages.
39+
//---------------------------------------------------------------------------
40+
get condition() {
41+
return this._impl.getCondition();
42+
}
43+
44+
set condition(value) {
45+
errors.assertPropValue(typeof value === 'string', "condition");
46+
this._impl.setCondition(value);
47+
}
48+
49+
//---------------------------------------------------------------------------
50+
// consumerName
51+
//
52+
// Property for the consumer name to use for dequeuing messages.
53+
//---------------------------------------------------------------------------
54+
get consumerName() {
55+
return this._impl.getConsumerName();
56+
}
57+
58+
set consumerName(value) {
59+
errors.assertPropValue(typeof value === 'string', "consumerName");
60+
this._impl.setConsumerName(value);
61+
}
62+
63+
//---------------------------------------------------------------------------
64+
// correlation
65+
//
66+
// Property for the correlation to use for dequeuing messages.
67+
//---------------------------------------------------------------------------
68+
get correlation() {
69+
return this._impl.getCorrelation();
70+
}
71+
72+
set correlation(value) {
73+
errors.assertPropValue(typeof value === 'string', "correlation");
74+
this._impl.setCorrelation(value);
75+
}
76+
77+
//---------------------------------------------------------------------------
78+
// mode
79+
//
80+
// Property for the mode to use for dequeuing messages.
81+
//---------------------------------------------------------------------------
82+
get mode() {
83+
return this._impl.getMode();
84+
}
85+
86+
set mode(value) {
87+
errors.assertPropValue(value === constants.AQ_DEQ_MODE_BROWSE ||
88+
value === constants.AQ_DEQ_MODE_LOCKED ||
89+
value === constants.AQ_DEQ_MODE_REMOVE ||
90+
value === constants.AQ_DEQ_MODE_REMOVE_NO_DATA, "mode");
91+
this._impl.setMode(value);
92+
}
93+
94+
//---------------------------------------------------------------------------
95+
// msgId
96+
//
97+
// Property for the message id to use for dequeuing messages.
98+
//---------------------------------------------------------------------------
99+
get msgId() {
100+
return this._impl.getMsgId();
101+
}
102+
103+
set msgId(value) {
104+
errors.assertPropValue(Buffer.isBuffer(value), "msgId");
105+
this._impl.setMsgId(value);
106+
}
107+
108+
//---------------------------------------------------------------------------
109+
// navigation
110+
//
111+
// Property for the navigation to use for dequeuing messages.
112+
//---------------------------------------------------------------------------
113+
get navigation() {
114+
return this._impl.getNavigation();
115+
}
116+
117+
set navigation(value) {
118+
errors.assertPropValue(value === constants.AQ_DEQ_NAV_FIRST_MSG ||
119+
value === constants.AQ_DEQ_NAV_NEXT_TRANSACTION ||
120+
value === constants.AQ_DEQ_NAV_NEXT_MSG, "navigation");
121+
this._impl.setNavigation(value);
122+
}
123+
124+
//---------------------------------------------------------------------------
125+
// transformation
126+
//
127+
// Property for the transformation to use for dequeuing messages.
128+
//---------------------------------------------------------------------------
129+
get transformation() {
130+
return this._impl.getTransformation();
131+
}
132+
133+
set transformation(value) {
134+
errors.assertPropValue(typeof value === 'string', "transformation");
135+
this._impl.setTransformation(value);
136+
}
137+
138+
//---------------------------------------------------------------------------
139+
// visibility
140+
//
141+
// Property for the visibility to use for dequeuing messages.
142+
//---------------------------------------------------------------------------
143+
get visibility() {
144+
return this._impl.getVisibility();
145+
}
146+
147+
set visibility(value) {
148+
errors.assertPropValue(value === constants.AQ_VISIBILITY_IMMEDIATE ||
149+
value === constants.AQ_VISIBILITY_ON_COMMIT, "visibility");
150+
this._impl.setVisibility(value);
151+
}
152+
153+
//---------------------------------------------------------------------------
154+
// wait
155+
//
156+
// Property for the time to wait for dequeuing messages.
157+
//---------------------------------------------------------------------------
158+
get wait() {
159+
return this._impl.getWait();
160+
}
161+
162+
set wait(value) {
163+
errors.assertPropValue(Number.isInteger(value) && value >= 0, "wait");
164+
this._impl.setWait(value);
25165
}
26166

27167
}

lib/aqEnqOptions.js

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,78 @@
22

33
//-----------------------------------------------------------------------------
44
//
5-
// You may not use the identified files except in compliance with the Apache
6-
// License, Version 2.0 (the "License.")
5+
// This software is dual-licensed to you under the Universal Permissive License
6+
// (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
7+
// 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
8+
// either license.
79
//
10+
// If you elect to accept the software under the Apache License, Version 2.0,
11+
// the following applies:
12+
//
13+
// Licensed under the Apache License, Version 2.0 (the "License");
14+
// you may not use this file except in compliance with the License.
815
// You may obtain a copy of the License at
9-
// http://www.apache.org/licenses/LICENSE-2.0.
1016
//
11-
// Unless required by applicable law or agreed to in writing, software
12-
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13-
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// https://www.apache.org/licenses/LICENSE-2.0
1418
//
19+
// Unless required by applicable law or agreed to in writing, software
20+
// distributed under the License is distributed on an "AS IS" BASIS,
21+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1522
// See the License for the specific language governing permissions and
1623
// limitations under the License.
1724
//
1825
//-----------------------------------------------------------------------------
1926

2027
'use strict';
2128

29+
const constants = require('./constants.js');
30+
const errors = require('./errors.js');
31+
2232
class AqEnqOptions {
2333

24-
_extend(oracledb) { //eslint-disable-line
34+
//---------------------------------------------------------------------------
35+
// deliveryMode
36+
//
37+
// Property for the delivery mode to use for enqueuing messages.
38+
//---------------------------------------------------------------------------
39+
get deliveryMode() {
40+
return this._impl.getDeliveryMode();
41+
}
42+
43+
set deliveryMode(value) {
44+
errors.assertPropValue(value === constants.AQ_MSG_DELIV_MODE_PERSISTENT ||
45+
value === constants.AQ_MSG_DELIV_MODE_BUFFERED ||
46+
value === constants.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED, "deliveryMode");
47+
this._impl.setDeliveryMode(value);
48+
}
49+
50+
//---------------------------------------------------------------------------
51+
// transformation
52+
//
53+
// Property for the transformation to use for enqueuing messages.
54+
//---------------------------------------------------------------------------
55+
get transformation() {
56+
return this._impl.getTransformation();
57+
}
58+
59+
set transformation(value) {
60+
errors.assertPropValue(typeof value === 'string', "transformation");
61+
this._impl.setTransformation(value);
62+
}
63+
64+
//---------------------------------------------------------------------------
65+
// visibility
66+
//
67+
// Property for the visibility to use for enqueuing messages.
68+
//---------------------------------------------------------------------------
69+
get visibility() {
70+
return this._impl.getVisibility();
71+
}
72+
73+
set visibility(value) {
74+
errors.assertPropValue(value === constants.AQ_VISIBILITY_IMMEDIATE ||
75+
value === constants.AQ_VISIBILITY_ON_COMMIT, "visibility");
76+
this._impl.setVisibility(value);
2577
}
2678

2779
}

0 commit comments

Comments
 (0)