fb-cpp 0.0.1
A modern C++ wrapper for the Firebird database API
Loading...
Searching...
No Matches
fbcpp::Attachment Class Referencefinal

Represents a connection to a Firebird database. More...

#include <Attachment.h>

Public Member Functions

 Attachment (Client &client, const std::string &uri, const AttachmentOptions &options={})
 Constructs an Attachment object that connects to (or creates) the database specified by the URI using the specified Client object and options.
 
 Attachment (Attachment &&o) noexcept
 Move constructor.
 
Attachmentoperator= (Attachment &&)=delete
 
 Attachment (const Attachment &)=delete
 
Attachmentoperator= (const Attachment &)=delete
 
 ~Attachment () noexcept
 Disconnects from the database.
 
bool isValid () noexcept
 Returns whether the Attachment object is valid.
 
ClientgetClient () noexcept
 Returns the Client object reference used to create this Attachment object.
 
FbRef< fb::IAttachment > getHandle () noexcept
 Returns the internal Firebird IAttachment handle.
 
void disconnect ()
 Disconnects from the database.
 
void dropDatabase ()
 Drops the database.
 

Detailed Description

Represents a connection to a Firebird database.

The Attachment must exist and remain valid while there are other objects using it, such as Transaction and Statement.

Definition at line 176 of file Attachment.h.

Constructor & Destructor Documentation

◆ Attachment() [1/2]

Attachment::Attachment ( Client client,
const std::string &  uri,
const AttachmentOptions options = {} 
)
explicit

Constructs an Attachment object that connects to (or creates) the database specified by the URI using the specified Client object and options.

Definition at line 33 of file Attachment.cpp.

◆ Attachment() [2/2]

fbcpp::Attachment::Attachment ( Attachment &&  o)
inlinenoexcept

Move constructor.

A moved Attachment object becomes invalid.

Definition at line 189 of file Attachment.h.

◆ ~Attachment()

fbcpp::Attachment::~Attachment ( )
inlinenoexcept

Disconnects from the database.

Definition at line 203 of file Attachment.h.

Member Function Documentation

◆ disconnect()

void Attachment::disconnect ( )

Disconnects from the database.

Definition at line 83 of file Attachment.cpp.

◆ dropDatabase()

void Attachment::dropDatabase ( )

Drops the database.

Definition at line 88 of file Attachment.cpp.

◆ getClient()

Client & fbcpp::Attachment::getClient ( )
inlinenoexcept

Returns the Client object reference used to create this Attachment object.

Definition at line 230 of file Attachment.h.

◆ getHandle()

FbRef< fb::IAttachment > fbcpp::Attachment::getHandle ( )
inlinenoexcept

Returns the internal Firebird IAttachment handle.

Definition at line 238 of file Attachment.h.

◆ isValid()

bool fbcpp::Attachment::isValid ( )
inlinenoexcept

Returns whether the Attachment object is valid.

Definition at line 222 of file Attachment.h.


The documentation for this class was generated from the following files: