1 | // |
2 | // AbstractBinder.cpp |
3 | // |
4 | // Library: SQL |
5 | // Package: SQLCore |
6 | // Module: AbstractBinder |
7 | // |
8 | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. |
9 | // and Contributors. |
10 | // |
11 | // SPDX-License-Identifier: BSL-1.0 |
12 | // |
13 | |
14 | |
15 | #include "Poco/SQL/AbstractBinder.h" |
16 | #include "Poco/SQL/Date.h" |
17 | #include "Poco/SQL/Time.h" |
18 | #include "Poco/SQL/LOB.h" |
19 | #include "Poco/SQL/SQLException.h" |
20 | #include "Poco/DateTime.h" |
21 | #include "Poco/Any.h" |
22 | #include "Poco/Dynamic/Var.h" |
23 | |
24 | |
25 | namespace Poco { |
26 | namespace SQL { |
27 | |
28 | |
29 | AbstractBinder::AbstractBinder() |
30 | { |
31 | } |
32 | |
33 | |
34 | AbstractBinder::~AbstractBinder() |
35 | { |
36 | } |
37 | |
38 | |
39 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Poco::Int8>& /*val*/, Direction /*dir*/) |
40 | { |
41 | throw NotImplementedException("std::vector binder must be implemented." ); |
42 | } |
43 | |
44 | |
45 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Poco::Int8>& /*val*/, Direction /*dir*/) |
46 | { |
47 | throw NotImplementedException("std::deque binder must be implemented." ); |
48 | } |
49 | |
50 | |
51 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Poco::Int8>& /*val*/, Direction /*dir*/) |
52 | { |
53 | throw NotImplementedException("std::list binder must be implemented." ); |
54 | } |
55 | |
56 | |
57 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<Poco::Int8> >& /*val*/, Direction /*dir*/) |
58 | { |
59 | throw NotImplementedException("std::vector binder must be implemented." ); |
60 | } |
61 | |
62 | |
63 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<Poco::Int8> >& /*val*/, Direction /*dir*/) |
64 | { |
65 | throw NotImplementedException("std::deque binder must be implemented." ); |
66 | } |
67 | |
68 | |
69 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<Poco::Int8> >& /*val*/, Direction /*dir*/) |
70 | { |
71 | throw NotImplementedException("std::list binder must be implemented." ); |
72 | } |
73 | |
74 | |
75 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Poco::UInt8>& /*val*/, Direction /*dir*/) |
76 | { |
77 | throw NotImplementedException("std::vector binder must be implemented." ); |
78 | } |
79 | |
80 | |
81 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Poco::UInt8>& /*val*/, Direction /*dir*/) |
82 | { |
83 | throw NotImplementedException("std::deque binder must be implemented." ); |
84 | } |
85 | |
86 | |
87 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Poco::UInt8>& /*val*/, Direction /*dir*/) |
88 | { |
89 | throw NotImplementedException("std::list binder must be implemented." ); |
90 | } |
91 | |
92 | |
93 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<Poco::UInt8> >& /*val*/, Direction /*dir*/) |
94 | { |
95 | throw NotImplementedException("std::vector binder must be implemented." ); |
96 | } |
97 | |
98 | |
99 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<Poco::UInt8> >& /*val*/, Direction /*dir*/) |
100 | { |
101 | throw NotImplementedException("std::deque binder must be implemented." ); |
102 | } |
103 | |
104 | |
105 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<Poco::UInt8> >& /*val*/, Direction /*dir*/) |
106 | { |
107 | throw NotImplementedException("std::list binder must be implemented." ); |
108 | } |
109 | |
110 | |
111 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Poco::Int16>& /*val*/, Direction /*dir*/) |
112 | { |
113 | throw NotImplementedException("std::vector binder must be implemented." ); |
114 | } |
115 | |
116 | |
117 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Poco::Int16>& /*val*/, Direction /*dir*/) |
118 | { |
119 | throw NotImplementedException("std::deque binder must be implemented." ); |
120 | } |
121 | |
122 | |
123 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Poco::Int16>& /*val*/, Direction /*dir*/) |
124 | { |
125 | throw NotImplementedException("std::list binder must be implemented." ); |
126 | } |
127 | |
128 | |
129 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<Poco::Int16> >& /*val*/, Direction /*dir*/) |
130 | { |
131 | throw NotImplementedException("std::vector binder must be implemented." ); |
132 | } |
133 | |
134 | |
135 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<Poco::Int16> >& /*val*/, Direction /*dir*/) |
136 | { |
137 | throw NotImplementedException("std::deque binder must be implemented." ); |
138 | } |
139 | |
140 | |
141 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<Poco::Int16> >& /*val*/, Direction /*dir*/) |
142 | { |
143 | throw NotImplementedException("std::list binder must be implemented." ); |
144 | } |
145 | |
146 | |
147 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Poco::UInt16>& /*val*/, Direction /*dir*/) |
148 | { |
149 | throw NotImplementedException("std::vector binder must be implemented." ); |
150 | } |
151 | |
152 | |
153 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Poco::UInt16>& /*val*/, Direction /*dir*/) |
154 | { |
155 | throw NotImplementedException("std::deque binder must be implemented." ); |
156 | } |
157 | |
158 | |
159 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Poco::UInt16>& /*val*/, Direction /*dir*/) |
160 | { |
161 | throw NotImplementedException("std::list binder must be implemented." ); |
162 | } |
163 | |
164 | |
165 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<Poco::UInt16> >& /*val*/, Direction /*dir*/) |
166 | { |
167 | throw NotImplementedException("std::vector binder must be implemented." ); |
168 | } |
169 | |
170 | |
171 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<Poco::UInt16> >& /*val*/, Direction /*dir*/) |
172 | { |
173 | throw NotImplementedException("std::deque binder must be implemented." ); |
174 | } |
175 | |
176 | |
177 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<Poco::UInt16> >& /*val*/, Direction /*dir*/) |
178 | { |
179 | throw NotImplementedException("std::list binder must be implemented." ); |
180 | } |
181 | |
182 | |
183 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Poco::Int32>& /*val*/, Direction /*dir*/) |
184 | { |
185 | throw NotImplementedException("std::vector binder must be implemented." ); |
186 | } |
187 | |
188 | |
189 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Poco::Int32>& /*val*/, Direction /*dir*/) |
190 | { |
191 | throw NotImplementedException("std::deque binder must be implemented." ); |
192 | } |
193 | |
194 | |
195 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Poco::Int32>& /*val*/, Direction /*dir*/) |
196 | { |
197 | throw NotImplementedException("std::list binder must be implemented." ); |
198 | } |
199 | |
200 | |
201 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<Poco::Int32> >& /*val*/, Direction /*dir*/) |
202 | { |
203 | throw NotImplementedException("std::vector binder must be implemented." ); |
204 | } |
205 | |
206 | |
207 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<Poco::Int32> >& /*val*/, Direction /*dir*/) |
208 | { |
209 | throw NotImplementedException("std::deque binder must be implemented." ); |
210 | } |
211 | |
212 | |
213 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<Poco::Int32> >& /*val*/, Direction /*dir*/) |
214 | { |
215 | throw NotImplementedException("std::list binder must be implemented." ); |
216 | } |
217 | |
218 | |
219 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Poco::UInt32>& /*val*/, Direction /*dir*/) |
220 | { |
221 | throw NotImplementedException("std::vector binder must be implemented." ); |
222 | } |
223 | |
224 | |
225 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Poco::UInt32>& /*val*/, Direction /*dir*/) |
226 | { |
227 | throw NotImplementedException("std::deque binder must be implemented." ); |
228 | } |
229 | |
230 | |
231 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Poco::UInt32>& /*val*/, Direction /*dir*/) |
232 | { |
233 | throw NotImplementedException("std::list binder must be implemented." ); |
234 | } |
235 | |
236 | |
237 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<Poco::UInt32> >& /*val*/, Direction /*dir*/) |
238 | { |
239 | throw NotImplementedException("std::vector binder must be implemented." ); |
240 | } |
241 | |
242 | |
243 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<Poco::UInt32> >& /*val*/, Direction /*dir*/) |
244 | { |
245 | throw NotImplementedException("std::deque binder must be implemented." ); |
246 | } |
247 | |
248 | |
249 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<Poco::UInt32> >& /*val*/, Direction /*dir*/) |
250 | { |
251 | throw NotImplementedException("std::list binder must be implemented." ); |
252 | } |
253 | |
254 | |
255 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Poco::Int64>& /*val*/, Direction /*dir*/) |
256 | { |
257 | throw NotImplementedException("std::vector binder must be implemented." ); |
258 | } |
259 | |
260 | |
261 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Poco::Int64>& /*val*/, Direction /*dir*/) |
262 | { |
263 | throw NotImplementedException("std::deque binder must be implemented." ); |
264 | } |
265 | |
266 | |
267 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Poco::Int64>& /*val*/, Direction /*dir*/) |
268 | { |
269 | throw NotImplementedException("std::list binder must be implemented." ); |
270 | } |
271 | |
272 | |
273 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<Poco::Int64> >& /*val*/, Direction /*dir*/) |
274 | { |
275 | throw NotImplementedException("std::vector binder must be implemented." ); |
276 | } |
277 | |
278 | |
279 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<Poco::Int64> >& /*val*/, Direction /*dir*/) |
280 | { |
281 | throw NotImplementedException("std::deque binder must be implemented." ); |
282 | } |
283 | |
284 | |
285 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<Poco::Int64> >& /*val*/, Direction /*dir*/) |
286 | { |
287 | throw NotImplementedException("std::list binder must be implemented." ); |
288 | } |
289 | |
290 | |
291 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Poco::UInt64>& /*val*/, Direction /*dir*/) |
292 | { |
293 | throw NotImplementedException("std::vector binder must be implemented." ); |
294 | } |
295 | |
296 | |
297 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Poco::UInt64>& /*val*/, Direction /*dir*/) |
298 | { |
299 | throw NotImplementedException("std::deque binder must be implemented." ); |
300 | } |
301 | |
302 | |
303 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Poco::UInt64>& /*val*/, Direction /*dir*/) |
304 | { |
305 | throw NotImplementedException("std::list binder must be implemented." ); |
306 | } |
307 | |
308 | |
309 | void AbstractBinder::bind(std::size_t pos, const std::vector<Nullable<Poco::UInt64> >& val, Direction dir) |
310 | { |
311 | throw NotImplementedException("std::vector binder must be implemented." ); |
312 | } |
313 | |
314 | |
315 | void AbstractBinder::bind(std::size_t pos, const std::deque<Nullable<Poco::UInt64> >& val, Direction dir) |
316 | { |
317 | throw NotImplementedException("std::deque binder must be implemented." ); |
318 | } |
319 | |
320 | |
321 | void AbstractBinder::bind(std::size_t pos, const std::list<Nullable<Poco::UInt64> >& val, Direction dir) |
322 | { |
323 | throw NotImplementedException("std::list binder must be implemented." ); |
324 | } |
325 | |
326 | |
327 | #ifndef POCO_LONG_IS_64_BIT |
328 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<long>& /*val*/, Direction /*dir*/) |
329 | { |
330 | throw NotImplementedException("std::vector binder must be implemented." ); |
331 | } |
332 | |
333 | |
334 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<long>& /*val*/, Direction /*dir*/) |
335 | { |
336 | throw NotImplementedException("std::deque binder must be implemented." ); |
337 | } |
338 | |
339 | |
340 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<long>& /*val*/, Direction /*dir*/) |
341 | { |
342 | throw NotImplementedException("std::list binder must be implemented." ); |
343 | } |
344 | |
345 | |
346 | void AbstractBinder::bind(std::size_t pos, const std::vector<Nullable<long> >& val, Direction dir) |
347 | { |
348 | throw NotImplementedException("std::vector binder must be implemented." ); |
349 | } |
350 | |
351 | |
352 | void AbstractBinder::bind(std::size_t pos, const std::deque<Nullable<long> >& val, Direction dir) |
353 | { |
354 | throw NotImplementedException("std::deque binder must be implemented." ); |
355 | } |
356 | |
357 | |
358 | void AbstractBinder::bind(std::size_t pos, const std::list<Nullable<long> >& val, Direction dir) |
359 | { |
360 | throw NotImplementedException("std::list binder must be implemented." ); |
361 | } |
362 | #endif |
363 | |
364 | |
365 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<bool>& /*val*/, Direction /*dir*/) |
366 | { |
367 | throw NotImplementedException("std::vector binder must be implemented." ); |
368 | } |
369 | |
370 | |
371 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<bool>& /*val*/, Direction /*dir*/) |
372 | { |
373 | throw NotImplementedException("std::deque binder must be implemented." ); |
374 | } |
375 | |
376 | |
377 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<bool>& /*val*/, Direction /*dir*/) |
378 | { |
379 | throw NotImplementedException("std::list binder must be implemented." ); |
380 | } |
381 | |
382 | |
383 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<bool> >& /*val*/, Direction /*dir*/) |
384 | { |
385 | throw NotImplementedException("std::vector binder must be implemented." ); |
386 | } |
387 | |
388 | |
389 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<bool> >& /*val*/, Direction /*dir*/) |
390 | { |
391 | throw NotImplementedException("std::deque binder must be implemented." ); |
392 | } |
393 | |
394 | |
395 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<bool> >& /*val*/, Direction /*dir*/) |
396 | { |
397 | throw NotImplementedException("std::list binder must be implemented." ); |
398 | } |
399 | |
400 | |
401 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<float>& /*val*/, Direction /*dir*/) |
402 | { |
403 | throw NotImplementedException("std::vector binder must be implemented." ); |
404 | } |
405 | |
406 | |
407 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<float>& /*val*/, Direction /*dir*/) |
408 | { |
409 | throw NotImplementedException("std::deque binder must be implemented." ); |
410 | } |
411 | |
412 | |
413 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<float>& /*val*/, Direction /*dir*/) |
414 | { |
415 | throw NotImplementedException("std::list binder must be implemented." ); |
416 | } |
417 | |
418 | |
419 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<float> >& /*val*/, Direction /*dir*/) |
420 | { |
421 | throw NotImplementedException("std::vector binder must be implemented." ); |
422 | } |
423 | |
424 | |
425 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<float> >& /*val*/, Direction /*dir*/) |
426 | { |
427 | throw NotImplementedException("std::deque binder must be implemented." ); |
428 | } |
429 | |
430 | |
431 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<float> >& /*val*/, Direction /*dir*/) |
432 | { |
433 | throw NotImplementedException("std::list binder must be implemented." ); |
434 | } |
435 | |
436 | |
437 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<double>& /*val*/, Direction /*dir*/) |
438 | { |
439 | throw NotImplementedException("std::vector binder must be implemented." ); |
440 | } |
441 | |
442 | |
443 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<double>& /*val*/, Direction /*dir*/) |
444 | { |
445 | throw NotImplementedException("std::deque binder must be implemented." ); |
446 | } |
447 | |
448 | |
449 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<double>& /*val*/, Direction /*dir*/) |
450 | { |
451 | throw NotImplementedException("std::list binder must be implemented." ); |
452 | } |
453 | |
454 | |
455 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<double> >& /*val*/, Direction /*dir*/) |
456 | { |
457 | throw NotImplementedException("std::vector binder must be implemented." ); |
458 | } |
459 | |
460 | |
461 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<double> >& /*val*/, Direction /*dir*/) |
462 | { |
463 | throw NotImplementedException("std::deque binder must be implemented." ); |
464 | } |
465 | |
466 | |
467 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<double> >& /*val*/, Direction /*dir*/) |
468 | { |
469 | throw NotImplementedException("std::list binder must be implemented." ); |
470 | } |
471 | |
472 | |
473 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<char>& /*val*/, Direction /*dir*/) |
474 | { |
475 | throw NotImplementedException("std::vector binder must be implemented." ); |
476 | } |
477 | |
478 | |
479 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<char>& /*val*/, Direction /*dir*/) |
480 | { |
481 | throw NotImplementedException("std::deque binder must be implemented." ); |
482 | } |
483 | |
484 | |
485 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<char>& /*val*/, Direction /*dir*/) |
486 | { |
487 | throw NotImplementedException("std::list binder must be implemented." ); |
488 | } |
489 | |
490 | |
491 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<char> >& /*val*/, Direction /*dir*/) |
492 | { |
493 | throw NotImplementedException("std::vector binder must be implemented." ); |
494 | } |
495 | |
496 | |
497 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<char> >& /*val*/, Direction /*dir*/) |
498 | { |
499 | throw NotImplementedException("std::deque binder must be implemented." ); |
500 | } |
501 | |
502 | |
503 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<char> >& /*val*/, Direction /*dir*/) |
504 | { |
505 | throw NotImplementedException("std::list binder must be implemented." ); |
506 | } |
507 | |
508 | |
509 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<std::string>& /*val*/, Direction /*dir*/) |
510 | { |
511 | throw NotImplementedException("std::vector binder must be implemented." ); |
512 | } |
513 | |
514 | |
515 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<std::string>& /*val*/, Direction /*dir*/) |
516 | { |
517 | throw NotImplementedException("std::deque binder must be implemented." ); |
518 | } |
519 | |
520 | |
521 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<std::string>& /*val*/, Direction /*dir*/) |
522 | { |
523 | throw NotImplementedException("std::list binder must be implemented." ); |
524 | } |
525 | |
526 | |
527 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<std::string> >& /*val*/, Direction /*dir*/) |
528 | { |
529 | throw NotImplementedException("std::vector binder must be implemented." ); |
530 | } |
531 | |
532 | |
533 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<std::string> >& /*val*/, Direction /*dir*/) |
534 | { |
535 | throw NotImplementedException("std::deque binder must be implemented." ); |
536 | } |
537 | |
538 | |
539 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<std::string> >& /*val*/, Direction /*dir*/) |
540 | { |
541 | throw NotImplementedException("std::list binder must be implemented." ); |
542 | } |
543 | |
544 | |
545 | void AbstractBinder::bind(std::size_t /*pos*/, const UTF16String& /*val*/, Direction /*dir*/, const WhenNullCb& /*nullCb*/) |
546 | { |
547 | throw NotImplementedException("UTF16String binder must be implemented." ); |
548 | } |
549 | |
550 | |
551 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<UTF16String>& /*val*/, Direction /*dir*/) |
552 | { |
553 | throw NotImplementedException("std::vector binder must be implemented." ); |
554 | } |
555 | |
556 | |
557 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<UTF16String>& /*val*/, Direction /*dir*/) |
558 | { |
559 | throw NotImplementedException("std::deque binder must be implemented." ); |
560 | } |
561 | |
562 | |
563 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<UTF16String>& /*val*/, Direction /*dir*/) |
564 | { |
565 | throw NotImplementedException("std::list binder must be implemented." ); |
566 | } |
567 | |
568 | |
569 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<UTF16String> >& /*val*/, Direction /*dir*/) |
570 | { |
571 | throw NotImplementedException("std::vector binder must be implemented." ); |
572 | } |
573 | |
574 | |
575 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<UTF16String> >& /*val*/, Direction /*dir*/) |
576 | { |
577 | throw NotImplementedException("std::deque binder must be implemented." ); |
578 | } |
579 | |
580 | |
581 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<UTF16String> >& /*val*/, Direction /*dir*/) |
582 | { |
583 | throw NotImplementedException("std::list binder must be implemented." ); |
584 | } |
585 | |
586 | |
587 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<BLOB>& /*val*/, Direction /*dir*/) |
588 | { |
589 | throw NotImplementedException("std::vector binder must be implemented." ); |
590 | } |
591 | |
592 | |
593 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<BLOB>& /*val*/, Direction /*dir*/) |
594 | { |
595 | throw NotImplementedException("std::deque binder must be implemented." ); |
596 | } |
597 | |
598 | |
599 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<BLOB>& /*val*/, Direction /*dir*/) |
600 | { |
601 | throw NotImplementedException("std::list binder must be implemented." ); |
602 | } |
603 | |
604 | |
605 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<BLOB> >& /*val*/, Direction /*dir*/) |
606 | { |
607 | throw NotImplementedException("std::vector binder must be implemented." ); |
608 | } |
609 | |
610 | |
611 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<BLOB> >& /*val*/, Direction /*dir*/) |
612 | { |
613 | throw NotImplementedException("std::deque binder must be implemented." ); |
614 | } |
615 | |
616 | |
617 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<BLOB> >& /*val*/, Direction /*dir*/) |
618 | { |
619 | throw NotImplementedException("std::list binder must be implemented." ); |
620 | } |
621 | |
622 | |
623 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<CLOB>& /*val*/, Direction /*dir*/) |
624 | { |
625 | throw NotImplementedException("std::vector binder must be implemented." ); |
626 | } |
627 | |
628 | |
629 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<CLOB>& /*val*/, Direction /*dir*/) |
630 | { |
631 | throw NotImplementedException("std::deque binder must be implemented." ); |
632 | } |
633 | |
634 | |
635 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<CLOB>& /*val*/, Direction /*dir*/) |
636 | { |
637 | throw NotImplementedException("std::list binder must be implemented." ); |
638 | } |
639 | |
640 | |
641 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<CLOB> >& /*val*/, Direction /*dir*/) |
642 | { |
643 | throw NotImplementedException("std::vector binder must be implemented." ); |
644 | } |
645 | |
646 | |
647 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<CLOB> >& /*val*/, Direction /*dir*/) |
648 | { |
649 | throw NotImplementedException("std::deque binder must be implemented." ); |
650 | } |
651 | |
652 | |
653 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<CLOB> >& /*val*/, Direction /*dir*/) |
654 | { |
655 | throw NotImplementedException("std::list binder must be implemented." ); |
656 | } |
657 | |
658 | |
659 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<DateTime>& /*val*/, Direction /*dir*/) |
660 | { |
661 | throw NotImplementedException("std::vector binder must be implemented." ); |
662 | } |
663 | |
664 | |
665 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<DateTime>& /*val*/, Direction /*dir*/) |
666 | { |
667 | throw NotImplementedException("std::deque binder must be implemented." ); |
668 | } |
669 | |
670 | |
671 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<DateTime>& /*val*/, Direction /*dir*/) |
672 | { |
673 | throw NotImplementedException("std::list binder must be implemented." ); |
674 | } |
675 | |
676 | |
677 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<DateTime> >& /*val*/, Direction /*dir*/) |
678 | { |
679 | throw NotImplementedException("std::vector binder must be implemented." ); |
680 | } |
681 | |
682 | |
683 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<DateTime> >& /*val*/, Direction /*dir*/) |
684 | { |
685 | throw NotImplementedException("std::deque binder must be implemented." ); |
686 | } |
687 | |
688 | |
689 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<DateTime> >& /*val*/, Direction /*dir*/) |
690 | { |
691 | throw NotImplementedException("std::list binder must be implemented." ); |
692 | } |
693 | |
694 | |
695 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Date>& /*val*/, Direction /*dir*/) |
696 | { |
697 | throw NotImplementedException("std::vector binder must be implemented." ); |
698 | } |
699 | |
700 | |
701 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Date>& /*val*/, Direction /*dir*/) |
702 | { |
703 | throw NotImplementedException("std::deque binder must be implemented." ); |
704 | } |
705 | |
706 | |
707 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Date>& /*val*/, Direction /*dir*/) |
708 | { |
709 | throw NotImplementedException("std::list binder must be implemented." ); |
710 | } |
711 | |
712 | |
713 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<Date> >& /*val*/, Direction /*dir*/) |
714 | { |
715 | throw NotImplementedException("std::vector binder must be implemented." ); |
716 | } |
717 | |
718 | |
719 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<Date> >& /*val*/, Direction /*dir*/) |
720 | { |
721 | throw NotImplementedException("std::deque binder must be implemented." ); |
722 | } |
723 | |
724 | |
725 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<Date> >& /*val*/, Direction /*dir*/) |
726 | { |
727 | throw NotImplementedException("std::list binder must be implemented." ); |
728 | } |
729 | |
730 | |
731 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Time>& /*val*/, Direction /*dir*/) |
732 | { |
733 | throw NotImplementedException("std::vector binder must be implemented." ); |
734 | } |
735 | |
736 | |
737 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Time>& /*val*/, Direction /*dir*/) |
738 | { |
739 | throw NotImplementedException("std::deque binder must be implemented." ); |
740 | } |
741 | |
742 | |
743 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Time>& /*val*/, Direction /*dir*/) |
744 | { |
745 | throw NotImplementedException("std::list binder must be implemented." ); |
746 | } |
747 | |
748 | |
749 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<Nullable<Time> >& /*val*/, Direction /*dir*/) |
750 | { |
751 | throw NotImplementedException("std::vector binder must be implemented." ); |
752 | } |
753 | |
754 | |
755 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<Nullable<Time> >& /*val*/, Direction /*dir*/) |
756 | { |
757 | throw NotImplementedException("std::deque binder must be implemented." ); |
758 | } |
759 | |
760 | |
761 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<Nullable<Time> >& /*val*/, Direction /*dir*/) |
762 | { |
763 | throw NotImplementedException("std::list binder must be implemented." ); |
764 | } |
765 | |
766 | |
767 | void AbstractBinder::bind(std::size_t /*pos*/, const std::vector<NullData>& /*val*/, Direction /*dir*/, const std::type_info& /*bindElemType*/) |
768 | { |
769 | throw NotImplementedException("std::vector binder must be implemented." ); |
770 | } |
771 | |
772 | |
773 | void AbstractBinder::bind(std::size_t /*pos*/, const std::deque<NullData>& /*val*/, Direction /*dir*/, const std::type_info& /*bindElemType*/) |
774 | { |
775 | throw NotImplementedException("std::deque binder must be implemented." ); |
776 | } |
777 | |
778 | |
779 | void AbstractBinder::bind(std::size_t /*pos*/, const std::list<NullData>& /*val*/, Direction /*dir*/, const std::type_info& /*bindElemType*/) |
780 | { |
781 | throw NotImplementedException("std::list binder must be implemented." ); |
782 | } |
783 | |
784 | |
785 | void AbstractBinder::bind(std::size_t pos, const Any& val, Direction dir, const WhenNullCb& nullCb) |
786 | { |
787 | const std::type_info& type = val.type(); |
788 | |
789 | if(type == typeid(Int32)) |
790 | bind(pos, RefAnyCast<Int32>(val), dir, nullCb); |
791 | else if(type == typeid(std::string)) |
792 | bind(pos, RefAnyCast<std::string>(val), dir, nullCb); |
793 | else if (type == typeid(Poco::UTF16String)) |
794 | bind(pos, RefAnyCast<Poco::UTF16String>(val), dir, nullCb); |
795 | else if (type == typeid(bool)) |
796 | bind(pos, RefAnyCast<bool>(val), dir, nullCb); |
797 | else if(type == typeid(char)) |
798 | bind(pos, RefAnyCast<char>(val), dir, nullCb); |
799 | else if(type == typeid(Int8)) |
800 | bind(pos, RefAnyCast<Int8>(val), dir, nullCb); |
801 | else if(type == typeid(UInt8)) |
802 | bind(pos, RefAnyCast<UInt8>(val), dir, nullCb); |
803 | else if(type == typeid(Int16)) |
804 | bind(pos, RefAnyCast<Int16>(val), dir, nullCb); |
805 | else if(type == typeid(UInt16)) |
806 | bind(pos, RefAnyCast<UInt16>(val), dir, nullCb); |
807 | else if(type == typeid(UInt32)) |
808 | bind(pos, RefAnyCast<UInt32>(val), dir, nullCb); |
809 | else if(type == typeid(Int64)) |
810 | bind(pos, RefAnyCast<Int64>(val), dir, nullCb); |
811 | else if(type == typeid(UInt64)) |
812 | bind(pos, RefAnyCast<UInt64>(val), dir, nullCb); |
813 | else if(type == typeid(float)) |
814 | bind(pos, RefAnyCast<float>(val), dir, nullCb); |
815 | else if(type == typeid(double)) |
816 | bind(pos, RefAnyCast<double>(val), dir, nullCb); |
817 | else if(type == typeid(DateTime)) |
818 | bind(pos, RefAnyCast<DateTime>(val), dir, nullCb); |
819 | else if(type == typeid(Date)) |
820 | bind(pos, RefAnyCast<Date>(val), dir, nullCb); |
821 | else if(type == typeid(Time)) |
822 | bind(pos, RefAnyCast<Time>(val), dir, nullCb); |
823 | else if(type == typeid(BLOB)) |
824 | bind(pos, RefAnyCast<BLOB>(val), dir, nullCb); |
825 | else if(type == typeid(void)) |
826 | bind(pos, NULL_GENERIC, dir, type); |
827 | #ifndef POCO_LONG_IS_64_BIT |
828 | else if(type == typeid(long)) |
829 | bind(pos, RefAnyCast<long>(val), dir, nullCb); |
830 | #endif |
831 | else |
832 | throw UnknownTypeException(std::string(val.type().name())); |
833 | } |
834 | |
835 | |
836 | void AbstractBinder::bind(std::size_t pos, const Poco::Dynamic::Var& val, Direction dir, const WhenNullCb& nullCb) |
837 | { |
838 | const std::type_info& type = val.type(); |
839 | |
840 | if(type == typeid(Int32)) |
841 | bind(pos, val.extract<Int32>(), dir, nullCb); |
842 | else if(type == typeid(std::string)) |
843 | bind(pos, val.extract<std::string>(), dir, nullCb); |
844 | else if (type == typeid(Poco::UTF16String)) |
845 | bind(pos, val.extract<Poco::UTF16String>(), dir, nullCb); |
846 | else if (type == typeid(bool)) |
847 | bind(pos, val.extract<bool>(), dir, nullCb); |
848 | else if(type == typeid(char)) |
849 | bind(pos, val.extract<char>(), dir, nullCb); |
850 | else if(type == typeid(Int8)) |
851 | bind(pos, val.extract<Int8>(), dir, nullCb); |
852 | else if(type == typeid(UInt8)) |
853 | bind(pos, val.extract<UInt8>(), dir, nullCb); |
854 | else if(type == typeid(Int16)) |
855 | bind(pos, val.extract<Int16>(), dir, nullCb); |
856 | else if(type == typeid(UInt16)) |
857 | bind(pos, val.extract<UInt16>(), dir, nullCb); |
858 | else if(type == typeid(UInt32)) |
859 | bind(pos, val.extract<UInt32>(), dir, nullCb); |
860 | else if(type == typeid(Int64)) |
861 | bind(pos, val.extract<Int64>(), dir, nullCb); |
862 | else if(type == typeid(UInt64)) |
863 | bind(pos, val.extract<UInt64>(), dir, nullCb); |
864 | else if(type == typeid(float)) |
865 | bind(pos, val.extract<float>(), dir, nullCb); |
866 | else if(type == typeid(double)) |
867 | bind(pos, val.extract<double>(), dir, nullCb); |
868 | else if(type == typeid(DateTime)) |
869 | bind(pos, val.extract<DateTime>(), dir, nullCb); |
870 | else if(type == typeid(Date)) |
871 | bind(pos, val.extract<Date>(), dir, nullCb); |
872 | else if(type == typeid(Time)) |
873 | bind(pos, val.extract<Time>(), dir, nullCb); |
874 | else if(type == typeid(BLOB)) |
875 | bind(pos, val.extract<BLOB>(), dir, nullCb); |
876 | else if(type == typeid(void)) |
877 | bind(pos, NULL_GENERIC, dir, type); |
878 | else if (type == typeid(NullData)) |
879 | bind(pos, val.extract<NullData>(), dir, type); |
880 | else if (type == typeid(NullType)) |
881 | bind(pos, static_cast<NullData>(val.extract<NullType>()), dir, type); |
882 | #ifndef POCO_LONG_IS_64_BIT |
883 | else if(type == typeid(long)) |
884 | bind(pos, val.extract<long>(), dir, nullCb); |
885 | #endif |
886 | else |
887 | throw UnknownTypeException(std::string(val.type().name())); |
888 | } |
889 | |
890 | |
891 | } } // namespace Poco::SQL |
892 | |