Codebase list python-cx-oracle / 8674997b-d6a5-4eb0-b42a-c586b2e2d40e/upstream src / cxoModule.h
8674997b-d6a5-4eb0-b42a-c586b2e2d40e/upstream

Tree @8674997b-d6a5-4eb0-b42a-c586b2e2d40e/upstream (Download .tar.gz)

cxoModule.h @8674997b-d6a5-4eb0-b42a-c586b2e2d40e/upstreamraw · history · blame

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
//-----------------------------------------------------------------------------
// Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
//
// Licensed under BSD license (see LICENSE.txt).
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
// cxoModule.h
//   Include file for all cx_Oracle source files.
//-----------------------------------------------------------------------------

#define PY_SSIZE_T_CLEAN                1

#include <Python.h>
#include <structmember.h>
#include <time.h>
#include <dpi.h>

// define macros to get the build version as a string and the driver name
#define xstr(s)                         str(s)
#define str(s)                          #s
#define CXO_BUILD_VERSION_STRING        xstr(CXO_BUILD_VERSION)
#define CXO_DRIVER_NAME                 "cx_Oracle : "CXO_BUILD_VERSION_STRING

// define macro for clearing buffers
#define cxoBuffer_clear(buf)            Py_CLEAR((buf)->obj)


//-----------------------------------------------------------------------------
// Forward Declarations
//-----------------------------------------------------------------------------
typedef struct cxoApiType cxoApiType;
typedef struct cxoBuffer cxoBuffer;
typedef struct cxoConnection cxoConnection;
typedef struct cxoCursor cxoCursor;
typedef struct cxoDbType cxoDbType;
typedef struct cxoDeqOptions cxoDeqOptions;
typedef struct cxoEnqOptions cxoEnqOptions;
typedef struct cxoError cxoError;
typedef struct cxoFuture cxoFuture;
typedef struct cxoJsonBuffer cxoJsonBuffer;
typedef struct cxoLob cxoLob;
typedef struct cxoMessage cxoMessage;
typedef struct cxoMessageQuery cxoMessageQuery;
typedef struct cxoMessageRow cxoMessageRow;
typedef struct cxoMessageTable cxoMessageTable;
typedef struct cxoMsgProps cxoMsgProps;
typedef struct cxoObject cxoObject;
typedef struct cxoObjectAttr cxoObjectAttr;
typedef struct cxoObjectType cxoObjectType;
typedef struct cxoQueue cxoQueue;
typedef struct cxoSessionPool cxoSessionPool;
typedef struct cxoSodaCollection cxoSodaCollection;
typedef struct cxoSodaDatabase cxoSodaDatabase;
typedef struct cxoSodaDoc cxoSodaDoc;
typedef struct cxoSodaDocCursor cxoSodaDocCursor;
typedef struct cxoSodaOperation cxoSodaOperation;
typedef struct cxoSubscr cxoSubscr;
typedef struct cxoVar cxoVar;


//-----------------------------------------------------------------------------
// Globals
//-----------------------------------------------------------------------------

// exception objects
extern PyObject *cxoWarningException;
extern PyObject *cxoErrorException;
extern PyObject *cxoInterfaceErrorException;
extern PyObject *cxoDatabaseErrorException;
extern PyObject *cxoDataErrorException;
extern PyObject *cxoOperationalErrorException;
extern PyObject *cxoIntegrityErrorException;
extern PyObject *cxoInternalErrorException;
extern PyObject *cxoProgrammingErrorException;
extern PyObject *cxoNotSupportedErrorException;

// type objects
extern PyTypeObject cxoPyTypeApiType;
extern PyTypeObject cxoPyTypeConnection;
extern PyTypeObject cxoPyTypeCursor;
extern PyTypeObject cxoPyTypeDbType;
extern PyTypeObject cxoPyTypeDeqOptions;
extern PyTypeObject cxoPyTypeEnqOptions;
extern PyTypeObject cxoPyTypeError;
extern PyTypeObject cxoPyTypeFuture;
extern PyTypeObject cxoPyTypeLob;
extern PyTypeObject cxoPyTypeMsgProps;
extern PyTypeObject cxoPyTypeMessage;
extern PyTypeObject cxoPyTypeMessageQuery;
extern PyTypeObject cxoPyTypeMessageRow;
extern PyTypeObject cxoPyTypeMessageTable;
extern PyTypeObject cxoPyTypeObject;
extern PyTypeObject cxoPyTypeObjectAttr;
extern PyTypeObject cxoPyTypeObjectType;
extern PyTypeObject cxoPyTypeQueue;
extern PyTypeObject cxoPyTypeSessionPool;
extern PyTypeObject cxoPyTypeSodaCollection;
extern PyTypeObject cxoPyTypeSodaDatabase;
extern PyTypeObject cxoPyTypeSodaDoc;
extern PyTypeObject cxoPyTypeSodaDocCursor;
extern PyTypeObject cxoPyTypeSodaOperation;
extern PyTypeObject cxoPyTypeSubscr;
extern PyTypeObject cxoPyTypeVar;

// datetime types
extern PyTypeObject *cxoPyTypeDate;
extern PyTypeObject *cxoPyTypeDateTime;

// database types
extern cxoDbType *cxoDbTypeBfile;
extern cxoDbType *cxoDbTypeBinaryDouble;
extern cxoDbType *cxoDbTypeBinaryFloat;
extern cxoDbType *cxoDbTypeBinaryInteger;
extern cxoDbType *cxoDbTypeBlob;
extern cxoDbType *cxoDbTypeBoolean;
extern cxoDbType *cxoDbTypeChar;
extern cxoDbType *cxoDbTypeClob;
extern cxoDbType *cxoDbTypeCursor;
extern cxoDbType *cxoDbTypeDate;
extern cxoDbType *cxoDbTypeIntervalDS;
extern cxoDbType *cxoDbTypeIntervalYM;
extern cxoDbType *cxoDbTypeJson;
extern cxoDbType *cxoDbTypeLong;
extern cxoDbType *cxoDbTypeLongRaw;
extern cxoDbType *cxoDbTypeNchar;
extern cxoDbType *cxoDbTypeNclob;
extern cxoDbType *cxoDbTypeNumber;
extern cxoDbType *cxoDbTypeNvarchar;
extern cxoDbType *cxoDbTypeObject;
extern cxoDbType *cxoDbTypeRaw;
extern cxoDbType *cxoDbTypeRowid;
extern cxoDbType *cxoDbTypeTimestamp;
extern cxoDbType *cxoDbTypeTimestampLTZ;
extern cxoDbType *cxoDbTypeTimestampTZ;
extern cxoDbType *cxoDbTypeVarchar;

// database API types
extern cxoApiType *cxoApiTypeBinary;
extern cxoApiType *cxoApiTypeDatetime;
extern cxoApiType *cxoApiTypeNumber;
extern cxoApiType *cxoApiTypeRowid;
extern cxoApiType *cxoApiTypeString;

// JSON dump and load functions for use with SODA
extern PyObject *cxoJsonDumpFunction;
extern PyObject *cxoJsonLoadFunction;

// ODPI-C context and version information
extern dpiContext *cxoDpiContext;
extern dpiVersionInfo cxoClientVersionInfo;

// future object
extern cxoFuture *cxoFutureObj;


//-----------------------------------------------------------------------------
// Enumerations
//-----------------------------------------------------------------------------
typedef enum {
    CXO_TRANSFORM_NONE = 0,
    CXO_TRANSFORM_BINARY,
    CXO_TRANSFORM_BFILE,
    CXO_TRANSFORM_BLOB,
    CXO_TRANSFORM_BOOLEAN,
    CXO_TRANSFORM_CLOB,
    CXO_TRANSFORM_CURSOR,
    CXO_TRANSFORM_DATE,
    CXO_TRANSFORM_DATETIME,
    CXO_TRANSFORM_DECIMAL,
    CXO_TRANSFORM_FIXED_CHAR,
    CXO_TRANSFORM_FIXED_NCHAR,
    CXO_TRANSFORM_FLOAT,
    CXO_TRANSFORM_INT,
    CXO_TRANSFORM_LONG_BINARY,
    CXO_TRANSFORM_LONG_STRING,
    CXO_TRANSFORM_NATIVE_DOUBLE,
    CXO_TRANSFORM_NATIVE_FLOAT,
    CXO_TRANSFORM_NATIVE_INT,
    CXO_TRANSFORM_NCLOB,
    CXO_TRANSFORM_NSTRING,
    CXO_TRANSFORM_OBJECT,
    CXO_TRANSFORM_ROWID,
    CXO_TRANSFORM_STRING,
    CXO_TRANSFORM_TIMEDELTA,
    CXO_TRANSFORM_TIMESTAMP,
    CXO_TRANSFORM_TIMESTAMP_LTZ,
    CXO_TRANSFORM_TIMESTAMP_TZ,
    CXO_TRANSFORM_JSON,
    CXO_TRANSFORM_UNSUPPORTED
} cxoTransformNum;

typedef enum {
    CXO_OCI_ATTR_TYPE_STRING = 1,
    CXO_OCI_ATTR_TYPE_BOOLEAN = 2,
    CXO_OCI_ATTR_TYPE_UINT8 = 8,
    CXO_OCI_ATTR_TYPE_UINT16 = 16,
    CXO_OCI_ATTR_TYPE_UINT32 = 32,
    CXO_OCI_ATTR_TYPE_UINT64 = 64
} cxoOciAttrType;


//-----------------------------------------------------------------------------
// Structures
//-----------------------------------------------------------------------------
struct cxoApiType {
    PyObject_HEAD
    const char *name;
    PyObject *dbTypes;
    cxoTransformNum defaultTransformNum;
};

struct cxoBuffer {
    const char *ptr;
    uint32_t numCharacters;
    uint32_t size;
    PyObject *obj;
};

struct cxoError {
    PyObject_HEAD
    long code;
    unsigned offset;
    PyObject *message;
    PyObject *context;
    char isRecoverable;
};

struct cxoConnection {
    PyObject_HEAD
    dpiConn *handle;
    cxoSessionPool *sessionPool;
    PyObject *inputTypeHandler;
    PyObject *outputTypeHandler;
    PyObject *username;
    PyObject *dsn;
    PyObject *version;
    PyObject *tag;
    dpiEncodingInfo encodingInfo;
    int autocommit;
};

struct cxoCursor {
    PyObject_HEAD
    dpiStmt *handle;
    dpiStmtInfo stmtInfo;
    cxoConnection *connection;
    PyObject *statement;
    PyObject *statementTag;
    PyObject *bindVariables;
    PyObject *fetchVariables;
    PyObject *rowFactory;
    PyObject *inputTypeHandler;
    PyObject *outputTypeHandler;
    uint32_t arraySize;
    uint32_t bindArraySize;
    uint32_t fetchArraySize;
    uint32_t prefetchRows;
    int setInputSizes;
    uint64_t rowCount;
    uint32_t fetchBufferRowIndex;
    uint32_t numRowsInFetchBuffer;
    int moreRowsToFetch;
    char isScrollable;
    int fixupRefCursor;
    int isOpen;
};

struct cxoDbType {
    PyObject_HEAD
    uint32_t num;
    const char *name;
    cxoTransformNum defaultTransformNum;
};

struct cxoDeqOptions {
    PyObject_HEAD
    dpiDeqOptions *handle;
    const char *encoding;
};

struct cxoEnqOptions {
    PyObject_HEAD
    dpiEnqOptions *handle;
    const char *encoding;
};

struct cxoFuture {
    PyObject_HEAD
};

struct cxoJsonBuffer {
    dpiJsonNode topNode;
    dpiDataBuffer topNodeBuffer;
    uint32_t allocatedBuffers;
    uint32_t numBuffers;
    cxoBuffer *buffers;
};

struct cxoLob {
    PyObject_HEAD
    cxoConnection *connection;
    cxoDbType *dbType;
    dpiLob *handle;
};

struct cxoMessage {
    PyObject_HEAD
    cxoSubscr *subscription;
    dpiEventType type;
    PyObject *dbname;
    PyObject *txId;
    PyObject *tables;
    PyObject *queries;
    PyObject *queueName;
    PyObject *consumerName;
    int registered;
};

struct cxoMessageQuery {
    PyObject_HEAD
    uint64_t id;
    dpiOpCode operation;
    PyObject *tables;
};

struct cxoMessageRow {
    PyObject_HEAD
    PyObject *rowid;
    dpiOpCode operation;
};

struct cxoMessageTable {
    PyObject_HEAD
    PyObject *name;
    PyObject *rows;
    dpiOpCode operation;
};

struct cxoMsgProps {
    PyObject_HEAD
    dpiMsgProps *handle;
    PyObject *payload;
    const char *encoding;
};

struct cxoObject {
    PyObject_HEAD
    cxoObjectType *objectType;
    dpiObject *handle;
};

struct cxoObjectAttr {
    PyObject_HEAD
    PyObject *name;
    dpiObjectAttr *handle;
    dpiOracleTypeNum oracleTypeNum;
    cxoTransformNum transformNum;
    cxoObjectType *objectType;
    cxoDbType *dbType;
};

struct cxoObjectType {
    PyObject_HEAD
    dpiObjectType *handle;
    PyObject *schema;
    PyObject *name;
    PyObject *attributes;
    PyObject *attributesByName;
    cxoConnection *connection;
    dpiOracleTypeNum elementOracleTypeNum;
    cxoTransformNum elementTransformNum;
    cxoObjectType *elementObjectType;
    cxoDbType *elementDbType;
    char isCollection;
};

struct cxoQueue {
    PyObject_HEAD
    cxoConnection *conn;
    dpiQueue *handle;
    PyObject *name;
    PyObject *deqOptions;
    PyObject *enqOptions;
    cxoObjectType *payloadType;
};

struct cxoSessionPool {
    PyObject_HEAD
    dpiPool *handle;
    uint32_t minSessions;
    uint32_t maxSessions;
    uint32_t sessionIncrement;
    uint32_t cacheSize;
    dpiEncodingInfo encodingInfo;
    int homogeneous;
    int externalAuth;
    PyObject *username;
    PyObject *dsn;
    PyObject *name;
    PyObject *sessionCallback;
    PyTypeObject *connectionType;
};

struct cxoSodaCollection {
    PyObject_HEAD
    dpiSodaColl *handle;
    cxoSodaDatabase *db;
    PyObject *name;
};

struct cxoSodaDatabase {
    PyObject_HEAD
    dpiSodaDb *handle;
    cxoConnection *connection;
};

struct cxoSodaDoc {
    PyObject_HEAD
    cxoSodaDatabase *db;
    dpiSodaDoc *handle;
};

struct cxoSodaDocCursor {
    PyObject_HEAD
    cxoSodaDatabase *db;
    dpiSodaDocCursor *handle;
};

struct cxoSodaOperation {
    PyObject_HEAD
    cxoSodaCollection *coll;
    dpiSodaOperOptions options;
    uint32_t numKeyBuffers;
    cxoBuffer *keyBuffers;
    cxoBuffer keyBuffer;
    cxoBuffer versionBuffer;
    cxoBuffer filterBuffer;
};


struct cxoSubscr {
    PyObject_HEAD
    dpiSubscr *handle;
    cxoConnection *connection;
    PyObject *callback;
    uint32_t namespace;
    PyObject *name;
    uint32_t protocol;
    PyObject *ipAddress;
    uint32_t port;
    uint32_t timeout;
    uint32_t operations;
    uint32_t qos;
    uint8_t groupingClass;
    uint32_t groupingValue;
    uint8_t groupingType;
    uint64_t id;
};

struct cxoVar {
    PyObject_HEAD
    dpiVar *handle;
    dpiData *data;
    cxoConnection *connection;
    PyObject *inConverter;
    PyObject *outConverter;
    cxoObjectType *objectType;
    const char *encodingErrors;
    uint32_t allocatedElements;
    uint32_t size;
    uint32_t bufferSize;
    int isArray;
    int isValueSet;
    int getReturnedData;
    cxoTransformNum transformNum;
    dpiNativeTypeNum nativeTypeNum;
    cxoDbType *dbType;
};


//-----------------------------------------------------------------------------
// Functions
//-----------------------------------------------------------------------------
int cxoBuffer_fromObject(cxoBuffer *buf, PyObject *obj, const char *encoding);
int cxoBuffer_init(cxoBuffer *buf);

int cxoConnection_getSodaFlags(cxoConnection *conn, uint32_t *flags);
int cxoConnection_isConnected(cxoConnection *conn);

int cxoCursor_performBind(cxoCursor *cursor);
int cxoCursor_setBindVariables(cxoCursor *cursor, PyObject *parameters,
        unsigned numElements, unsigned arrayPos, int deferTypeAssignment);

cxoDbType *cxoDbType_fromDataTypeInfo(dpiDataTypeInfo *info);
cxoDbType *cxoDbType_fromTransformNum(cxoTransformNum transformNum);

cxoDeqOptions *cxoDeqOptions_new(cxoConnection *connection,
        dpiDeqOptions *handle);

cxoEnqOptions *cxoEnqOptions_new(cxoConnection *connection,
        dpiEnqOptions *handle);

cxoError *cxoError_newFromInfo(dpiErrorInfo *errorInfo);
int cxoError_raiseAndReturnInt(void);
PyObject *cxoError_raiseAndReturnNull(void);
int cxoError_raiseFromInfo(dpiErrorInfo *errorInfo);
PyObject *cxoError_raiseFromString(PyObject *exceptionType,
        const char *message);

void cxoJsonBuffer_free(cxoJsonBuffer *buf);
int cxoJsonBuffer_fromObject(cxoJsonBuffer *buf, PyObject *obj);

PyObject *cxoLob_new(cxoConnection *connection, cxoDbType *dbType,
        dpiLob *handle);

cxoMsgProps *cxoMsgProps_new(cxoConnection*, dpiMsgProps *handle);

int cxoObject_internalExtend(cxoObject *obj, PyObject *sequence);
PyObject *cxoObject_new(cxoObjectType *objectType, dpiObject *handle);

cxoObjectAttr *cxoObjectAttr_new(cxoConnection *connection,
        dpiObjectAttr *handle);

cxoObjectType *cxoObjectType_new(cxoConnection *connection,
        dpiObjectType *handle);
cxoObjectType *cxoObjectType_newByName(cxoConnection *connection,
        PyObject *name);

cxoQueue *cxoQueue_new(cxoConnection *conn, dpiQueue *handle);

cxoSodaCollection *cxoSodaCollection_new(cxoSodaDatabase *db,
        dpiSodaColl *handle);

cxoSodaDatabase *cxoSodaDatabase_new(cxoConnection *connection);

cxoSodaDoc *cxoSodaDoc_new(cxoSodaDatabase *db, dpiSodaDoc *handle);

cxoSodaDocCursor *cxoSodaDocCursor_new(cxoSodaDatabase *db,
        dpiSodaDocCursor *handle);

cxoSodaOperation *cxoSodaOperation_new(cxoSodaCollection *collection);

void cxoSubscr_callback(cxoSubscr *subscr, dpiSubscrMessage *message);

PyObject *cxoTransform_dateFromTicks(PyObject *args);
int cxoTransform_fromPython(cxoTransformNum transformNum,
        dpiNativeTypeNum *nativeTypeNum, PyObject *pyValue,
        dpiDataBuffer *dbValue, cxoBuffer *buffer, const char *encoding,
        const char *nencoding, cxoVar *var, uint32_t arrayPos);
uint32_t cxoTransform_getDefaultSize(cxoTransformNum transformNum);
cxoTransformNum cxoTransform_getNumFromDataTypeInfo(dpiDataTypeInfo *info);
cxoTransformNum cxoTransform_getNumFromPythonValue(PyObject *value,
        int plsql);
int cxoTransform_getNumFromType(PyObject *type, cxoTransformNum *transformNum,
        cxoObjectType **objType);
int cxoTransform_getNumFromValue(PyObject *value, int *isArray,
        Py_ssize_t *size, Py_ssize_t *numElements, int plsql,
        cxoTransformNum *transformNum);
void cxoTransform_getTypeInfo(cxoTransformNum transformNum,
        dpiOracleTypeNum *oracleTypeNum, dpiNativeTypeNum *nativeTypeNum);
int cxoTransform_init(void);
PyObject *cxoTransform_timestampFromTicks(PyObject *args);
PyObject *cxoTransform_toPython(cxoTransformNum transformNum, 
        cxoConnection *connection, cxoObjectType *objType,
        dpiDataBuffer *dbValue, const char *encodingErrors);

PyObject *cxoUtils_convertOciAttrToPythonValue(unsigned attrType,
        dpiDataBuffer *value, uint32_t valueLength, const char *encoding);
int cxoUtils_convertPythonValueToOciAttr(PyObject *value, unsigned attrType,
        cxoBuffer *buffer, dpiDataBuffer *ociBuffer, void **ociValue,
        uint32_t *ociValueLength, const char *encoding);
PyObject *cxoUtils_formatString(const char *format, PyObject *args);
const char *cxoUtils_getAdjustedEncoding(const char *encoding);
int cxoUtils_getBooleanValue(PyObject *obj, int defaultValue, int *value);
int cxoUtils_getModuleAndName(PyTypeObject *type, PyObject **module,
        PyObject **name);
int cxoUtils_initializeDPI(dpiContextCreateParams *params);
int cxoUtils_processJsonArg(PyObject *arg, cxoBuffer *buffer);
int cxoUtils_processSodaDocArg(cxoSodaDatabase *db, PyObject *arg,
        dpiSodaDoc **handle);

int cxoVar_bind(cxoVar *var, cxoCursor *cursor, PyObject *name, uint32_t pos);
int cxoVar_check(PyObject *object);
PyObject *cxoVar_getSingleValue(cxoVar *var, dpiData *data, uint32_t arrayPos);
PyObject *cxoVar_getValue(cxoVar *var, uint32_t arrayPos);
cxoVar *cxoVar_new(cxoCursor *cursor, Py_ssize_t numElements,
        cxoTransformNum transformNum, Py_ssize_t size, int isArray,
        cxoObjectType *objType);
cxoVar *cxoVar_newByType(cxoCursor *cursor, PyObject *value,
        uint32_t numElements);
cxoVar *cxoVar_newByValue(cxoCursor *cursor, PyObject *value,
        Py_ssize_t numElements);
int cxoVar_setValue(cxoVar *var, uint32_t arrayPos, PyObject *value);