ocilib::QueueTable Class Reference

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

`#include <ocilib.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 Enum< GroupingModeValues > | GroupingMode
| Grouping Mode. More...
typedef Enum< PurgeModeValues > | PurgeMode
| Purge mode. More...

## 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. More...
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. More...
static void | Drop (const Connection &connection, const ostring &table, bool force=true)
| Drop the given queue table. More...
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. More...
static void | Migrate (const Connection &connection, const ostring &table, const ostring &compatible=OTEXT(""))
| Migrate a queue table from one version to another. More...

## Detailed Description

Class allowing the administration of Oracle Queue tables.

Definition at line 8318 of file ocilib.hpp.

## Member Typedef Documentation

## GroupingMode

typedef Enum<GroupingModeValues> ocilib::QueueTable::GroupingMode

Grouping Mode.

Possible values are QueueTable::GroupingModeValues

Definition at line 8344 of file ocilib.hpp.

## PurgeMode

typedef Enum<PurgeModeValues> ocilib::QueueTable::PurgeMode

Purge mode.

Possible values are QueueTable::PurgeModeValues

Definition at line 8369 of file ocilib.hpp.

## Member Enumeration Documentation

## GroupingModeValues

enum ocilib::QueueTable::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 8328 of file ocilib.hpp.

## PurgeModeValues

enum ocilib::QueueTable::PurgeModeValues

Purge mode enumerated values.

Enumerator
Buffered | Purge only buffered messages
Persistent | Purge only persistent messages
All | Purge all messages

Definition at line 8352 of file ocilib.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 7126 of file ocilib_impl.hpp.

References ocilib::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 7134 of file ocilib_impl.hpp.

References ocilib::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 7139 of file ocilib_impl.hpp.

References ocilib::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 7144 of file ocilib_impl.hpp.

References ocilib::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 7149 of file ocilib_impl.hpp.

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