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
10 #include "session.h"
11 
12 using namespace soci;
13 using namespace soci::details;
14 
16  : refCount_(1)
17  , session_(s)
18 {
19 }
20 
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 
42 {
43  return session_.get_query_stream();
44 }
void set_got_data(bool gotData)
std::ostringstream & get_query_stream()
std::string get_query() const


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