[cx-oracle-users] Using Oracle ADVANCED QUEUING / TYPES with cx_Oracle
Brought to you by:
atuining
From: Henning v. B. <H.v...@t-...> - 2005-05-20 07:24:04
|
Hello list users, first of all: cx_Oracle is great! Now I'm trying to use DBMS_AQ. With DBMS_AQ, you can define an "object type" for your messages. The output from DBMS_AQ.DEQUEUE is then=20 your object type togehter with some additional info, i.e. create or replace type AQTEST_MESSAGE_T as object ( id number(8) -- wird =FCberlaufen , prioritaet number(2) -- je h=F6her desto wichtiger , inhalt varchar2(256) -- 256 Bytes sollten erstmal reichen ); / grant execute on AQTEST_MESSAGE_T to public; REM Anlegen einer Queuetabelle f=FCr die LRS-Instanzen begin dbms_aqadm.create_queue_table ( queue_table =3D> 'QT_AQTEST_LRS' , queue_payload_type =3D> 'AQTEST_MESSAGE_T' , sort_list =3D> null , multiple_consumers =3D> false , auto_commit =3D> false , compatible =3D> '8.1' , comment =3D> 'Reporting Queue Table f=FCr LRS' ); end; / REM Anlegen einer Queue f=FCr die LRS-Instanzen begin dbms_aqadm.create_queue ( queue_name =3D> 'Q_AQTEST_LRS' , queue_table =3D> 'QT_AQTEST_LRS' , queue_type =3D> DBMS_AQADM.NORMAL_QUEUE , auto_commit =3D> false , comment =3D> 'Reporting Queue f=FCr LRS' ); end; / Is it possible (or planned) for cx_Oracle to support such Oracle Types directly? As a workaround, right now I'm using a wrapper=20 stored procedure that returns the individual members of my AQTEST_MESSAGE_T in several out parameters. So there's no need for urgent help, I just want to know... BTW: I tried running the tests with cx_Oracle 4.1 and Python 2.4.1 using a 10g Database, and those tests using datetime failed. There's some comment in the documentation about Python 2.4 and datetime, but perhaps the tests should be adapted, too. Henning |