summaryrefslogtreecommitdiff
path: root/gcsdk/steamextra/gamecoordinator/igcsqlresultsetlist.h
blob: ced12f2f282fe015e60d28228cd64245adec33d0 (plain) (blame)
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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================

#ifndef IGCSQLRESULTSETLIST_H
#define IGCSQLRESULTSETLIST_H
#ifdef _WIN32
#pragma once
#endif

#include "igcsqlquery.h"

enum EGCSQLError
{
	k_EGCSQLErrorNone = 0,
	k_EGCSQLErrorUnknown,
	k_EGCSQLErrorBacklog,
	k_EGCSQLErrorBadQueryParameters,
	k_EGCSQLErrorConnectionError,
	k_EGCSQLErrorDataTruncated,
	k_EGCSQLErrorDeadlockLoser,
	k_EGCSQLErrorDuplicateKey,
	k_EGCSQLErrorGenericError,
	k_EGCSQLErrorNoResultSet,
	k_EGCSQLErrorSyntaxError,
	k_EGCSQLErrorTableOrViewNotFound,
	k_EGCSQLErrorTimeout,
	k_EGCSQLErrorConstraintViolation,
	k_EGCSQLErrorNumericValueOutOfRange,
	k_EGCSQLErrorRollbackFailed,
	k_EGCSQLErrorColumnNotFound,
};


class IGCSQLResultSet
{
public:
	virtual uint32 GetColumnCount() = 0;
	virtual EGCSQLType GetColumnType( uint32 nColumn ) = 0;
	virtual const char *GetColumnName( uint32 nColumn ) = 0;

	virtual uint32 GetRowCount() = 0;
	virtual bool GetData( uint32 unRow, uint32 unColumn, uint8 **ppData, uint32 *punSize ) = 0;
};


class IGCSQLResultSetList
{
public:
	virtual EGCSQLError GetError() = 0;
	virtual uint32 GetResultSetCount() = 0;
	virtual IGCSQLResultSet *GetResultSet( uint32 nResultSetIndex ) = 0;
	virtual uint32 GetRowsAffected( uint32 unWhichStatement ) = 0;
	virtual void Destroy() = 0;
	virtual const char *GetErrorText() = 0;
};


#endif // IGCSQLRESULTSETLIST_H