41 InsertOperation* topLevelInsert = &operationBuffer.newInsert( topLevelMapping.tableName() );
42 topLevelInsert->addId( topLevelMapping.columnNames()[ 0 ] );
46 if( iMap == topLevelMapping.end()){
49 "WriteBuffer::flush");
51 MappingElement& mapping = iMap->second;
52 RelationalStreamerFactory streamerFactory(
m_contSchema );
53 DataElement topLevelElement;
54 std::auto_ptr<IRelationalWriter> writer( streamerFactory.newWriter( type, mapping ) );
55 writer->build( topLevelElement, *topLevelInsert, operationBuffer );
57 for( std::vector<std::pair<int, const void*> >::const_iterator iW =
m_buffer.begin();
60 const void*
data = iW->second;
61 coral::AttributeList& dataBuff = topLevelInsert->data();
62 dataBuff.begin()->data<
int>() = oid;
63 writer->write( oid, data );
64 if( operationBuffer.flush() ) nobj++;
ContainerSchema & m_contSchema
std::string cppName() const
const MappingElement & topElement() const
std::vector< std::pair< int, const void * > > m_buffer
std::map< std::string, MappingElement >::iterator iterator
Iterator definition.
const edm::TypeWithDict & type()
coral::ISchema & storageSchema()
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
char data[epos_bytes_allocation]
MappingTree & mapping(bool writeEnabled=false)