Products Support Documentation Download
rdmtypes.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * Raima Database Manager
3  *
4  * Copyright (c) 2014 Raima Inc., All rights reserved.
5  *
6  * Use of this software, whether in source code format, or in executable,
7  * binary object code form, is governed by the Raima LICENSE which
8  * is fully described in the LICENSE.TXT file, included within this
9  * distribution of files.
10  * ----------------------------------------------------------------------------
11  */
12 
17 #if !defined(RDMTYPES_H_INCLUDED_)
18 #define RDMTYPES_H_INCLUDED_
19 
20 #if !defined(RDM_PERL_GENTYPES)
21 #include "psptypes.h"
22 #include "rdmretcodetypes.h"
23 
24 #define RDM_IDENTIFIER_LEN 127
26 typedef uint32_t RDM_TABLE_ID;
27 typedef uint32_t RDM_COLUMN_ID;
28 typedef uint32_t RDM_KEY_ID;
29 typedef uint32_t RDM_REF_ID;
32 typedef struct
33 {
34  const void *value;
35  size_t bytesIn;
36  uint16_t numKeyCols;
43  uint16_t stringLen;
49 
51 typedef enum
52 {
59 
61 typedef struct
62 {
63  const void *value;
64  size_t bytesIn;
66  uint32_t maxNeighbors;
68 
70 typedef enum
71 {
74 } RDM_RANGE;
75 
77 typedef struct
78 {
79  const void *value;
80  size_t bytesIn;
81  uint16_t numKeyCols;
91 
93 typedef enum
94 {
102 
104 typedef enum
105 {
109 
114 typedef enum
115 {
116  RDM_LOCK_FREE = 0x0000,
117  RDM_LOCK_READ = 0x0101,
118  RDM_LOCK_WRITE = 0x0302,
119  RDM_LOCK_SNAPSHOT = 0x0104,
123 
124 typedef uint64_t RDM_TX;
125 
126 #define RDM_LOCK_NONE (const RDM_TABLE_ID *) (-1)
127 #define RDM_LOCK_ALL (const RDM_TABLE_ID *) (-2)
128 #define RDM_LOCK_SCHEMA (const RDM_TABLE_ID *) (-3)
130 #define RDM_LOCK_DB_OPEN (RDM_TABLE_ID) (-4)
131 #define TABLE_SCHEMA (RDM_TABLE_ID) (0x10000)
134 typedef RDM_RETCODE (RDM_REBUILD_INDEX_REPORT_FCN)(const char *table, const char *indexes, uint64_t current, uint64_t total);
135 
136 #define REF_CURSOR ((RDM_REF_ID) 0)
138 #define RDM_COL_HAS_VALUE ((RDM_HAS_VALUE_T) 1)
139 #define RDM_COL_IS_NULL ((RDM_HAS_VALUE_T) 0)
140 typedef uint8_t RDM_HAS_VALUE_T;
142 #define RDM_ALL_DATA ((size_t) -1)
143 
145 #define RDM_COLUMN_SIZE(table, column) sizeof(((table *)0)->column)
146 
153 typedef enum
154 {
167 
175 typedef enum
176 {
181 
182 #endif /* RDM_PERL_GENTYPES */
183 
194 typedef enum
195 {
196  /* GEN_OPEN_MODE_BEGIN */
197  RDM_OPEN_SHARED = 0x0000,
199  RDM_OPEN_READONLY = 0x0002,
208  /* GEN_OPEN_MODE_END */
209 } RDM_OPEN_MODE;
210 
211 #if !defined(RDM_PERL_GENTYPES)
212 
217 typedef enum
218 {
239 
240 typedef struct RDM_DB_S *RDM_DB;
241 typedef struct RDM_CURSOR_S *RDM_CURSOR;
242 typedef struct RDM_TRANS_S *RDM_TRANS;
244 typedef void (EXTERNAL_FCN *RDM_ERROR_FCN)(RDM_DB, RDM_RETCODE, const RDM_TCHAR_T *, void *);
245 typedef void (EXTERNAL_FCN *RDM_ERROR_A_FCN)(RDM_DB, RDM_RETCODE, const char *, void *);
246 typedef void (EXTERNAL_FCN *RDM_ERROR_W_FCN)(RDM_DB, RDM_RETCODE, const wchar_t *, void *);
247 
249 typedef enum
250 {
255 
257 typedef struct
258 {
260  uint32_t index;
262 
263 #endif /* RDM_PERL_GENTYPES */
264 
265 #endif /* RDMTYPES_H_INCLUDED_ */
RDM_RETCODE rc
Definition: rdmtypes.h:259
void(* RDM_ERROR_FCN)(RDM_DB, RDM_RETCODE, const RDM_TCHAR_T *, void *)
Definition: rdmtypes.h:244
struct RDM_TRANS_S * RDM_TRANS
Definition: rdmtypes.h:242
RDM_USER_STATUS
The RDM user status.
Definition: rdmtypes.h:104
const void * value
Definition: rdmtypes.h:79
RDM_LOCK_STATUS
Enumeration for RDM table lock status.
Definition: rdmtypes.h:114
struct RDM_CURSOR_S * RDM_CURSOR
Definition: rdmtypes.h:241
uint16_t stringLen
Definition: rdmtypes.h:43
RDM_CURSOR_TYPE
Enumeration for cursor types.
Definition: rdmtypes.h:217
Header for the Platform Support Package - Platform dependent types.
size_t bytesIn
Definition: rdmtypes.h:80
The RDM Partial Key data structure.
Definition: rdmtypes.h:32
void(* RDM_ERROR_A_FCN)(RDM_DB, RDM_RETCODE, const char *, void *)
Definition: rdmtypes.h:245
RDM_RANGE range
Definition: rdmtypes.h:88
RDM_RTREE_TYPE type
Definition: rdmtypes.h:65
uint16_t numKeyCols
Definition: rdmtypes.h:81
The RDM Range Key data structure.
Definition: rdmtypes.h:77
RDM Status and Error Return Codes.
size_t bytesIn
Definition: rdmtypes.h:35
const void * value
Definition: rdmtypes.h:63
RDM_TRANS_STATUS
The RDM transaction status identifiers.
Definition: rdmtypes.h:93
RDM Rows status info.
Definition: rdmtypes.h:257
RDM_RETCODE
RDM status and error return codes.
RDM_OPEN_MODE
Enumeration for open modes.
Definition: rdmtypes.h:194
RDM_RTREE_TYPE
Query types for an R-tree index.
Definition: rdmtypes.h:51
RDM_RANGE
The range include or exclude enumeration.
Definition: rdmtypes.h:70
RDM_TRIGGERS_STATUS
Triggers status values.
Definition: rdmtypes.h:249
void(* RDM_ERROR_W_FCN)(RDM_DB, RDM_RETCODE, const wchar_t *, void *)
Definition: rdmtypes.h:246
The RDM R-tree Key data structure.
Definition: rdmtypes.h:61
uint16_t numKeyCols
Definition: rdmtypes.h:36
const void * value
Definition: rdmtypes.h:34
RDM_CURSOR_STATUS
Enumeration for RDM cursor positions / statuses.
Definition: rdmtypes.h:153
size_t bytesIn
Definition: rdmtypes.h:64
RDM_CURSOR_COMPARE
Enumeration for RDM cursor comparisons.
Definition: rdmtypes.h:175
uint64_t RDM_TX
Definition: rdmtypes.h:124
struct RDM_DB_S * RDM_DB
Definition: rdmtypes.h:240
uint32_t maxNeighbors
Definition: rdmtypes.h:66
#define RDM_TCHAR_T
Definition: psptypes.h:134