VisualIB
1.0
IBExpress library for making use of Borland IBExpress outside of C++Builder
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
classVIBSQL.h
Go to the documentation of this file.
1
7
#ifndef CLASSVIBSQL_H__
8
#define CLASSVIBSQL_H__
9
10
#include "../vibsql.h"
11
#include "
VIBProperties.h
"
12
13
struct
VIBDatabase
;
14
struct
VIBTransaction
;
15
16
namespace
VIB
17
{
18
class
Database;
19
class
Transaction;
20
25
class
SQL
26
{
27
protected
:
28
VIBSQL
*
vsql
;
29
30
public
:
36
SQL
(
VIBSQL
*pvsql = NULL);
40
virtual
~SQL
();
41
50
int
Call
(
int
ErrCode,
bool
RaiseError);
55
void
CheckClosed
();
60
void
CheckOpen
();
65
void
CheckValidStatement
();
70
void
Close
();
75
void
ExecQuery
();
80
void
FreeHandle
();
85
void
Prepare
();
91
int
FieldIndex
(
const
std::string &FieldName);
92
94
std::string
GetUniqueRelationName
();
95
96
// Property classes
97
102
class
SQLClass
103
{
104
protected
:
105
SQL
*
parent
;
106
public
:
111
SQLClass
(
SQL
*pParent);
112
120
Property<std::string>
Text
;
121
};
122
friend
class
SQLClass
;
123
124
// Class for individual properties
125
class
ParamsSetClass
;
126
130
class
ParamClass
131
{
132
protected
:
133
friend
ParamsSetClass
;
134
std::string
name
;
135
SQL
*
parent
;
136
public
:
141
ParamClass
(
SQL
*pParent);
142
143
Property<std::string>
AsString
;
144
Property<bool>
IsNull
;
145
Property<int>
SQLType
;
146
};
147
friend
class
ParamClass
;
148
153
class
ParamsSetClass
154
{
155
protected
:
156
SQL
*
parent
;
157
ParamClass
pc
;
158
public
:
163
ParamsSetClass
(
SQL
*pParent) :
parent
(pParent),
pc
(pParent) {}
164
170
ParamClass
*
ByName
(
const
std::string &name);
171
};
172
173
protected
:
174
// Property instances
175
SQLClass
sc
;
176
ParamsSetClass
psc
;
177
178
public
:
179
// Properties
185
Property<bool>
Bof
;
193
Property<VIBDatabase *>
Database
;
200
Property<void ***>
DBHandle
;
207
Property<bool>
Eof
;
212
Property<bool>
GenerateParamNames
;
218
Property<bool>
GoToFirstRecordOnExecute
;
224
Property<void **>
Handle
;
230
Property<bool>
Open
;
238
Property<bool>
ParamCheck
;
243
Property<ParamsSetClass *>
Params
;
248
Property<std::string>
Plan
;
254
Property<bool>
Prepared
;
261
Property<int>
RecordCount
;
267
Property<int>
RowsAffected
;
275
Property<SQLClass *>
_SQL
;
// NB: Not same name as in C++Builder!
281
Property<VIBSQLTypes>
SQLType
;
289
Property<VIBTransaction *>
Transaction
;
296
Property<void ***>
TRHandle
;
303
Property<std::string>
UniqueRelationName
;
304
};
305
}
306
307
#endif
308
309
// EOF
310
VIB
classVIBSQL.h
Generated on Thu Jun 20 2013 10:46:26 for VisualIB by
1.8.2