@@ -19,14 +19,14 @@ what types of SQL should trigger a notification, whether notifications should
1919survive database loss, and control over unsubscription. You can also choose
2020whether notification messages will include ROWIDs of affected rows.
2121
22- By default, object-level (previously known as Database Change Notification)
23- occurs and the Python notification method is invoked whenever a database
24- transaction is committed that changes an object that a registered query
25- references, regardless of whether the actual query result changed . However if
26- the :meth: ` subscription <Connection.subscribe> ` option ``qos `` is
27- :data: ` cx_Oracle.SUBSCR_QOS_QUERY ` then query-level notification occurs. In
28- this mode, the database notifies the application whenever a transaction changing
29- the result of the registered query is committed .
22+ By default, object-level notification (previously known as Database Change
23+ Notification) occurs. With this mode a Python notification method is invoked
24+ whenever a database transaction is committed that changes an object referenced
25+ by a registered query. However if the :meth: ` subscription
26+ <Connection.subscribe> ` option ``qos `` is :data: ` cx_Oracle.SUBSCR_QOS_QUERY `
27+ then query-level notification occurs. In this mode, the database notifies the
28+ application whenever a committed transaction changes the result of a registered
29+ query.
3030
3131CQN is best used to track infrequent data changes.
3232
@@ -109,7 +109,7 @@ calling :meth:`Subscription.registerquery()`. Registering a query behaves
109109similarly to :meth: `Cursor.execute() `, but only queries are permitted and the
110110``args `` parameter must be a sequence or dictionary.
111111
112- An example script to receive query notifications when the 'CUSTOMER ' table data
112+ An example script to receive query notifications when the 'REGIONS ' table data
113113changes is:
114114
115115.. code-block :: python
@@ -129,6 +129,7 @@ changes is:
129129 subscr = connection.subscribe(callback = cqn_callback,
130130 operations = cx_Oracle.OPCODE_INSERT | cx_Oracle.OPCODE_DELETE ,
131131 qos = cx_Oracle.SUBSCR_QOS_QUERY | cx_Oracle.SUBSCR_QOS_ROWIDS )
132+
132133 subscr.registerquery(" select * from regions" )
133134 input (" Hit enter to stop CQN demo\n " )
134135
0 commit comments