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 \
25  127
27 typedef uint32_t RDM_TABLE_ID;
28 typedef uint32_t RDM_COLUMN_ID;
29 typedef uint32_t RDM_KEY_ID;
30 typedef uint32_t RDM_REF_ID;
33 typedef struct
34 {
35  const void *value;
36  size_t bytesIn;
37  uint16_t numKeyCols;
44  uint16_t stringLen;
50 
52 typedef enum
53 {
60 
62 typedef struct
63 {
64  const void *value;
65  size_t bytesIn;
67  uint32_t maxNeighbors;
69 
71 typedef enum
72 {
75 } RDM_RANGE;
76 
78 typedef struct
79 {
80  const void *value;
81  size_t bytesIn;
82  uint16_t numKeyCols;
92 
94 typedef enum
95 {
103 
105 typedef enum
106 {
110 
115 typedef enum
116 {
117  RDM_LOCK_FREE = 0x0000,
118  RDM_LOCK_READ = 0x0101,
119  RDM_LOCK_WRITE = 0x0302,
120  RDM_LOCK_SNAPSHOT = 0x0104,
124 
125 typedef uint64_t RDM_TX;
126 
127 #define RDM_LOCK_NONE \
128  (const RDM_TABLE_ID *) (-1)
129 #define RDM_LOCK_ALL \
130  (const RDM_TABLE_ID *) (-2)
131 #define RDM_LOCK_SCHEMA (const RDM_TABLE_ID *) (-3)
133 #define RDM_LOCK_DB_OPEN \
134  (RDM_TABLE_ID) (-4)
135 #define TABLE_SCHEMA \
136  (RDM_TABLE_ID) (0x10000)
139 typedef RDM_RETCODE (RDM_REBUILD_INDEX_REPORT_FCN) (
140  const char *table,
141  const char *indexes,
142  uint64_t current,
143  uint64_t total);
144 
145 #define REF_CURSOR \
146  ((RDM_REF_ID) 0)
148 #define RDM_COL_HAS_VALUE ((RDM_HAS_VALUE_T) 1)
149 #define RDM_COL_IS_NULL ((RDM_HAS_VALUE_T) 0)
150 typedef uint8_t
153 #define RDM_ALL_DATA ((size_t) -1)
154 
156 #define RDM_COLUMN_SIZE(table, column) sizeof (((table *) 0)->column)
157 
164 typedef enum
165 {
178 
186 typedef enum
187 {
189  RDM_LT,
193  RDM_GT
195 
196 #endif /* RDM_PERL_GENTYPES */
197 
208 typedef enum
209 {
210  /* GEN_OPEN_MODE_BEGIN */
212  0x0000,
215  0x0002,
217  0x0010,
219  0x0011,
223  0x0021,
225  0x0120,
227  0x0121,
229  0x0220,
231  0x0221
232  /* GEN_OPEN_MODE_END */
233 } RDM_OPEN_MODE;
234 
235 #if !defined(RDM_PERL_GENTYPES)
236 
241 typedef enum
242 {
244  1,
264 
265 typedef struct RDM_DB_S *RDM_DB;
266 typedef struct RDM_CURSOR_S *RDM_CURSOR;
267 typedef struct RDM_TRANS_S *RDM_TRANS;
269 typedef void(
270  EXTERNAL_FCN *RDM_ERROR_FCN) (RDM_DB, RDM_RETCODE, const RDM_TCHAR_T *, void *);
271 typedef void(
272  EXTERNAL_FCN *RDM_ERROR_A_FCN) (RDM_DB, RDM_RETCODE, const char *, void *);
273 typedef void(
274  EXTERNAL_FCN *RDM_ERROR_W_FCN) (RDM_DB, RDM_RETCODE, const wchar_t *, void *);
275 
277 typedef enum
278 {
283 
285 typedef struct
286 {
288  uint32_t index;
290 
291 #endif /* RDM_PERL_GENTYPES */
292 
293 #endif /* RDMTYPES_H_INCLUDED_ */
RDM_RETCODE rc
Definition: rdmtypes.h:287
void(* RDM_ERROR_FCN)(RDM_DB, RDM_RETCODE, const RDM_TCHAR_T *, void *)
Definition: rdmtypes.h:270
struct RDM_TRANS_S * RDM_TRANS
Definition: rdmtypes.h:267
RDM_USER_STATUS
The RDM user status.
Definition: rdmtypes.h:105
const void * value
Definition: rdmtypes.h:80
RDM_LOCK_STATUS
Enumeration for RDM table lock status.
Definition: rdmtypes.h:115
struct RDM_CURSOR_S * RDM_CURSOR
Definition: rdmtypes.h:266
uint16_t stringLen
Definition: rdmtypes.h:44
RDM_CURSOR_TYPE
Enumeration for cursor types.
Definition: rdmtypes.h:241
Header for the Platform Support Package - Platform dependent types.
size_t bytesIn
Definition: rdmtypes.h:81
The RDM Partial Key data structure.
Definition: rdmtypes.h:33
void(* RDM_ERROR_A_FCN)(RDM_DB, RDM_RETCODE, const char *, void *)
Definition: rdmtypes.h:272
RDM_RANGE range
Definition: rdmtypes.h:89
RDM_RTREE_TYPE type
Definition: rdmtypes.h:66
uint16_t numKeyCols
Definition: rdmtypes.h:82
The RDM Range Key data structure.
Definition: rdmtypes.h:78
RDM Status and Error Return Codes.
size_t bytesIn
Definition: rdmtypes.h:36
const void * value
Definition: rdmtypes.h:64
RDM_TRANS_STATUS
The RDM transaction status identifiers.
Definition: rdmtypes.h:94
RDM Rows status info.
Definition: rdmtypes.h:285
RDM_RETCODE
RDM status and error return codes.
RDM_OPEN_MODE
Enumeration for open modes.
Definition: rdmtypes.h:208
RDM_RTREE_TYPE
Query types for an R-tree index.
Definition: rdmtypes.h:52
RDM_RANGE
The range include or exclude enumeration.
Definition: rdmtypes.h:71
RDM_TRIGGERS_STATUS
Triggers status values.
Definition: rdmtypes.h:277
void(* RDM_ERROR_W_FCN)(RDM_DB, RDM_RETCODE, const wchar_t *, void *)
Definition: rdmtypes.h:274
The RDM R-tree Key data structure.
Definition: rdmtypes.h:62
uint16_t numKeyCols
Definition: rdmtypes.h:37
const void * value
Definition: rdmtypes.h:35
RDM_CURSOR_STATUS
Enumeration for RDM cursor positions / statuses.
Definition: rdmtypes.h:164
size_t bytesIn
Definition: rdmtypes.h:65
uint8_t RDM_HAS_VALUE_T
Definition: rdmtypes.h:151
RDM_CURSOR_COMPARE
Enumeration for RDM cursor comparisons.
Definition: rdmtypes.h:186
uint64_t RDM_TX
Definition: rdmtypes.h:125
struct RDM_DB_S * RDM_DB
Definition: rdmtypes.h:265
uint32_t maxNeighbors
Definition: rdmtypes.h:67
#define RDM_TCHAR_T
Definition: psptypes.h:130