forked from pocoproject/poco
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStatementImpl.h
More file actions
executable file
·93 lines (66 loc) · 1.73 KB
/
StatementImpl.h
File metadata and controls
executable file
·93 lines (66 loc) · 1.73 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//
// StatementImpl.h
//
// $Id: //poco/Main/Data/testsuite/src/StatementImpl.h#2 $
//
// Definition of the StatementImpl class.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Data_Test_StatementImpl_INCLUDED
#define Data_Test_StatementImpl_INCLUDED
#include "Poco/Data/StatementImpl.h"
#include "Poco/SharedPtr.h"
#include "Binder.h"
#include "Extractor.h"
#include "Preparator.h"
struct sqlite3;
struct sqlite3_stmt;
namespace Poco {
namespace Data {
namespace Test {
class StatementImpl: public Poco::Data::StatementImpl
/// A no-op implementation of StatementImpl for testing.
{
public:
StatementImpl();
/// Creates the StatementImpl.
~StatementImpl();
/// Destroys the StatementImpl.
protected:
bool hasNext();
/// Returns true if a call to next() will return data.
void next();
/// Retrieves the next row from the resultset.
/// Will throw, if the resultset is empty.
bool canBind() const;
/// Returns true if a valid statement is set and we can bind.
void compileImpl();
/// Compiles the statement, doesn't bind yet
void bindImpl();
/// Binds parameters
AbstractExtractor& extractor();
/// Returns the concrete extractor used by the statement.
AbstractBinder& binder();
/// Returns the concrete binder used by the statement.
private:
Poco::SharedPtr<Binder> _ptrBinder;
Poco::SharedPtr<Extractor> _ptrExtractor;
Poco::SharedPtr<Preparation> _ptrPrepare;
};
//
// inlines
//
inline AbstractExtractor& StatementImpl::extractor()
{
return *_ptrExtractor;
}
inline AbstractBinder& StatementImpl::binder()
{
return *_ptrBinder;
}
} } } // namespace Poco::Data::Test
#endif // Data_Test_StatementImpl_INCLUDED