Skip to content

Commit cf1265c

Browse files
Use the non-deprecated function for subscribing to events in the database and
note that the subscription ID will always be zero and will be removed in cx_Oracle 7.
1 parent feab53c commit cf1265c

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

doc/src/subscription.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ Subscription Object
2323

2424
.. attribute:: Subscription.id
2525

26-
This read-only attribute returns the registration ID returned by the
27-
database when the subscription was created.
26+
This read-only attribute returns the value 0.
2827

2928
.. deprecated:: 6.0
30-
This attribute was never intended to be exposed.
29+
This attribute was never intended to be exposed and will be removed
30+
in cx_Oracle 7.
3131

3232

3333
.. attribute:: Subscription.ipAddress

src/cxoConnection.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,8 +1530,7 @@ static PyObject *cxoConnection_subscribe(cxoConnection *conn, PyObject* args,
15301530
}
15311531

15321532
// create ODPI-C subscription
1533-
if (dpiConn_newSubscription(conn->handle, &params, &subscr->handle,
1534-
&subscr->id) < 0) {
1533+
if (dpiConn_subscribe(conn->handle, &params, &subscr->handle) < 0) {
15351534
cxoError_raiseAndReturnNull();
15361535
cxoBuffer_clear(&ipAddressBuffer);
15371536
cxoBuffer_clear(&nameBuffer);

0 commit comments

Comments
 (0)