Difference between revisions of "OpenDBX/C++ API/1.0/Stmt"
(Talk) (docbook2x update) |
(→~Stmt()) |
||
| Line 88: | Line 88: | ||
Destroys the statement instance if no other references exist. | 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 | + | 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. |
Latest revision as of 10:03, 29 October 2009
Public member functions
| Stmt ( const Stmt & )
Copy constructor. |
| Result execute ()
Executes a statement and returns a Result instance. |
| Stmt & operator= ( const Stmt & )
Assigns a statement instance to another one. |
| ~Stmt ()
Destroys the statement instance if no other references exist. |
Public member description
Stmt( const Stmt & )
Stmt(
const Stmt & ref
) throw ()
Copy constructor.
Enables the transfer of the internal state of an object ref 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.
Parameters
| ref | Original statement object instance |
Result execute()
Result execute() throw ( std::exception )
Executes a statement and returns a Result 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 Result object.
Returns
- Result instance
Exceptions
| OpenDBX::Exception | If the underlying database library returns an error |
See also
- Result
Stmt & operator=( const Stmt & )
Stmt & operator=(
const Stmt & ref
) throw ()
Assigns a statement instance to another one.
Assigns the internal state of an object ref 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.
Parameters
| ref | Stmt instance |
Returns
- Statement reference of this instance
~Stmt()
~Stmt() throw ()
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.