Main Page
Namespaces
Classes
Files
File List
File Members
libism
ISM
soci
src
core
ref-counted-statement.cpp
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
#define SOCI_SOURCE
9
#include "
ref-counted-statement.h
"
10
#include "
session.h
"
11
12
using namespace
soci
;
13
using namespace
soci::details
;
14
15
ref_counted_statement_base::ref_counted_statement_base
(
session
& s)
16
: refCount_(1)
17
, session_(s)
18
{
19
}
20
21
void
ref_counted_statement::final_action
()
22
{
23
try
24
{
25
st_.alloc();
26
st_.prepare(
session_
.
get_query
(),
st_one_time_query
);
27
st_.define_and_bind();
28
29
const
bool
gotData = st_.execute(
true
);
30
session_
.
set_got_data
(gotData);
31
}
32
catch
(...)
33
{
34
st_.clean_up();
35
throw
;
36
}
37
38
st_.clean_up();
39
}
40
41
std::ostringstream&
ref_counted_statement_base::get_query_stream
()
42
{
43
return
session_
.
get_query_stream
();
44
}
soci::details
Definition:
db2/common.h:15
session.h
soci::session::set_got_data
void set_got_data(bool gotData)
Definition:
core/session.cpp:304
soci::session::get_query_stream
std::ostringstream & get_query_stream()
Definition:
core/session.cpp:204
soci::session::get_query
std::string get_query() const
Definition:
core/session.cpp:216
soci::session
Definition:
session.h:40
soci::details::ref_counted_statement_base::session_
session & session_
Definition:
ref-counted-statement.h:62
soci::details::st_one_time_query
Definition:
soci-backend.h:54
soci::details::ref_counted_statement::final_action
virtual void final_action()
Definition:
ref-counted-statement.cpp:21
soci::details::ref_counted_statement_base::ref_counted_statement_base
ref_counted_statement_base(session &s)
Definition:
ref-counted-statement.cpp:15
soci
Definition:
db2/common.h:15
soci::details::ref_counted_statement_base::get_query_stream
std::ostringstream & get_query_stream()
Definition:
ref-counted-statement.cpp:41
ref-counted-statement.h
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