/usr/include/Wt/Dbo/backend/Firebird is in libwtdbo-dev 3.3.0-1build1.
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 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | // This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2011 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*
* Originally contributed by Lukasz Matuszewski
*/
#ifndef _WT_DBO_BACKEND_FIREBIRD_
#define _WT_DBO_BACKEND_FIREBIRD_
#include <Wt/Dbo/SqlConnection>
#include <Wt/Dbo/SqlStatement>
#include <Wt/Dbo/backend/WDboFirebirdDllDefs.h>
namespace IBPP {
class IDatabase;
template<class T>
class Ptr;
typedef Ptr<IDatabase> Database;
}
namespace Wt {
namespace Dbo {
namespace backend {
class Firebird_impl;
/*! \class Firebird Wt/Dbo/backend/Firebird
* \brief A %Firebird connection
*
* This class provides the backend implementation for %Firebird
* databases. It supports %Firebird databases with version 2.1
* or higher.
*
* \ingroup dbo
*/
class WTDBOFIREBIRD_API Firebird : public SqlConnection
{
public:
/*! \brief Creates a %Firebird backend connection.
*
* The connection is not yet open, and requires a connect() before it
* can be used.
*/
Firebird();
/*! \brief Creates and opens a %Firebird backend connection.
*/
Firebird(const std::string& ServerName,
const std::string& DatabaseName,
const std::string& UserName,
const std::string& UserPassword,
const std::string& RoleName,
const std::string& CharSet = std::string(),
const std::string& CreateParams = std::string());
/*! \brief Creates and opens a %Firebird backend connection.
*/
Firebird(IBPP::Database db);
/*! \brief Copy constructor.
*
* This creates a new backend connection with the same settings
* as another connection.
*/
Firebird(const Firebird& other);
/*! \brief Destructor.
*
* Closes the connection.
*/
virtual ~Firebird();
/*! \brief Tries to connect.
*
* Throws an exception if there was a problem, otherwise
* returns \c true.
*/
bool connect(const std::string& ServerName,
const std::string& DatabaseName,
const std::string& UserName,
const std::string& UserPassword,
const std::string& RoleName,
const std::string& CharSet = std::string(),
const std::string& CreateParams = std::string());
virtual Firebird *clone() const;
/*! \brief Returns the underlying connection handle.
*/
IBPP::Database connection();
virtual void startTransaction();
virtual void commitTransaction();
virtual void rollbackTransaction();
virtual SqlStatement *prepareStatement(const std::string& sql);
/** @name Methods that return dialect information
*/
//@{
virtual std::string autoincrementSql() const;
virtual std::vector<std::string>
autoincrementCreateSequenceSql(const std::string &table,
const std::string &id) const;
virtual std::vector<std::string>
autoincrementDropSequenceSql(const std::string &table,
const std::string &id) const;
virtual std::string autoincrementType() const;
virtual std::string autoincrementInsertSuffix() const;
virtual const char *dateTimeType(SqlDateTimeType type) const;
virtual const char *blobType() const;
virtual const char *textType() const;
virtual const char *booleanType() const;
virtual bool usesRowsFromTo() const;
virtual bool supportAlterTable() const;
//@}
virtual void prepareForDropTables();
private:
Firebird_impl *impl_;
bool m_writableTransaction;
friend class FirebirdStatement;
};
}
}
}
#endif /* _WT_DBO_BACKEND_FIREBIRD_ */
|