Skip to content

Commit a65a649

Browse files
committed
Improve example
1 parent 3ba12f4 commit a65a649

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

doc/api.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13915,6 +13915,13 @@ an [`options`](#consubscribeoptions) object that controls notification. In
1391513915
particular `options` contains a valid SQL query and a JavaScript callback:
1391613916

1391713917
```javascript
13918+
const connection = await oracledb.getConnection({
13919+
user : "hr",
13920+
password : mypw, // mypw contains the hr schema password
13921+
connectString : "localhost/XEPDB1",
13922+
events : true
13923+
});
13924+
1391813925
function myCallback(message) {
1391913926
console.log(message);
1392013927
}
@@ -14041,7 +14048,7 @@ try {
1404114048
user : "hr",
1404214049
password : mypw, // mypw contains the hr schema password
1404314050
connectString : "localhost/XEPDB1",
14044-
events : true
14051+
events : true
1404514052
});
1404614053

1404714054
await connection.subscribe('mysub', options);

0 commit comments

Comments
 (0)