00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "pqxx/compiler-public.hxx"
00020 #include "pqxx/compiler-internal-pre.hxx"
00021
00022 #include <string>
00023
00024 #include "pqxx/libpq-forward.hxx"
00025
00026
00027 namespace pqxx
00028 {
00029
00030
00035
00036 class PQXX_LIBEXPORT connectionpolicy
00037 {
00038 public:
00039 typedef internal::pq::PGconn *handle;
00040
00041 explicit connectionpolicy(const PGSTD::string &opts);
00042 virtual ~connectionpolicy() throw ();
00043
00044 const PGSTD::string &options() const throw () { return m_options; }
00045
00046 virtual handle do_startconnect(handle orig);
00047 virtual handle do_completeconnect(handle orig);
00048 virtual handle do_dropconnect(handle orig) throw ();
00049 virtual handle do_disconnect(handle orig) throw ();
00050 virtual bool is_ready(handle) const throw ();
00051
00052 protected:
00053 handle normalconnect(handle);
00054
00055 private:
00056 PGSTD::string m_options;
00057 };
00058
00060 }
00061
00062 #include "pqxx/compiler-internal-post.hxx"