VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
ODBC
vtkODBCQuery.h
Go to the documentation of this file.
1
/* -*- Mode: C++; -*- */
2
/*=========================================================================
3
4
Program: Visualization Toolkit
5
Module: vtkODBCQuery.h
6
7
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
8
All rights reserved.
9
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10
11
This software is distributed WITHOUT ANY WARRANTY; without even
12
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13
PURPOSE. See the above copyright notice for more information.
14
15
=========================================================================*/
16
/*-------------------------------------------------------------------------
17
Copyright 2008 Sandia Corporation.
18
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
19
the U.S. Government retains certain rights in this software.
20
-------------------------------------------------------------------------*/
21
35
#ifndef __vtkODBCQuery_h
36
#define __vtkODBCQuery_h
37
38
#include "vtkIOODBCModule.h"
// For export macro
39
#include "
vtkSQLQuery.h
"
40
41
class
vtkODBCDatabase
;
42
class
vtkVariant
;
43
class
vtkVariantArray
;
44
class
vtkODBCInternals
;
45
class
vtkODBCQueryInternals;
46
47
class
VTKIOODBC_EXPORT
vtkODBCQuery
:
public
vtkSQLQuery
48
{
49
//BTX
50
friend
class
vtkODBCDatabase
;
51
//ETX
52
53
public
:
54
vtkTypeMacro(
vtkODBCQuery
,
vtkSQLQuery
);
55
void
PrintSelf
(ostream& os,
vtkIndent
indent);
56
static
vtkODBCQuery
*
New
();
57
60
bool
Execute
();
61
63
int
GetNumberOfFields
();
64
66
const
char
*
GetFieldName
(
int
i);
67
70
int
GetFieldType
(
int
i);
71
73
bool
NextRow
();
74
76
bool
HasError
();
77
79
vtkVariant
DataValue
(
vtkIdType
c);
80
82
const
char
*
GetLastErrorText
();
83
85
86
bool
BeginTransaction
();
87
bool
CommitTransaction
();
88
bool
RollbackTransaction
();
90
92
95
bool
SetQuery
(
const
char
*queryString);
96
const
char
*
GetQuery
();
98
100
105
using
vtkSQLQuery::BindParameter
;
106
bool
BindParameter
(
int
index
,
unsigned
char
value
);
107
bool
BindParameter
(
int
index
,
signed
char
value
);
108
bool
BindParameter
(
int
index
,
unsigned
short
value
);
109
bool
BindParameter
(
int
index
,
signed
short
value
);
110
bool
BindParameter
(
int
index
,
unsigned
int
value
);
111
//ETX
112
bool
BindParameter
(
int
index
,
int
value
);
113
//BTX
114
bool
BindParameter
(
int
index
,
unsigned
long
value
);
115
bool
BindParameter
(
int
index
,
signed
long
value
);
116
bool
BindParameter
(
int
index
, vtkTypeUInt64
value
);
117
bool
BindParameter
(
int
index
, vtkTypeInt64
value
);
118
//ETX
119
bool
BindParameter
(
int
index
,
float
value
);
120
bool
BindParameter
(
int
index
,
double
value
);
122
123
bool
BindParameter
(
int
index
,
const
char
*stringValue);
125
126
bool
BindParameter
(
int
index
,
const
char
*stringValue,
size_t
length
);
127
bool
BindParameter
(
int
index
,
const
vtkStdString
&
string
);
129
130
132
bool
BindParameter
(
int
index
,
const
void
*
data
,
size_t
length
);
133
bool
ClearParameterBindings
();
135
136
protected
:
137
vtkODBCQuery
();
138
~
vtkODBCQuery
();
139
140
vtkSetStringMacro(LastErrorText);
141
vtkSetStringMacro(QueryText);
142
vtkGetStringMacro
(QueryText);
143
144
char
*
QueryText
;
145
146
private
:
147
vtkODBCQuery
(
const
vtkODBCQuery
&);
// Not implemented.
148
void
operator=(
const
vtkODBCQuery
&);
// Not implemented.
149
150
void
ClearCurrentRow();
151
bool
CacheCurrentRow();
152
153
bool
CacheTimeColumn(
int
column);
154
bool
CacheIntervalColumn(
int
column);
155
bool
CacheCharColumn(
int
column);
156
bool
CacheLongLongColumn(
int
column);
157
bool
CacheBinaryColumn(
int
column);
158
bool
CacheBooleanColumn(
int
column);
159
bool
CacheStringColumn(
int
column);
160
bool
CacheWideStringColumn(
int
column);
161
bool
CacheDecimalColumn(
int
column);
162
bool
CacheNumericColumn(
int
column);
163
bool
CacheIntColumn(
int
column);
164
bool
CacheFloatColumn(
int
column);
165
bool
CacheDoubleColumn(
int
column);
166
167
vtkODBCQueryInternals *Internals;
168
bool
InitialFetch;
169
char
*LastErrorText;
170
};
171
172
#endif // __vtkODBCQuery_h
173
Generated on Thu May 24 2012 22:22:32 for VTK by
1.8.1