#include <SQLExecute.hh>
Inherits fatalmind::oracle::CommandCommon< TM, SLMDC >< TM, SLMDC >.
Public Types | |
|
typedef fatalmind::oracle::ResourceType < TM, SLMDC > | pool_type |
Public Member Functions | |
| SQLExecute (const std::string &SQL) | |
| SQLExecute (const ResourcePool< ResourceType< TM > > &p, const std::string &SQL) | |
| bool | addBatch (const SQLExecute< TM, SLMDC > &p) |
| int | batchSize () const |
| virtual void | outputoperator (std::ostream &s) const |
| virtual void | execute (oracleResource< TM > &hand) |
| virtual void | execute (typename fatalmind::oracle::ResourceType< TM, SLMDC >::resource_t &rr)=0 |
| The execute method is the one which actually carries out the work. | |
| Clone * | clone () const |
| template<class Derived> | |
| Derived * | clone () const |
| template<typename T> | |
| void | bind (const unsigned int pos, const T &val, bool nul=false) |
| Binds an actual input value for an placeholder in the SQL statement. | |
| virtual void | clearParameters () |
| virtual void | bindoutputoperator (std::ostream &str) const |
Protected Types | |
|
typedef std::vector< typename super::super_bind::_argst > | batchParams_t |
|
typedef SQL::Bind< oracleType, oracleTypeImpl > | super_bind |
|
typedef std::vector< gc_ptr < VBC > > | _argst |
Protected Member Functions | |
| SQLExecute (const this_t &) | |
| virtual Clone * | DoClone () const |
| void | _execute (fatalmind::oracleResource< TM > &, StatementCache &) |
| bool | push_onto_BatchParamSizes (const typename super::super_bind::_argst &p) |
| virtual const std::string & | getCommandName () const |
| void | throwBatchException () const |
| int | getBatchExceptionOffset () const |
| void | real_bind_batch (oracleHandles &) |
| void | prepare (oracleHandles &, StatementCache &, const oracleStatement &oraSQL) |
| void | real_bind (oracleHandles &) |
| const std::string & | getSQL () const |
|
const fatalmind::oracle::ResourceType < TM, SLMDC >::factory_t & | getFactory (const ResourcePool< fatalmind::oracle::ResourceType< TM, SLMDC > > &p) const |
Protected Attributes | |
| batchParams_t | batchParams |
| std::vector< gc_ptr< RawBuffer > > | batchBuffers |
|
std::deque < OracleExceptionFactory > | batchedExceptions |
| std::deque< int > | batchedExceptionOffsets |
| std::string | _SQL |
| this is a copy of the original SQL statement. | |
| StatementCache::handle_t | _sth |
| since the statementhandle is cached we need some protection | |
| _argst | _args |
Static Protected Attributes | |
| static const std::string | _SQLExecuteName |
| static const std::string | _CommandCommonName |
Friends | |
| class | oracle::OptimizedBatchCommand< Command< oracle::ResourceType< TM, SLMDC > > > |
| class | Transaction< TM, SLMDC > |
| virtual void fatalmind::Command< fatalmind::oracle::ResourceType< TM, SLMDC > >::execute | ( | typename fatalmind::oracle::ResourceType< TM, SLMDC > ::resource_t & | rr | ) | [pure virtual, inherited] |
The execute method is the one which actually carries out the work.
This method gets called by ResourcePool with a (valid) plain resource which was obtained from the pool.
On normal execution (no exception) the resource will be free()ed, on abnormal execution (exception) the resource will be failed. If you need to throw an functional exception which should not cause failing of the resource, derive this exception from NoFailoverException.
| void fatalmind::SQL::Bind< VBC, CT >::bind | ( | const unsigned int | pos, | |
| const T & | val, | |||
| bool | nul = false | |||
| ) | [inline, inherited] |
Binds an actual input value for an placeholder in the SQL statement.
All binding is done by value! this means the passed data are copied to internal storage. Chaning your original copy of your data after passing it to bind() is therefore safe.
| pos | The position indicator. The number of placeholder (?) in the SQL string. Counted from the left starting at 0. | |
| val | the actual value. | |
| nul | NULL inidcator, if set to yes the actual value to be bound will be NULL. Please note that you still need to provide a valid value! |
Reimplemented from fatalmind::SQL::BindInterface.
std::string fatalmind::oracle::CommandCommon< TM, SLMDC >::_SQL [protected, inherited] |
1.5.5