98 std::vector<MappingElement> dependentMappings;
100 RelationalDeleter depDeleter( dependentMappings );
101 depDeleter.build( operationBuffer );
102 dependentMappings.clear();
105 UpdateOperation* topLevelUpdate = &operationBuffer.newUpdate( topLevelMapping.tableName(),
true );
106 topLevelUpdate->addId( topLevelMapping.columnNames()[ 0 ] );
107 topLevelUpdate->addWhereId( topLevelMapping.columnNames()[ 0 ] );
111 if( iMap == topLevelMapping.end()){
114 "UpdateBuffer::flush");
116 MappingElement& mapping = iMap->second;
117 RelationalStreamerFactory streamerFactory(
m_contSchema );
118 DataElement topLevelElement;
119 std::auto_ptr<IRelationalUpdater> updater( streamerFactory.newUpdater( type, mapping ));
120 updater->build( topLevelElement, *topLevelUpdate, operationBuffer );
121 for( std::vector<std::pair<int, const void*> >::const_iterator iU =
m_buffer.begin();
124 const void*
data = iU->second;
126 depDeleter.erase( oid );
127 coral::AttributeList& dataBuff = topLevelUpdate->data();
128 dataBuff.begin()->data<
int>() = oid;
129 coral::AttributeList& whereDataBuff = topLevelUpdate->whereData();
130 whereDataBuff.begin()->data<
int>() = oid;
131 updater->update( oid, data );
132 if( operationBuffer.flush()) nobj++;
std::string cppName() const
bool mappingForDependentClasses(std::vector< MappingElement > &destination)
const MappingElement & topElement() const
std::map< std::string, MappingElement >::iterator iterator
Iterator definition.
const edm::TypeWithDict & type()
std::vector< std::pair< int, const void * > > m_buffer
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)
ContainerSchema & m_contSchema