/usr/include/Poco/Data/MySQL/SessionHandle.h is in libpoco-dev 1.8.0.1-1ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | //
// SesssionHandle.h
//
// Library: Data/MySQL
// Package: MySQL
// Module: SessionHandle
//
// Definition of the SessionHandle class.
//
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Data_MySQL_SessionHandle_INCLUDED
#define Data_MySQL_SessionHandle_INCLUDED
#include <mysql.h>
#include "Poco/Data/MySQL/MySQLException.h"
namespace Poco {
namespace Data {
namespace MySQL {
class SessionHandle
/// MySQL session handle
{
public:
explicit SessionHandle(MYSQL* mysql);
/// Creates session handle
~SessionHandle();
/// Destroy handle, close connection
void init(MYSQL* mysql = 0);
/// Initializes the handle iff not initialized.
void options(mysql_option opt);
/// Set connection options
void options(mysql_option opt, bool b);
/// Set connection options
void options(mysql_option opt, const char* c);
/// Set connection options
void options(mysql_option opt, unsigned int i);
/// Set connection options
void connect(const char* host, const char* user, const char* password, const char* db, unsigned int port);
/// Connect to server
void close();
/// Close connection
void startTransaction();
/// Start transaction
void commit();
/// Commit transaction
void rollback();
/// Rollback transaction
operator MYSQL* ();
private:
SessionHandle(const SessionHandle&);
SessionHandle& operator=(const SessionHandle&);
private:
MYSQL* _pHandle;
};
//
// inlines
//
inline SessionHandle::operator MYSQL* ()
{
return _pHandle;
}
}}}
#endif // Data_MySQL_SessionHandle_INCLUDED
|