VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
SQL
vtkSQLiteQuery.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkSQLiteQuery.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
15
/*-------------------------------------------------------------------------
16
Copyright 2008 Sandia Corporation.
17
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18
the U.S. Government retains certain rights in this software.
19
-------------------------------------------------------------------------*/
43
#ifndef __vtkSQLiteQuery_h
44
#define __vtkSQLiteQuery_h
45
46
#include "vtkIOSQLModule.h"
// For export macro
47
#include "
vtkSQLQuery.h
"
48
49
class
vtkSQLiteDatabase
;
50
class
vtkVariant
;
51
class
vtkVariantArray
;
52
struct
vtk_sqlite3_stmt;
53
54
class
VTKIOSQL_EXPORT
vtkSQLiteQuery
:
public
vtkSQLQuery
55
{
56
//BTX
57
friend
class
vtkSQLiteDatabase
;
58
//ETX
59
60
public
:
61
vtkTypeMacro(
vtkSQLiteQuery
,
vtkSQLQuery
);
62
void
PrintSelf
(ostream& os,
vtkIndent
indent);
63
static
vtkSQLiteQuery
*
New
();
64
67
bool
SetQuery
(
const
char
*query);
68
71
bool
Execute
();
72
74
int
GetNumberOfFields
();
75
77
const
char
*
GetFieldName
(
int
i);
78
81
int
GetFieldType
(
int
i);
82
84
bool
NextRow
();
85
87
bool
HasError
();
88
90
91
bool
BeginTransaction
();
92
bool
RollbackTransaction
();
93
bool
CommitTransaction
();
95
97
vtkVariant
DataValue
(
vtkIdType
c);
98
100
const
char
*
GetLastErrorText
();
101
103
108
using
vtkSQLQuery::BindParameter
;
109
bool
BindParameter
(
int
index
,
unsigned
char
value
);
110
bool
BindParameter
(
int
index
,
signed
char
value
);
111
bool
BindParameter
(
int
index
,
unsigned
short
value
);
112
bool
BindParameter
(
int
index
,
short
value
);
113
bool
BindParameter
(
int
index
,
unsigned
int
value
);
114
//ETX
115
bool
BindParameter
(
int
index
,
int
value
);
116
//BTX
117
bool
BindParameter
(
int
index
,
unsigned
long
value
);
118
bool
BindParameter
(
int
index
,
long
value
);
119
bool
BindParameter
(
int
index
, vtkTypeUInt64
value
);
120
bool
BindParameter
(
int
index
, vtkTypeInt64
value
);
121
//ETX
122
bool
BindParameter
(
int
index
,
float
value
);
123
bool
BindParameter
(
int
index
,
double
value
);
125
126
bool
BindParameter
(
int
index
,
const
char
*stringValue);
128
129
bool
BindParameter
(
int
index
,
const
char
*stringValue,
size_t
length
);
130
//BTX
131
bool
BindParameter
(
int
index
,
const
vtkStdString
&
string
);
132
//ETX
133
bool
BindParameter
(
int
index
,
vtkVariant
value
);
135
136
138
bool
BindParameter
(
int
index
,
const
void
*
data
,
size_t
length
);
139
bool
ClearParameterBindings
();
141
142
protected
:
143
vtkSQLiteQuery
();
144
~
vtkSQLiteQuery
();
145
146
vtkSetStringMacro(LastErrorText);
147
148
private
:
149
vtkSQLiteQuery
(
const
vtkSQLiteQuery
&);
// Not implemented.
150
void
operator=(
const
vtkSQLiteQuery
&);
// Not implemented.
151
152
vtk_sqlite3_stmt *Statement;
153
bool
InitialFetch;
154
int
InitialFetchResult;
155
char
*LastErrorText;
156
bool
TransactionInProgress;
157
159
161
bool
BindIntegerParameter(
int
index
,
int
value
);
162
bool
BindDoubleParameter(
int
index
,
double
value
);
163
bool
BindInt64Parameter(
int
index
, vtkTypeInt64
value
);
164
bool
BindStringParameter(
int
index
,
const
char
*
data
,
int
length
);
165
bool
BindBlobParameter(
int
index
,
const
void
*
data
,
int
length
);
167
168
};
169
170
#endif // __vtkSQLiteQuery_h
171
Generated on Thu May 24 2012 22:22:32 for VTK by
1.8.1