Main Page
Namespaces
Classes
Files
File List
File Members
libism
ISM
soci
src
core
row-exchange.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
3
// Distributed under the Boost Software License, Version 1.0.
4
// (See accompanying file LICENSE_1_0.txt or copy at
5
// http://www.boost.org/LICENSE_1_0.txt)
6
//
7
8
#ifndef SOCI_INTO_ROW_H_INCLUDED
9
#define SOCI_INTO_ROW_H_INCLUDED
10
11
#include "
into-type.h
"
12
#include "
exchange-traits.h
"
13
#include "
row.h
"
14
#include "
statement.h
"
15
// std
16
#include <cstddef>
17
18
namespace
soci
19
{
20
21
namespace
details
22
{
23
24
// Support selecting into a row for dynamic queries
25
26
template
<>
27
class
into_type
<
row
>
28
:
public
into_type_base
// bypass the standard_into_type
29
{
30
public
:
31
into_type
(
row
& r) : r_(r) {}
32
into_type
(
row
& r,
indicator
&) : r_(r) {}
33
34
private
:
35
// special handling for Row
36
virtual
void
define
(
statement_impl
& st,
int
&
/* position */
)
37
{
38
st.
set_row
(&r_);
39
40
// actual row description is performed
41
// as part of the statement execute
42
}
43
44
virtual
void
pre_fetch
() {}
45
virtual
void
post_fetch
(
bool
gotData,
bool
/* calledFromFetch */
)
46
{
47
r_.reset_get_counter();
48
49
if
(gotData)
50
{
51
// this is used only to re-dispatch to derived class, if any
52
// (the derived class might be generated automatically by
53
// user conversions)
54
convert_from_base
();
55
}
56
}
57
58
virtual
void
clean_up
() {}
59
60
virtual
std::size_t
size
()
const
{
return
1; }
61
62
virtual
void
convert_from_base
() {}
63
64
row
&
r_
;
65
};
66
67
template
<>
68
struct
exchange_traits
<
row
>
69
{
70
typedef
basic_type_tag
type_family
;
71
};
72
73
}
// namespace details
74
75
}
// namespace soci
76
77
#endif
soci::details::into_type< row >::pre_fetch
virtual void pre_fetch()
Definition:
row-exchange.h:44
statement.h
soci::details::exchange_traits< row >::type_family
basic_type_tag type_family
Definition:
row-exchange.h:70
soci::details::into_type< row >::into_type
into_type(row &r)
Definition:
row-exchange.h:31
into-type.h
soci::row
Definition:
row.h:41
soci::details::into_type_base
Definition:
into-type.h:33
exchange-traits.h
soci::details::basic_type_tag
Definition:
exchange-traits.h:24
soci::details::into_type< row >::size
virtual std::size_t size() const
Definition:
row-exchange.h:60
soci::details::into_type< row >::define
virtual void define(statement_impl &st, int &)
Definition:
row-exchange.h:36
soci::details::standard_into_type::convert_from_base
virtual void convert_from_base()
Definition:
into-type.h:72
soci::details::into_type< row >::convert_from_base
virtual void convert_from_base()
Definition:
row-exchange.h:62
soci::details::into_type< row >::into_type
into_type(row &r, indicator &)
Definition:
row-exchange.h:32
soci::details::into_type< row >::clean_up
virtual void clean_up()
Definition:
row-exchange.h:58
soci::indicator
indicator
Definition:
soci-backend.h:28
soci::details::statement_impl
Definition:
statement.h:37
row.h
soci::details::statement_impl::set_row
void set_row(row *r)
Definition:
core/statement.cpp:647
soci::details::into_type
Definition:
into-type.h:117
soci
Definition:
db2/common.h:15
soci::details::into_type< row >::post_fetch
virtual void post_fetch(bool gotData, bool)
Definition:
row-exchange.h:45
soci::details::into_type< row >::r_
row & r_
Definition:
row-exchange.h:64
soci::details::exchange_traits
Definition:
exchange-traits.h:28
asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:40