1//
2// Binder.h
3//
4// Definition of the Binder class.
5//
6// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
7// and Contributors.
8//
9// SPDX-License-Identifier: BSL-1.0
10//
11
12
13#ifndef SQL_Test_Binder_INCLUDED
14#define SQL_Test_Binder_INCLUDED
15
16
17#include "Poco/SQL/AbstractBinder.h"
18
19
20namespace Poco {
21namespace SQL {
22namespace Test {
23
24
25class Binder: public Poco::SQL::AbstractBinder
26 /// A no-op implementation of AbstractBinder for testing.
27{
28public:
29 Binder();
30 /// Creates the Binder.
31
32 ~Binder();
33 /// Destroys the Binder.
34
35 void bind(std::size_t pos, const Poco::Int8 &val, Direction dir, const WhenNullCb& cb);
36 /// Binds an Int8.
37
38 void bind(std::size_t pos, const Poco::UInt8 &val, Direction dir, const WhenNullCb& cb);
39 /// Binds an UInt8.
40
41 void bind(std::size_t pos, const Poco::Int16 &val, Direction dir, const WhenNullCb& cb);
42 /// Binds an Int16.
43
44 void bind(std::size_t pos, const Poco::UInt16 &val, Direction dir, const WhenNullCb& cb);
45 /// Binds an UInt16.
46
47 void bind(std::size_t pos, const Poco::Int32 &val, Direction dir, const WhenNullCb& cb);
48 /// Binds an Int32.
49
50 void bind(std::size_t pos, const Poco::UInt32 &val, Direction dir, const WhenNullCb& cb);
51 /// Binds an UInt32.
52
53 void bind(std::size_t pos, const Poco::Int64 &val, Direction dir, const WhenNullCb& cb);
54 /// Binds an Int64.
55
56 void bind(std::size_t pos, const Poco::UInt64 &val, Direction dir, const WhenNullCb& cb);
57 /// Binds an UInt64.
58
59#ifndef POCO_LONG_IS_64_BIT
60 void bind(std::size_t pos, const long& val, Direction dir, const WhenNullCb& cb);
61 /// Binds a long.
62
63 void bind(std::size_t pos, const unsigned long& val, Direction dir, const WhenNullCb& cb);
64 /// Binds an unsigned long.
65#endif
66
67 void bind(std::size_t pos, const bool &val, Direction dir, const WhenNullCb& cb);
68 /// Binds a boolean.
69
70 void bind(std::size_t pos, const float &val, Direction dir, const WhenNullCb& cb);
71 /// Binds a float.
72
73 void bind(std::size_t pos, const double &val, Direction dir, const WhenNullCb& cb);
74 /// Binds a double.
75
76 void bind(std::size_t pos, const char &val, Direction dir, const WhenNullCb& cb);
77 /// Binds a single character.
78
79 void bind(std::size_t pos, const char* const &pVal, Direction dir, const WhenNullCb& cb);
80 /// Binds a const char ptr.
81
82 void bind(std::size_t pos, const std::string& val, Direction dir, const WhenNullCb& cb);
83 /// Binds a string.
84
85 void bind(std::size_t pos, const Poco::UTF16String& val, Direction dir, const WhenNullCb& cb);
86 /// Binds a UTF16String.
87
88 void bind(std::size_t pos, const BLOB& val, Direction dir, const WhenNullCb& cb);
89 /// Binds a BLOB.
90
91 void bind(std::size_t pos, const CLOB& val, Direction dir, const WhenNullCb& cb);
92 /// Binds a CLOB.
93
94 void bind(std::size_t pos, const Date& val, Direction dir, const WhenNullCb& cb);
95 /// Binds a Date.
96
97 void bind(std::size_t pos, const Time& val, Direction dir, const WhenNullCb& cb);
98 /// Binds a Time.
99
100 void bind(std::size_t pos, const DateTime& val, Direction dir, const WhenNullCb& cb);
101 /// Binds a DateTime.
102
103 void bind(std::size_t pos, const NullData& val, Direction dir, const std::type_info& bindType);
104 /// Binds a DateTime.
105
106 void reset();
107};
108
109
110} } } // namespace Poco::SQL::Test
111
112
113#endif // Data_Test_Binder_INCLUDED
114