-
Notifications
You must be signed in to change notification settings - Fork 1
/
DescRecord.h
123 lines (107 loc) · 2.99 KB
/
DescRecord.h
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
/*
*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* https://www.firebirdsql.org/en/initial-developer-s-public-license-version-1-0/
*
* Software distributed under the License is distributed on
* an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
* express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
*
* The Original Code was created by James A. Starkey for IBPhoenix.
*
* Copyright (c) 1999, 2000, 2001 James A. Starkey
* All Rights Reserved.
*/
// DescRecord.h: interface for the DescRecord class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(_DESCRECORD_H_)
#define _DESCRECORD_H_
#include "OdbcConvert.h"
namespace OdbcJdbcLibrary {
using namespace IscDbcLibrary;
class DescRecord
{
public:
DescRecord();
~DescRecord();
void setDefault(DescRecord *recTo);
bool operator =(DescRecord *rec);
void initZeroColumn();
void allocateLocalDataPtr(int length = 0);
void releaseAllocMemory();
void freeLocalDataPtr();
void beginBlobDataTransfer();
void putBlobSegmentData (int length, const void *bytes);
void endBlobDataTransfer();
void setNull()
{
if ( indicatorPtr )
*(short*)indicatorPtr = -1;
}
int getBufferLength()
{
return ( octetLength + 1 ) * headSqlVarPtr->getSqlMultiple();
}
public:
bool isDefined;
bool isPrepared;
bool isIndicatorSqlDa;
bool isZeroColumn;
bool isLocalDataPtr; // use sqlPutData for set data_at_exec
char *localDataPtr;
SQLSMALLINT callType; // use sqlGetData
int isBlobOrArray;
bool data_at_exec;
bool startedTransfer;
int sizeColumnExtendedFetch;
SQLINTEGER dataOffset;
long currentFetched;
bool startedReturnSQLData;
HeadSqlVar *headSqlVarPtr;
Blob *dataBlobPtr; // for blob or array
SQLSMALLINT type;
SQLSMALLINT datetimeIntervalCode;
SQLSMALLINT conciseType;
SQLINTEGER autoUniqueValue;
JString baseColumnName;
JString baseTableName;
SQLINTEGER caseSensitive;
JString catalogName;
SQLINTEGER datetimeIntervalPrecision;
SQLINTEGER displaySize;
SQLSMALLINT fixedPrecScale;
SQLINTEGER numPrecRadix;
JString label;
SQLUINTEGER length;
JString literalPrefix;
JString literalSuffix;
JString localTypeName;
JString name;
SQLSMALLINT nullable;
SQLINTEGER octetLength;
SQLLEN *octetLengthPtr;
SQLSMALLINT parameterType;
SQLSMALLINT precision;
SQLSMALLINT scale;
JString schemaName;
SQLSMALLINT searchable;
JString tableName;
JString typeName;
SQLSMALLINT unSigned;
SQLSMALLINT updaTable;
SQLLEN *indicatorPtr;
SQLSMALLINT unNamed;
SQLPOINTER dataPtr;
WCSTOMBS WcsToMbs;
MBSTOWCS MbsToWcs;
public:
ADRESS_FUNCTION fnConv;
};
}; // end namespace OdbcJdbcLibrary
#endif // !defined(_DESCRECORD_H_)