Products Support Documentation Download
rdmtypes.h File Reference

Header for the native RDM Runtime types. More...

#include "psptypes.h"
#include "rdmretcodetypes.h"
Include dependency graph for rdmtypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RDM_SEARCH_KEY
 The RDM Partial Key data structure. More...
 
struct  RDM_RTREE_KEY
 The RDM R-tree Key data structure. More...
 
struct  RDM_RANGE_KEY
 The RDM Range Key data structure. More...
 
struct  RDM_ROW_STATUS_INFO
 RDM Rows status info. More...
 

Macros

#define RDM_IDENTIFIER_LEN   127
 
#define RDM_LOCK_NONE   (const RDM_TABLE_ID *) (-1)
 
#define RDM_LOCK_ALL   (const RDM_TABLE_ID *) (-2)
 
#define RDM_LOCK_SCHEMA   (const RDM_TABLE_ID *) (-3)
 
#define RDM_LOCK_DB_OPEN   (RDM_TABLE_ID) (-4)
 
#define TABLE_SCHEMA   (RDM_TABLE_ID) (0x10000)
 
#define REF_CURSOR   ((RDM_REF_ID) 0)
 
#define RDM_COL_HAS_VALUE   ((RDM_HAS_VALUE_T) 1)
 
#define RDM_COL_IS_NULL   ((RDM_HAS_VALUE_T) 0)
 
#define RDM_ALL_DATA   ((size_t) -1)
 
#define RDM_COLUMN_SIZE(table, column)   sizeof(((table *)0)->column)
 Macro for getting the size of a column in the struct definition. More...
 

Typedefs

typedef uint32_t RDM_TABLE_ID
 
typedef uint32_t RDM_COLUMN_ID
 
typedef uint32_t RDM_KEY_ID
 
typedef uint32_t RDM_REF_ID
 
typedef uint64_t RDM_TX
 
typedef RDM_RETCODE() RDM_REBUILD_INDEX_REPORT_FCN(const char *table, const char *indexes, uint64_t current, uint64_t total)
 Callback function signature to report status on an ID-index rebuild. More...
 
typedef uint8_t RDM_HAS_VALUE_T
 
typedef struct RDM_DB_S * RDM_DB
 
typedef struct RDM_CURSOR_S * RDM_CURSOR
 
typedef struct RDM_TRANS_S * RDM_TRANS
 
typedef void(* RDM_ERROR_FCN) (RDM_DB, RDM_RETCODE, const RDM_TCHAR_T *, void *)
 
typedef void(* RDM_ERROR_A_FCN) (RDM_DB, RDM_RETCODE, const char *, void *)
 
typedef void(* RDM_ERROR_W_FCN) (RDM_DB, RDM_RETCODE, const wchar_t *, void *)
 

Enumerations

enum  RDM_RTREE_TYPE {
  RDM_RTREE_ALL, RDM_RTREE_EXACT, RDM_RTREE_OVERLAP, RDM_RTREE_CONTAINS,
  RDM_RTREE_NEAREST
}
 Query types for an R-tree index. More...
 
enum  RDM_RANGE { RDM_RANGE_OPEN = 0, RDM_RANGE_CLOSED }
 The range include or exclude enumeration. More...
 
enum  RDM_TRANS_STATUS {
  RDM_TRANS_READ =1, RDM_TRANS_UPDATE, RDM_TRANS_INITIALIZE, RDM_TRANS_SNAPSHOT,
  RDM_TRANS_NONE, RDM_TRANS_UNKNOWN
}
 The RDM transaction status identifiers. More...
 
enum  RDM_USER_STATUS { RDM_U_EMPTY =0, RDM_U_LIVE }
 The RDM user status. More...
 
enum  RDM_LOCK_STATUS {
  RDM_LOCK_FREE = 0x0000, RDM_LOCK_READ = 0x0101, RDM_LOCK_WRITE = 0x0302, RDM_LOCK_SNAPSHOT = 0x0104,
  RDM_LOCK_EXCLUSIVE = 0x0308, RDM_LOCK_CATALOG = 0x0310
}
 Enumeration for RDM table lock status. More...
 
enum  RDM_CURSOR_STATUS {
  CURSOR_NOT_AT_ROW = 0, CURSOR_AT_ROW, CURSOR_BETWEEN, CURSOR_BEFORE_FIRST,
  CURSOR_AFTER_LAST, CURSOR_DELETED, CURSOR_CHANGED, CURSOR_UNLINKED,
  CURSOR_ROW_GONE, CURSOR_SET_GONE, CURSOR_DROPPED
}
 Enumeration for RDM cursor positions / statuses. More...
 
enum  RDM_CURSOR_COMPARE { CURSOR_BEFORE = RDM_LT, CURSOR_EQUAL = RDM_EQ, CURSOR_AFTER = RDM_GT }
 Enumeration for RDM cursor comparisons. More...
 
enum  RDM_OPEN_MODE {
  RDM_OPEN_SHARED = 0x0000, RDM_OPEN_EXCLUSIVE = 0x0001, RDM_OPEN_READONLY = 0x0002, RDM_OPEN_SHARED_APPEND = 0x0010,
  RDM_OPEN_EXCLUSIVE_APPEND = 0x0011, RDM_OPEN_SHARED_CREAT = 0x0020, RDM_OPEN_EXCLUSIVE_CREAT = 0x0021, RDM_OPEN_SHARED_CREAT_TRUNC = 0x0120,
  RDM_OPEN_EXCLUSIVE_CREAT_TRUNC = 0x0121, RDM_OPEN_SHARED_CREAT_EXCL = 0x0220, RDM_OPEN_EXCLUSIVE_CREAT_EXCL = 0x0221
}
 Enumeration for open modes. More...
 
enum  RDM_CURSOR_TYPE {
  CURSOR_TYPE_BEFORE_FIRST = 1, CURSOR_TYPE_AFTER_LAST, CURSOR_TYPE_REC_SCAN, CURSOR_TYPE_KEY_SCAN,
  CURSOR_TYPE_RTREE_SCAN, CURSOR_TYPE_SET_SCAN, CURSOR_TYPE_SINGLETON, CURSOR_TYPE_REC_RANGE,
  CURSOR_TYPE_STATUS, CURSOR_TYPE_SYSCOLUMN, CURSOR_TYPE_SYSTABLE, CURSOR_TYPE_SYSREF,
  CURSOR_TYPE_SYSKEY, CURSOR_TYPE_SYSDOMAIN, CURSOR_TYPE_SYSSORT, CURSOR_TYPE_SYSELEM,
  CURSOR_TYPE_SYSDB, CURSOR_TYPE_SYSDRAWER, CURSOR_TYPE_ALLOCATED
}
 Enumeration for cursor types. More...
 
enum  RDM_TRIGGERS_STATUS { RDM_TRIGGERS_ON = 1, RDM_TRIGGERS_OFF = -1, RDM_TRIGGERS_UNDEFINED = 0 }
 Triggers status values. More...
 

Detailed Description

Header for the native RDM Runtime types.

Definition in file rdmtypes.h.

Macro Definition Documentation

◆ RDM_ALL_DATA

#define RDM_ALL_DATA   ((size_t) -1)

Definition at line 142 of file rdmtypes.h.

◆ RDM_COL_HAS_VALUE

#define RDM_COL_HAS_VALUE   ((RDM_HAS_VALUE_T) 1)

Column has a value

Definition at line 138 of file rdmtypes.h.

◆ RDM_COL_IS_NULL

#define RDM_COL_IS_NULL   ((RDM_HAS_VALUE_T) 0)

Coulumn is null

Definition at line 139 of file rdmtypes.h.

◆ RDM_COLUMN_SIZE

#define RDM_COLUMN_SIZE (   table,
  column 
)    sizeof(((table *)0)->column)

Macro for getting the size of a column in the struct definition.

Definition at line 145 of file rdmtypes.h.

◆ RDM_IDENTIFIER_LEN

#define RDM_IDENTIFIER_LEN   127

The maximum identifier length measured in characters not including a null terminator

Definition at line 24 of file rdmtypes.h.

◆ RDM_LOCK_ALL

#define RDM_LOCK_ALL   (const RDM_TABLE_ID *) (-2)

Lock all of the tables in the database

Definition at line 127 of file rdmtypes.h.

◆ RDM_LOCK_DB_OPEN

#define RDM_LOCK_DB_OPEN   (RDM_TABLE_ID) (-4)

Lock for opening a database exclusively

Definition at line 130 of file rdmtypes.h.

◆ RDM_LOCK_NONE

#define RDM_LOCK_NONE   (const RDM_TABLE_ID *) (-1)

Don't lock any tables in the database

Definition at line 126 of file rdmtypes.h.

◆ RDM_LOCK_SCHEMA

#define RDM_LOCK_SCHEMA   (const RDM_TABLE_ID *) (-3)

Lock the schema

Definition at line 128 of file rdmtypes.h.

◆ REF_CURSOR

#define REF_CURSOR   ((RDM_REF_ID) 0)

The default foreign reference ID for the cursor

Definition at line 136 of file rdmtypes.h.

◆ TABLE_SCHEMA

#define TABLE_SCHEMA   (RDM_TABLE_ID) (0x10000)

The table ID for the schema

Definition at line 131 of file rdmtypes.h.

Typedef Documentation

◆ RDM_COLUMN_ID

typedef uint32_t RDM_COLUMN_ID

The RDM column ID

Definition at line 27 of file rdmtypes.h.

◆ RDM_CURSOR

typedef struct RDM_CURSOR_S* RDM_CURSOR

RDM cursor handle

Definition at line 241 of file rdmtypes.h.

◆ RDM_DB

typedef struct RDM_DB_S* RDM_DB

RDM database handle

Definition at line 240 of file rdmtypes.h.

◆ RDM_ERROR_A_FCN

typedef void( * RDM_ERROR_A_FCN) (RDM_DB, RDM_RETCODE, const char *, void *)

Definition at line 245 of file rdmtypes.h.

◆ RDM_ERROR_FCN

typedef void( * RDM_ERROR_FCN) (RDM_DB, RDM_RETCODE, const RDM_TCHAR_T *, void *)

Definition at line 244 of file rdmtypes.h.

◆ RDM_ERROR_W_FCN

typedef void( * RDM_ERROR_W_FCN) (RDM_DB, RDM_RETCODE, const wchar_t *, void *)

Definition at line 246 of file rdmtypes.h.

◆ RDM_HAS_VALUE_T

typedef uint8_t RDM_HAS_VALUE_T

RDM Type for whether column has a value or is null

Definition at line 140 of file rdmtypes.h.

◆ RDM_KEY_ID

typedef uint32_t RDM_KEY_ID

The RDM key ID

Definition at line 28 of file rdmtypes.h.

◆ RDM_REBUILD_INDEX_REPORT_FCN

typedef RDM_RETCODE() RDM_REBUILD_INDEX_REPORT_FCN(const char *table, const char *indexes, uint64_t current, uint64_t total)

Callback function signature to report status on an ID-index rebuild.

Definition at line 134 of file rdmtypes.h.

◆ RDM_REF_ID

typedef uint32_t RDM_REF_ID

The RDM foreign reference ID

Definition at line 29 of file rdmtypes.h.

◆ RDM_TABLE_ID

typedef uint32_t RDM_TABLE_ID

The RDM table ID

Definition at line 26 of file rdmtypes.h.

◆ RDM_TRANS

typedef struct RDM_TRANS_S* RDM_TRANS

RDM transaction handle handle

Definition at line 242 of file rdmtypes.h.

◆ RDM_TX

typedef uint64_t RDM_TX

Definition at line 124 of file rdmtypes.h.

Enumeration Type Documentation

◆ RDM_CURSOR_COMPARE

Enumeration for RDM cursor comparisons.

The enumeration allows for position comparisons between two cursors. A cursor can either be positioned before, after, or equal to the position of another cursor. How positioning is determined is based on the type of cursor being compared.

Enumerator
CURSOR_BEFORE 

The cursor is positioned before the position of the other cursor

CURSOR_EQUAL 

The cursor is positioned at the same position as the position of the other cursor

CURSOR_AFTER 

The cursor is positioned after the position of the other cursor

Definition at line 175 of file rdmtypes.h.

176 {
178  CURSOR_EQUAL = RDM_EQ,
RDM_CURSOR_COMPARE
Enumeration for RDM cursor comparisons.
Definition: rdmtypes.h:175

◆ RDM_CURSOR_STATUS

Enumeration for RDM cursor positions / statuses.

The enumeration identifies the current position for an RDM cursor. A cursor can be positioned at a row, between rows, before all rows, or after all rows

Enumerator
CURSOR_NOT_AT_ROW 

A cursor not positioned at a valid row.

CURSOR_AT_ROW 

A cursor positioned at a valid row.

CURSOR_BETWEEN 

A cursor positioned between rows.

CURSOR_BEFORE_FIRST 

A cursor positioned before all rows.

CURSOR_AFTER_LAST 

A cursor positioned after all rows.

CURSOR_DELETED 

A cursor whose current row has been deleted.

CURSOR_CHANGED 

A cursor whose key value has been changed.

CURSOR_UNLINKED 

A cursor whose curent row has been unlinked.

CURSOR_ROW_GONE 

A singleton cursor that has had it's row deleted.

CURSOR_SET_GONE 

A set cursor that has had it's owner deleted.

CURSOR_DROPPED 

A cursor that is based on an object that has been dropped.

Definition at line 153 of file rdmtypes.h.

◆ RDM_CURSOR_TYPE

Enumeration for cursor types.

The enumeration specifies the type of a cursor

Enumerator
CURSOR_TYPE_BEFORE_FIRST 

enum value for a BeforeFirst special cursor

CURSOR_TYPE_AFTER_LAST 

enum value for a AfterLast special cursor

CURSOR_TYPE_REC_SCAN 

enum value for a record scan cursor

CURSOR_TYPE_KEY_SCAN 

enum value for a key scan cursor

CURSOR_TYPE_RTREE_SCAN 

enum value for a rtree scan cursor

CURSOR_TYPE_SET_SCAN 

enum value for a set scan cursor

CURSOR_TYPE_SINGLETON 

enum value for a singleton cursor

CURSOR_TYPE_REC_RANGE 

enum value for a rec range cursor

CURSOR_TYPE_STATUS 

enum value for a status cursor

CURSOR_TYPE_SYSCOLUMN 

enum value for a syscolumn meta cursor

CURSOR_TYPE_SYSTABLE 

enum value for a systable meta cursor

CURSOR_TYPE_SYSREF 

enum value for a sysref meta cursor

CURSOR_TYPE_SYSKEY 

enum value for a syskey meta cursor

CURSOR_TYPE_SYSDOMAIN 

enum value for a sysdomain meta cursor

CURSOR_TYPE_SYSSORT 

enum value for a syssort meta cursor

CURSOR_TYPE_SYSELEM 

enum value for a syselem meta cursor

CURSOR_TYPE_SYSDB 

enum value for a sysdb meta cursor

CURSOR_TYPE_SYSDRAWER 

enum value for a sysdrawer meta cursor

CURSOR_TYPE_ALLOCATED 

enum value for a cursor that has only been allocated

Definition at line 217 of file rdmtypes.h.

218 {
RDM_CURSOR_TYPE
Enumeration for cursor types.
Definition: rdmtypes.h:217

◆ RDM_LOCK_STATUS

Enumeration for RDM table lock status.

This enumeration specifies the table lock status for RDM databases

Enumerator
RDM_LOCK_FREE 

The table is not locked

RDM_LOCK_READ 

The table is locked for reads

RDM_LOCK_WRITE 

The table is locked for updates

RDM_LOCK_SNAPSHOT 

The table has an active snapshot

RDM_LOCK_EXCLUSIVE 

The database is opened in exclusive mode

RDM_LOCK_CATALOG 

The database has the catalog write locked

Definition at line 114 of file rdmtypes.h.

115 {
116  RDM_LOCK_FREE = 0x0000,
117  RDM_LOCK_READ = 0x0101,
118  RDM_LOCK_WRITE = 0x0302,
119  RDM_LOCK_SNAPSHOT = 0x0104,
120  RDM_LOCK_EXCLUSIVE = 0x0308,
121  RDM_LOCK_CATALOG = 0x0310
RDM_LOCK_STATUS
Enumeration for RDM table lock status.
Definition: rdmtypes.h:114

◆ RDM_OPEN_MODE

Enumeration for open modes.

The enumeration specifies the open modes. The creat flags always require a catalog set using rdm_dbSetCatalog(). The append modes require any catalog that have been set to match the catalog stored in the database. RDM_OPEN_EXCLUSIVE and RDM_OPEN_SHARED default to create if a catalog have been set and append if it have not been set.

Enumerator
RDM_OPEN_SHARED 

Open database in shared mode, requiring locks

RDM_OPEN_EXCLUSIVE 

Open database in exclusive mode

RDM_OPEN_READONLY 

Open database in readonly mode, requiring locks

RDM_OPEN_SHARED_APPEND 

Open an existing database in shared mode, requiring locks

RDM_OPEN_EXCLUSIVE_APPEND 

Open an existing database in exclusive mode

RDM_OPEN_SHARED_CREAT 

Open database (create if it does not exist) in shared mode, requiring locks

RDM_OPEN_EXCLUSIVE_CREAT 

Open database (create if it does not exist) in exclusive mode

RDM_OPEN_SHARED_CREAT_TRUNC 

Open and create database (truncate if it does exist) in shared mode, requiring locks

RDM_OPEN_EXCLUSIVE_CREAT_TRUNC 

Open and create database (truncate if it does exist) in exclusive mode

RDM_OPEN_SHARED_CREAT_EXCL 

Create and open database (fail if it does exist) in shared mode, requiring locks

RDM_OPEN_EXCLUSIVE_CREAT_EXCL 

Create and open database (fail if it does exist) in exclusive mode

Definition at line 194 of file rdmtypes.h.

◆ RDM_RANGE

enum RDM_RANGE

The range include or exclude enumeration.

Enumerator
RDM_RANGE_OPEN 

The range includes the specified value

RDM_RANGE_CLOSED 

The range excludes the specified value

Definition at line 70 of file rdmtypes.h.

71 {
72  RDM_RANGE_OPEN = 0,
74 } RDM_RANGE;
RDM_RANGE
The range include or exclude enumeration.
Definition: rdmtypes.h:70

◆ RDM_RTREE_TYPE

Query types for an R-tree index.

Enumerator
RDM_RTREE_ALL 

Return all entries in the R-tree index

RDM_RTREE_EXACT 

Return only an exact match for the query criteria

RDM_RTREE_OVERLAP 

Return all rows that overlap the query criteria

RDM_RTREE_CONTAINS 

Return all rows that are contained in the query criteria

RDM_RTREE_NEAREST 

Return the nearest neighbors to the query criteria.

Definition at line 51 of file rdmtypes.h.

◆ RDM_TRANS_STATUS

The RDM transaction status identifiers.

Enumerator
RDM_TRANS_READ 

A read transaction is active

RDM_TRANS_UPDATE 

An update transaction is active

RDM_TRANS_INITIALIZE 

A database initialization transaction is active

RDM_TRANS_SNAPSHOT 

A snapshot is active

RDM_TRANS_NONE 

There is no transaction active

RDM_TRANS_UNKNOWN 

Unknown transaction status

Definition at line 93 of file rdmtypes.h.

◆ RDM_TRIGGERS_STATUS

Triggers status values.

Enumerator
RDM_TRIGGERS_ON 

Triggers have been turned on

RDM_TRIGGERS_OFF 

Triggers have been turned off

RDM_TRIGGERS_UNDEFINED 

Triggers status has not been set yet

Definition at line 249 of file rdmtypes.h.

250 {
251  RDM_TRIGGERS_ON = 1,
252  RDM_TRIGGERS_OFF = -1,
RDM_TRIGGERS_STATUS
Triggers status values.
Definition: rdmtypes.h:249

◆ RDM_USER_STATUS

The RDM user status.

Enumerator
RDM_U_EMPTY 

The user does not exist on the TFS

RDM_U_LIVE 

The user is in a normal state

Definition at line 104 of file rdmtypes.h.

105 {
106  RDM_U_EMPTY=0,
107  RDM_U_LIVE
RDM_USER_STATUS
The RDM user status.
Definition: rdmtypes.h:104