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;
36 #define RDM_CATALOG_EMPTY_SCHEMA \
37  "{\n" \
38  " \"database\":{\n" \
39  " \"catver\":141,\n" \
40  " \"dbver\":1,\n" \
41  " \"encryption\":\"none\",\n" \
42  " \"maxdrawers\":55,\n" \
43  " \"nodrawers\":4,\n" \
44  " \"nextdrawer\":4,\n" \
45  " \"nodoms\":0,\n" \
46  " \"maxdoms\":0,\n" \
47  " \"maxtabs\":51,\n" \
48  " \"notabs\":1,\n" \
49  " \"nexttab\":1,\n" \
50  " \"drawers\":[\n" \
51  " ],\n" \
52  " \"tables\":[\n" \
53  " ]\n" \
54  " }\n" \
55  "}\n"
56 
58 typedef struct
59 {
60  const void *value;
61  size_t bytesIn;
62  uint16_t numKeyCols;
69  uint16_t stringLen;
75 
77 typedef enum
78 {
85 
87 typedef struct
88 {
89  const void *value;
90  size_t bytesIn;
92  uint32_t maxNeighbors;
94 
96 typedef enum
97 {
100 } RDM_RANGE;
101 
103 typedef struct
104 {
105  const void *value;
106  size_t bytesIn;
107  uint16_t numKeyCols;
116 } RDM_RANGE_KEY;
117 
119 typedef enum
120 {
128 
130 typedef enum
131 {
135 
140 typedef enum
141 {
142  RDM_LOCK_FREE = 0x0000,
143  RDM_LOCK_READ = 0x0101,
144  RDM_LOCK_WRITE = 0x0302,
145  RDM_LOCK_SNAPSHOT = 0x0104,
149 
150 typedef uint64_t RDM_TX;
151 
152 #define RDM_LOCK_NONE \
153  (const RDM_TABLE_ID *) (-1)
154 #define RDM_LOCK_ALL \
155  (const RDM_TABLE_ID *) (-2)
156 #define RDM_LOCK_SCHEMA (const RDM_TABLE_ID *) (-3)
158 #define RDM_LOCK_DB_OPEN \
159  (RDM_TABLE_ID) (-4)
160 #define TABLE_SCHEMA \
161  (RDM_TABLE_ID) (0x10000)
164 typedef RDM_RETCODE (RDM_REBUILD_INDEX_REPORT_FCN) (
165  const char *table,
166  const char *indexes,
167  uint64_t current,
168  uint64_t total);
169 
170 #define REF_CURSOR \
171  ((RDM_REF_ID) 0)
173 #define RDM_COL_HAS_VALUE ((RDM_HAS_VALUE_T) 1)
174 #define RDM_COL_IS_NULL ((RDM_HAS_VALUE_T) 0)
175 typedef uint8_t
178 #define RDM_ALL_DATA ((size_t) -1)
179 
181 #define RDM_COLUMN_SIZE(table, column) sizeof (((table *) 0)->column)
182 
189 typedef enum
190 {
203 
211 typedef enum
212 {
214  RDM_LT,
218  RDM_GT
220 
221 #endif /* RDM_PERL_GENTYPES */
222 
233 typedef enum
234 {
235  /* GEN_OPEN_MODE_BEGIN */
237  0x0000,
240  0x0002,
242  0x0010,
244  0x0011,
248  0x0021,
250  0x0120,
252  0x0121,
254  0x0220,
256  0x0221
257  /* GEN_OPEN_MODE_END */
258 } RDM_OPEN_MODE;
259 
260 #if !defined(RDM_PERL_GENTYPES)
261 
266 typedef enum
267 {
269  1,
289 
290 typedef struct RDM_DB_S *RDM_DB;
291 typedef struct RDM_CURSOR_S *RDM_CURSOR;
292 typedef struct RDM_TRANS_S *RDM_TRANS;
294 typedef void(
295  EXTERNAL_FCN *RDM_ERROR_FCN) (RDM_DB, RDM_RETCODE, const RDM_TCHAR_T *, void *);
296 typedef void(
297  EXTERNAL_FCN *RDM_ERROR_A_FCN) (RDM_DB, RDM_RETCODE, const char *, void *);
298 typedef void(
299  EXTERNAL_FCN *RDM_ERROR_W_FCN) (RDM_DB, RDM_RETCODE, const wchar_t *, void *);
300 
302 typedef enum
303 {
308 
310 typedef struct
311 {
313  uint32_t index;
315 
316 #endif /* RDM_PERL_GENTYPES */
317 
318 #endif /* RDMTYPES_H_INCLUDED_ */
RDM_RETCODE rc
Definition: rdmtypes.h:312
void(* RDM_ERROR_FCN)(RDM_DB, RDM_RETCODE, const RDM_TCHAR_T *, void *)
Definition: rdmtypes.h:295
struct RDM_TRANS_S * RDM_TRANS
Definition: rdmtypes.h:292
RDM_USER_STATUS
The RDM user status.
Definition: rdmtypes.h:130
const void * value
Definition: rdmtypes.h:105
RDM_LOCK_STATUS
Enumeration for RDM table lock status.
Definition: rdmtypes.h:140
struct RDM_CURSOR_S * RDM_CURSOR
Definition: rdmtypes.h:291
uint16_t stringLen
Definition: rdmtypes.h:69
RDM_CURSOR_TYPE
Enumeration for cursor types.
Definition: rdmtypes.h:266
Header for the Platform Support Package - Platform dependent types.
size_t bytesIn
Definition: rdmtypes.h:106
The RDM Partial Key data structure.
Definition: rdmtypes.h:58
void(* RDM_ERROR_A_FCN)(RDM_DB, RDM_RETCODE, const char *, void *)
Definition: rdmtypes.h:297
RDM_RANGE range
Definition: rdmtypes.h:114
RDM_RTREE_TYPE type
Definition: rdmtypes.h:91
uint16_t numKeyCols
Definition: rdmtypes.h:107
The RDM Range Key data structure.
Definition: rdmtypes.h:103
RDM Status and Error Return Codes.
size_t bytesIn
Definition: rdmtypes.h:61
const void * value
Definition: rdmtypes.h:89
RDM_TRANS_STATUS
The RDM transaction status identifiers.
Definition: rdmtypes.h:119
RDM Rows status info.
Definition: rdmtypes.h:310
RDM_RETCODE
RDM status and error return codes.
RDM_OPEN_MODE
Enumeration for open modes.
Definition: rdmtypes.h:233
RDM_RTREE_TYPE
Query types for an R-tree index.
Definition: rdmtypes.h:77
RDM_RANGE
The range include or exclude enumeration.
Definition: rdmtypes.h:96
RDM_TRIGGERS_STATUS
Triggers status values.
Definition: rdmtypes.h:302
void(* RDM_ERROR_W_FCN)(RDM_DB, RDM_RETCODE, const wchar_t *, void *)
Definition: rdmtypes.h:299
The RDM R-tree Key data structure.
Definition: rdmtypes.h:87
uint16_t numKeyCols
Definition: rdmtypes.h:62
const void * value
Definition: rdmtypes.h:60
RDM_CURSOR_STATUS
Enumeration for RDM cursor positions / statuses.
Definition: rdmtypes.h:189
size_t bytesIn
Definition: rdmtypes.h:90
uint8_t RDM_HAS_VALUE_T
Definition: rdmtypes.h:176
RDM_CURSOR_COMPARE
Enumeration for RDM cursor comparisons.
Definition: rdmtypes.h:211
uint64_t RDM_TX
Definition: rdmtypes.h:150
struct RDM_DB_S * RDM_DB
Definition: rdmtypes.h:290
uint32_t maxNeighbors
Definition: rdmtypes.h:92
#define RDM_TCHAR_T
Definition: psptypes.h:130