Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F88841429
sql_pusher.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Oct 20, 23:01
Size
2 KB
Mime Type
text/x-c
Expires
Tue, Oct 22, 23:01 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21816302
Attached To
R3127 blackdynamite
sql_pusher.hh
View Options
#ifndef __BLACKDYNAMITE_SQL_PUSHER_HH__
#define __BLACKDYNAMITE_SQL_PUSHER_HH__
/* -------------------------------------------------------------------------- */
#include "pusher.hh"
#include <cmath>
/* -------------------------------------------------------------------------- */
namespace BlackDynamite {
template<typename type, bool is_scalar >
class Pusher::SqlPusher : public pqxx::transactor<transaction> {
typedef transaction_input<type, is_scalar> InputObject;
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
SqlPusher(InputObject & input)
:pqxx::transactor<transaction>("Inserting into table" + input.tablename),
input(input) {}
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
void operator()(transaction & T);
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private:
InputObject & input;
};
/* -------------------------------------------------------------------------- */
//partial specialization when scalartype
template<typename type>
class Pusher::SqlPusher<type, true>: public pqxx::transactor<transaction> {
typedef Pusher::transaction_input<type, true> InputObject;
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
SqlPusher(InputObject & input)
:pqxx::transactor<transaction>("Inserting into table" + input.tablename),
input(input)
{}
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
void operator()(transaction & T);
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private:
InputObject & input;
};
/* -------------------------------------------------------------------------- */
#include "sql_pusher_inline_impl.cc"
/* -------------------------------------------------------------------------- */
}
#endif /* __BLACKDYNAMITE_SQL_PUSHER_HH__ */
Event Timeline
Log In to Comment