OCILIB (C and C++ Driver for Oracle)  4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
Loading...
Searching...
No Matches
ocilib::QueueTable Class Reference

Class allowing the administration of Oracle Queue tables. More...

#include <types.hpp>

Public Types

enum  GroupingModeValues { None = OCI_AGM_NONE , Transactionnal = OCI_AGM_TRANSACTIONNAL }
 Grouping mode enumerated values. More...
 
enum  PurgeModeValues { Buffered = OCI_APM_BUFFERED , Persistent = OCI_APM_PERSISTENT , All = OCI_APM_ALL }
 Purge mode enumerated values. More...
 
typedef core::Enum< GroupingModeValuesGroupingMode
 Grouping Mode.
 
typedef core::Enum< PurgeModeValuesPurgeMode
 Purge mode.
 

Static Public Member Functions

static void Create (const Connection &connection, const ostring &table, const ostring &payloadType, bool multipleConsumers, const ostring &storageClause=OTEXT(""), const ostring &sortList=OTEXT(""), GroupingMode groupingMode=None, const ostring &comment=OTEXT(""), unsigned int primaryInstance=0, unsigned int secondaryInstance=0, const ostring &compatible=OTEXT(""))
 Create a queue table for messages of the given type.
 
static void Alter (const Connection &connection, const ostring &table, const ostring &comment, unsigned int primaryInstance=0, unsigned int secondaryInstance=0)
 Alter the given queue table.
 
static void Drop (const Connection &connection, const ostring &table, bool force=true)
 Drop the given queue table.
 
static void Purge (const Connection &connection, const ostring &table, PurgeMode mode, const ostring &condition=OTEXT(""), bool block=true)
 Purge messages from the given queue table.
 
static void Migrate (const Connection &connection, const ostring &table, const ostring &compatible=OTEXT(""))
 Migrate a queue table from one version to another.
 

Detailed Description

Class allowing the administration of Oracle Queue tables.

Definition at line 8426 of file types.hpp.

Member Typedef Documentation

◆ GroupingMode

Grouping Mode.

Possible values are QueueTable::GroupingModeValues

Definition at line 8452 of file types.hpp.

◆ PurgeMode

Purge mode.

Possible values are QueueTable::PurgeModeValues

Definition at line 8477 of file types.hpp.

Member Enumeration Documentation

◆ GroupingModeValues

Grouping mode enumerated values.

Enumerator
None 

Each message is treated individually

Transactionnal 

All messages enqueued in one transaction are considered part of the same group and can be dequeued as a group of related messages

Definition at line 8436 of file types.hpp.

◆ PurgeModeValues

Purge mode enumerated values.

Enumerator
Buffered 

Purge only buffered messages

Persistent 

Purge only persistent messages

All 

Purge all messages

Definition at line 8460 of file types.hpp.

Member Function Documentation

◆ Create()

void ocilib::QueueTable::Create ( const Connection connection,
const ostring table,
const ostring payloadType,
bool  multipleConsumers,
const ostring storageClause = OTEXT(""),
const ostring sortList = OTEXT(""),
GroupingMode  groupingMode = None,
const ostring comment = OTEXT(""),
unsigned int  primaryInstance = 0,
unsigned int  secondaryInstance = 0,
const ostring compatible = OTEXT("") 
)
inlinestatic

Create a queue table for messages of the given type.

Parameters
connection- Database connection
table- Queue table name
payloadType- Message type name
multipleConsumers- Enable multiple consumers for each messages
storageClause- Optional Additional clauses for the table storage
sortList- Optional Additional columns name to use for sorting
groupingMode- Optional Specifies if messages are grouped within a transaction
comment- Optional Description of the queue table
primaryInstance- Optional primary owner (instance) of the queue table
secondaryInstance- Optional Owner of the queue table if the primary instance is not available
compatible- Optional lowest database version with which the queue table is compatible
Note
Parameter 'table' can specify the schema where to create to queue table ([schema.]queue_table) Queue table names cannot be longer than 24 characters (Oracle limit for user queue tables)
Possible values for parameter 'payloadType' :
  • For Oracle types (UDT) : use the type name ([schema.]type_name)
  • For RAW data : use "SYS.RAW" or "RAW"
Possible values for parameter 'compatible' :
  • "8.0", "8.1", "10.0"
this call wraps the PL/SQL procedure DBMS_AQADM.CREATE_QUEUE_TABLE(). Refer to Oracle Streams - Advanced Queuing User's Guide for more details

Definition at line 28 of file QueueTable.hpp.

References ocilib::core::Check(), and OCI_QueueTableCreate().

◆ Alter()

void ocilib::QueueTable::Alter ( const Connection connection,
const ostring table,
const ostring comment,
unsigned int  primaryInstance = 0,
unsigned int  secondaryInstance = 0 
)
inlinestatic

Alter the given queue table.

Parameters
connection- Database connection
table- Queue table name
comment- Optional Description of the queue table
primaryInstance- Optional primary owner (instance) of the queue table
secondaryInstance- Optional Owner of the queue table if the primary instance is not available
Note
See Create() from more details
this call wraps the PL/SQL procedure DBMS_AQADM.ALTER_QUEUE_TABLE(). Refer to Oracle Streams - Advanced Queuing User's Guide for more details

Definition at line 36 of file QueueTable.hpp.

References ocilib::core::Check(), and OCI_QueueTableAlter().

◆ Drop()

void ocilib::QueueTable::Drop ( const Connection connection,
const ostring table,
bool  force = true 
)
inlinestatic

Drop the given queue table.

Parameters
connection- Database connection
table- Queue table name
force- Force the deletion of objects related to the queue table
Note
Possible values for 'force' :
  • true : all queues using the queue table and their associated propagation schedules are dropped automatically
  • false : All the queues using the given queue table must be stopped and dropped before the queue table can be dropped.
this call wraps the PL/SQL procedure DBMS_AQADM.DROP_QUEUE_TABLE(). Refer to Oracle Streams - Advanced Queuing User's Guide for more details

Definition at line 41 of file QueueTable.hpp.

References ocilib::core::Check(), and OCI_QueueTableDrop().

◆ Purge()

void ocilib::QueueTable::Purge ( const Connection connection,
const ostring table,
PurgeMode  mode,
const ostring condition = OTEXT(""),
bool  block = true 
)
inlinestatic

Purge messages from the given queue table.

Parameters
connection- Database connection
table- Queue table name
mode- Type of message to purge
block- Lock all queues using the queue table while doing the purge
condition- Optional SQL based conditions (see notes)
Note
For more information about the SQL purge conditions, refer to Oracle Streams - Advanced Queuing User's Guide for more details
Warning
This feature is only available from Oracle 10gR2. This function does nothing and returns TRUE is the server version is < Oracle 10gR2
Note
this call wraps the PL/SQL procedure DBMS_AQADM.PURGE_QUEUE_TABLE(). Refer to Oracle Streams - Advanced Queuing User's Guide for more details

Definition at line 46 of file QueueTable.hpp.

References ocilib::core::Check(), and OCI_QueueTablePurge().

◆ Migrate()

void ocilib::QueueTable::Migrate ( const Connection connection,
const ostring table,
const ostring compatible = OTEXT("") 
)
inlinestatic

Migrate a queue table from one version to another.

Parameters
connection- Database connection
table- Queue table name
compatible- Optional database version with witch the queue table has to migrate
Note
Possible values for parameter 'compatible' :
  • "8.0", "8.1", "10.0"
this call wraps the PL/SQL procedure DBMS_AQADM.MIGRATE_QUEUE_TABLE(). Refer to Oracle Streams - Advanced Queuing User's Guide for more details

Definition at line 51 of file QueueTable.hpp.

References ocilib::core::Check(), and OCI_QueueTableMigrate().