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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#ifndef IGCSQLQUERY_H
#define IGCSQLQUERY_H
#ifdef _WIN32
#pragma once
#endif
// the type of the parameter
enum EGCSQLType
{
k_EGCSQLTypeInvalid = -1,
// Variable length types
k_EGCSQLType_Blob,
k_EGCSQLType_String,
// fixed length types
k_EGCSQLType_int8, // also uint8
k_EGCSQLType_int16, // also uint16
k_EGCSQLType_int32, // also uint32
k_EGCSQLType_int64, // also uint64
k_EGCSQLType_float,
k_EGCSQLType_double,
k_EGCSQLType_Binary, // raw binary data of fixed size (i.e. a C struct).
k_EGCSQLType_Image,
k_EGCSQLType_bool,
};
class IGCSQLResultSetList;
class IGCSQLQuery
{
protected:
// call Destroy() instead of deleting this object directly
virtual ~IGCSQLQuery() {}
public:
// returns the number of statements in the transaction
// represented by this query object
virtual uint32 GetStatementCount() = 0;
// returns a string that represents where in the GC this
// query came from. Usually this is FILE_AND_LINE.
virtual const char *PchName() = 0;
// get the null-terminated query string itself
virtual const char *PchCommand( uint32 unStatement ) = 0;
// gets the parameter data
virtual uint32 CnParams( uint32 unStatement ) = 0;
virtual EGCSQLType EParamType( uint32 unStatement, uint32 uIndex ) = 0;
virtual byte *PubParam( uint32 unStatement, uint32 uIndex ) = 0;
virtual uint32 CubParam( uint32 unStatement, uint32 uIndex ) = 0;
// reports the result
virtual void SetResults( IGCSQLResultSetList *pResults ) = 0;
};
#endif // IGCSQLQUERY_H
|