.TH "OpenDBX::Stmt" 3 "Fri Sep 5 2014" "Version 1.4.6" "opendbx" \" -*- nroff -*- .ad l .nh .SH NAME OpenDBX::Stmt \- .PP Statement object\&. .SH SYNOPSIS .br .PP .SS "Public Types" .in +1c .ti -1c .RI "enum \fBType\fP " .br .RI "\fIStatement objects which can be created\&. \fP" .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBResult\fP \fBexecute\fP () throw ( std::exception )" .br .RI "\fIExecutes a statement and returns a \fBResult\fP instance\&. \fP" .ti -1c .RI "\fBStmt\fP & \fBoperator=\fP (const \fBStmt\fP &ref) throw ()" .br .RI "\fIAssigns a statement instance to another one\&. \fP" .ti -1c .RI "\fBStmt\fP (const \fBStmt\fP &ref) throw ()" .br .RI "\fICopy constructor\&. \fP" .ti -1c .RI "\fB~Stmt\fP () throw ()" .br .RI "\fIDestroys the statement instance if no other references exist\&. \fP" .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBStmt\fP () throw ()" .br .RI "\fIDefault constructor\&. \fP" .ti -1c .RI "\fBStmt\fP (Stmt_Iface *impl) throw ( std::exception )" .br .RI "\fICreates a statement instance\&. \fP" .in -1c .SH "Detailed Description" .PP Statement object\&. .PP \fBAuthor:\fP .RS 4 Norbert Sendetzky norbert@linuxnetworks.de .RE .PP \fBVersion:\fP .RS 4 1\&.0 .RE .PP .SH "Member Enumeration Documentation" .PP .SS "enum \fBOpenDBX::Stmt::Type\fP" .PP Statement objects which can be created\&. Currently, only simple processing of statements is supported which means that the statement sent to the database server consists of the statement and the parameters in text form\&. Later on, also prepared statements will be available which separates parsing and execution with different parameters\&. .SH "Constructor & Destructor Documentation" .PP .SS "OpenDBX::Stmt::Stmt ()\fC [inline]\fP, \fC [protected]\fP" .PP Default constructor\&. The default constructor isn't part of the public interface as the object must not be created manually\&. Instead, the \fBConn::create()\fP method is a factory for instances of the \fBStmt\fP class\&. .PP \fBReturns:\fP .RS 4 Statement instance .RE .PP .SS "OpenDBX::Stmt::Stmt (Stmt_Iface *impl)std::exception\fC [protected]\fP" .PP Creates a statement instance\&. The constructor isn't part of the public interface as the object must not be created manually\&. Instead, the \fBConn::create()\fP method is a factory for instances of the \fBStmt\fP class\&. .PP \fBParameters:\fP .RS 4 \fIimpl\fP Pointer to private implementation .RE .PP \fBExceptions:\fP .RS 4 \fIstd::exception\fP If an error occures .RE .PP \fBReturns:\fP .RS 4 Statement instance .RE .PP .SS "OpenDBX::Stmt::~Stmt ()" .PP Destroys the statement instance if no other references exist\&. Each statement object uses a reference counter to remember if the internal variables are shared with other objects\&. If this isn't the case or if this object is the last one referencing the variables, the object is cleaned up and the allocated memory freed\&. .SS "OpenDBX::Stmt::Stmt (const \fBStmt\fP &ref)" .PP Copy constructor\&. Enables the transfer of the internal state of an object \fIref\fP of the same type to this object\&. Both objects share the same variables and the reference counter afterwards\&. The reference counter is incremented each time an object is copied and will be decremented if it is destroyed\&. .PP \fBParameters:\fP .RS 4 \fIref\fP Original statement object instance .RE .PP .SH "Member Function Documentation" .PP .SS "\fBResult\fP OpenDBX::Stmt::execute ()std::exception" .PP Executes a statement and returns a \fBResult\fP instance\&. Sends the necessary data to the database server which will execute the statement and return one or more result sets afterwards\&. The result sets can be fetched via the returned \fBResult\fP object\&. .PP \fBReturns:\fP .RS 4 \fBResult\fP instance .RE .PP \fBExceptions:\fP .RS 4 \fI\fBOpenDBX::Exception\fP\fP If the underlying database library returns an error .RE .PP \fBSee also:\fP .RS 4 \fBResult\fP .RE .PP .SS "\fBStmt\fP& OpenDBX::Stmt::operator= (const \fBStmt\fP &ref)" .PP Assigns a statement instance to another one\&. Assigns the internal state of an object \fIref\fP of the same type to this object\&. Both objects share the same variables and the reference counter afterwards\&. The reference counter is incremented each time an object is copied and will be decremented if it is destroyed\&. .PP \fBParameters:\fP .RS 4 \fIref\fP \fBStmt\fP instance .RE .PP \fBReturns:\fP .RS 4 Statement reference of this instance .RE .PP .SH "Author" .PP Generated automatically by Doxygen for opendbx from the source code\&.