TO BE REMOVED. More...
TO BE REMOVED.
enum ora::ConditionType |
Definition at line 33 of file RelationalOperation.h.
Definition at line 13 of file Selection.h.
void ora::addFromTableHierarchy | ( | const std::string & | tableName, |
std::map< std::string, std::set< std::string > > & | tableList, | ||
std::vector< std::string > & | orderedList | ||
) |
Definition at line 49 of file ContainerSchema.cc.
Referenced by ora::ContainerSchema::drop().
{ for( std::set<std::string>::const_iterator iDt = iDeps->second.begin(); iDt != iDeps->second.end(); iDt++ ){ addFromTableHierarchy( *iDt, tableList, orderedList ); } } } } ora::ContainerSchema::ContainerSchema( int containerId,
void ora::checkString | ( | const std::string & | s, |
int | code, | ||
bool | thro = true |
||
) |
Definition at line 184 of file MappingRules.cc.
References i, throwException(), and validChars().
char* ora::conditionOfType | ( | ConditionType | condType | ) |
Definition at line 25 of file RelationalOperation.cc.
Referenced by ora::InputRelationalData::addWhereId().
{ static char* cond[ 5 ] = { (char*)"=",(char*)">",(char*)"<",(char*)">=",(char*)"<=" }; return cond[ condType ]; }
void ora::deleteArrayElements | ( | MappingElement & | mapping, |
int | oid, | ||
int | fromIndex, | ||
RelationalBuffer & | buffer | ||
) |
Definition at line 8 of file ArrayCommonImpl.cc.
References ora::InputRelationalData::addWhereId(), ora::MappingElement::begin(), ora::MappingElement::columnNames(), ora::MappingElement::elementType(), ora::MappingElement::end(), Ge, ora::RelationalBuffer::newDelete(), ora::MappingElement::tableName(), and ora::InputRelationalData::whereData().
Referenced by ora::PVectorUpdater::update(), and ora::QueryableVectorUpdater::update().
{ for ( MappingElement::iterator iMe = mapping.begin(); iMe != mapping.end(); ++iMe ) { MappingElement::ElementType elementType = iMe->second.elementType(); // add the InlineCArray (or change the algorithm... if ( elementType == MappingElement::Object || elementType == MappingElement::Array || elementType == MappingElement::OraArray || elementType == MappingElement::CArray ) { deleteArrayElements( iMe->second, oid, fromIndex, buffer ); } } if ( mapping.elementType() == MappingElement::Object) return; std::string oidColumn = mapping.columnNames()[ 0 ]; std::string indexColumn = mapping.columnNames()[ 1 ]; DeleteOperation& deleteOperation = buffer.newDelete( mapping.tableName() ); deleteOperation.addWhereId( oidColumn ); deleteOperation.addWhereId( indexColumn, Ge ); coral::AttributeList::iterator condDataIter = deleteOperation.whereData().begin(); condDataIter->data<int>() = oid; ++condDataIter; condDataIter->data<int>() = fromIndex; }
bool ora::existAttribute | ( | const std::string & | attributeName, |
const coral::AttributeList & | data | ||
) |
Definition at line 15 of file RelationalOperation.cc.
References newFWLiteAna::found.
Referenced by ora::InputRelationalData::addBlobData(), ora::InputRelationalData::addData(), ora::InputRelationalData::addId(), ora::InputRelationalData::addWhereId(), and ora::SelectOperation::addWhereId().
Container ora::getContainerFromSession | ( | const std::string & | name, |
const Reflex::Type & | contType, | ||
DatabaseSession & | session | ||
) |
Definition at line 42 of file Database.cc.
References ora::Configuration::automaticContainerCreation(), ora::Configuration::automaticDatabaseCreation(), and throwException().
Referenced by ora::Database::getContainer(), and ora::Database::insertItem().
{ if( session.configuration().properties().getFlag( Configuration::automaticDatabaseCreation()) || session.configuration().properties().getFlag( Configuration::automaticContainerCreation() ) ){ contHandle = session.createContainer( name, contType ); } else { throwException("Container \""+name+"\" does not exist in the database.", "Database::insertItem"); } } return Container( contHandle ); } }
data refman pasoursint CMSSW_4_1_8_patch13 src CondCore ORA src ContainerSchema cc data refman pasoursint CMSSW_4_1_8_patch13 src CondCore ORA src ContainerSchema cc data refman pasoursint CMSSW_4_1_8_patch13 src CondCore ORA src ContainerSchema cc data refman pasoursint CMSSW_4_1_8_patch13 src CondCore ORA src ContainerSchema cc void ora::getTableHierarchyFromMappingElement | ( | const MappingElement & | source, |
std::map< std::string, std::set< std::string > > & | tableList | ||
) |
Definition at line 20 of file ContainerSchema.cc.
Referenced by ora::ContainerSchema::drop().
{ std::set<std::string> dependencies; tableList.insert(std::make_pair( tableName, dependencies ) ); } for( MappingElement::const_iterator iElem = source.begin(); iElem != source.end(); iElem++ ){ std::map<std::string, std::set<std::string> >::iterator iT = tableList.find( tableName ); const std::string& innerTable = iElem->second.tableName(); if( innerTable != tableName ){ iT->second.insert( innerTable ); } getTableHierarchyFromMappingElement( iElem->second, tableList ); } } //void getTableHierarchyFromMapping( const MappingTree& source, // std::map<std::string, // std::set<std::string> >& tableList ){
std::string ora::mappingTypeFromPool | ( | const std::string & | mappingType | ) |
Definition at line 668 of file PoolDatabaseSchema.cc.
References ora::MappingElement::OraArrayMappingElementType().
Referenced by ora::PoolMappingSchema::getMapping().
{ if( mappingType == "PoolArray" ) return MappingElement::OraArrayMappingElementType(); return mappingType; }
std::string ora::namedRefNullLabel | ( | ) |
Definition at line 14 of file NamedRefStreamer.cc.
Referenced by ora::NamedReferenceStreamerBase::bindDataForRead(), and ora::NamedReferenceStreamerBase::bindDataForUpdate().
{ static std::string nullLabel("ora::NamedRef::Null"); return nullLabel; }
std::string ora::nameFromClass | ( | const Reflex::Type & | contType | ) |
Definition at line 38 of file Database.cc.
Referenced by ora::Database::createContainer(), ora::Database::getContainer(), and ora::Database::nameForContainer().
std::string ora::poolSchemaVersion | ( | ) |
Definition at line 5 of file IDatabaseSchema.cc.
Referenced by ora::BlobWriterBase::buildDataElement(), and ora::PoolMainTable::schemaVersion().
{ static std::string s_version("POOL"); return s_version; }
void ora::processBaseClasses | ( | MappingElement & | mappingElement, |
const Reflex::Type & | objType, | ||
const std::string & | scopeNameForSchema, | ||
TableRegister & | tableRegister | ||
) |
Definition at line 527 of file RelationalMapping.cc.
References CustomConfigs::Base(), className(), i, ora::MappingRules::isMappedToBlob(), j, ora::MappingRules::mappingPropertyNameInDictionary(), ora::RelationalMappingFactory::newProcessor(), ora::ClassUtils::resolvedType(), ora::MappingRules::scopedVariableForSchemaObjects(), ora::MappingRules::scopedVariableName(), and throwException().
Referenced by ora::ObjectMapping::process().
{ std::string className = objType.Name(Reflex::SCOPED); for ( size_t i=0; i< objType.BaseSize(); i++){ Reflex::Base base = objType.BaseAt(i); Reflex::Type baseType = ClassUtils::resolvedType( base.ToType() ); if(!baseType){ throwException( "Class for base \""+base.Name()+"\" is not in the dictionary.","ObjectMapping::process"); } // TO BE FIXED:: here there is still to fix the right scopeName to pass processBaseClasses( mappingElement, baseType, scopeNameForSchema, tableRegister ); for ( size_t j=0; j< baseType.DataMemberSize(); j++){ Reflex::Member baseMember = baseType.DataMemberAt(j); // Skip the transient and the static ones if ( baseMember.IsTransient() || baseMember.IsStatic() ) continue; // Retrieve the data member type Reflex::Type type = ClassUtils::resolvedType( baseMember.TypeOf() ); Reflex::Type declaringType = ClassUtils::resolvedType( baseMember.DeclaringType()); std::string scope = declaringType.Name(Reflex::SCOPED); // Retrieve the field name std::string objectMemberName = ora::MappingRules::scopedVariableName( baseMember.Name(), scope ); std::string objectMemberNameForSchema = ora::MappingRules::scopedVariableForSchemaObjects( baseMember.Name(), scope ); std::string mappingType(""); Reflex::PropertyList memberProps = baseMember.Properties(); if( memberProps.HasProperty(ora::MappingRules::mappingPropertyNameInDictionary())){ mappingType = memberProps.PropertyAsString(ora::MappingRules::mappingPropertyNameInDictionary()); } bool blobStreaming = ora::MappingRules::isMappedToBlob( mappingType ); RelationalMappingFactory mappingFactory( tableRegister ); std::auto_ptr<IRelationalMapping> processor( mappingFactory.newProcessor( type, blobStreaming ) ); processor->process( mappingElement, objectMemberName, objectMemberNameForSchema, scopeNameForSchema ); } } }
void ora::processLeafElement | ( | MappingElement & | parentElement, |
const std::string & | elementType, | ||
const std::string & | typeName, | ||
const std::string & | attributeName, | ||
const std::string & | attributeNameForSchema, | ||
const std::string & | scopeNameForSchema, | ||
TableRegister & | tableRegister | ||
) |
Definition at line 141 of file RelationalMapping.cc.
References ora::MappingElement::appendSubElement(), ora::TableRegister::checkColumn(), ora::TableRegister::checkTable(), ora::MappingRules::columnNameForVariable(), i, ora::TableRegister::insertColumn(), ora::MappingRules::MaxColumnNameLength, ora::MappingRules::newNameForSchemaObject(), ora::MappingElement::setColumnNames(), ora::MappingElement::tableName(), and throwException().
Referenced by ora::BlobMapping::process(), and ora::PrimitiveMapping::process().
{ if(!tableRegister.checkTable( parentElement.tableName())){ throwException("Table \""+parentElement.tableName()+"\" has not been allocated.", "processLeafElement"); } ora::MappingElement& me = parentElement.appendSubElement( elementType, attributeName, typeName, parentElement.tableName() ); std::string inputCol = ora::MappingRules::columnNameForVariable( attributeNameForSchema, scopeNameForSchema ); std::string columnName(inputCol); unsigned int i=0; while(tableRegister.checkColumn(parentElement.tableName(),columnName)){ columnName = ora::MappingRules::newNameForSchemaObject( inputCol, i, ora::MappingRules::MaxColumnNameLength ); i++; } tableRegister.insertColumn(parentElement.tableName(),columnName); me.setColumnNames( std::vector< std::string >( 1, columnName ) ); }
void ora::processTableHierarchy | ( | const MappingElement & | element, |
std::set< std::string > & | tableRegister, | ||
std::vector< std::pair< std::string, std::string > > & | tableList | ||
) |
Definition at line 277 of file MappingElement.cc.
References ora::MappingElement::begin(), ora::MappingElement::columnNames(), ora::MappingElement::end(), ora::MappingElement::tableName(), throwException(), and ora::MappingElement::variableName().
Referenced by ora::MappingElement::tableHierarchy().
{ const std::string& tableName = element.tableName(); std::set<std::string>::iterator iT = tableRegister.find( tableName ); if( iT == tableRegister.end() ){ if( element.columnNames().empty() ){ throwException( "Mapping element for variable \""+element.variableName()+"\" does not specify column names.", "MappingElement::tableHierarchy"); } tableRegister.insert( tableName ); tableList.push_back( std::make_pair(tableName,element.columnNames()[0]) ); } for(MappingElement::const_iterator iEl = element.begin(); iEl != element.end(); ++iEl ){ processTableHierarchy( iEl->second, tableRegister, tableList ); } }
void ora::rebuildPoolMapping | ( | const std::string & | scope, |
const std::string & | extraScope, | ||
const std::map< std::string, std::vector< MappingRawElement > > & | elementsByScope, | ||
ora::MappingRawData & | dest, | ||
int & | counter | ||
) |
Definition at line 715 of file PoolDatabaseSchema.cc.
References ora::MappingRawData::addElement(), and ora::MappingRawElement::scopeName.
Referenced by ora::PoolMappingSchema::getMapping().
{ std::map<std::string, std::vector<MappingRawElement> >::const_iterator iSc = elementsByScope.find( scope ); if( iSc != elementsByScope.end() ){ for( std::vector<MappingRawElement>::const_iterator iMap = iSc->second.begin(); iMap != iSc->second.end(); ++iMap ){ MappingRawElement& elem = dest.addElement( counter ) = *iMap; elem.scopeName = extraScope+"::"+iMap->scopeName; counter++; rebuildPoolMapping( scope+"::"+iMap->variableName, extraScope, elementsByScope, dest, counter ); } } }
void ora::scanElement | ( | const MappingElement & | element, |
const TableInfo & | currentTable, | ||
bool | isDependency, | ||
std::vector< std::string > & | tableHierarchy, | ||
std::map< std::string, TableInfo > & | tableMap | ||
) |
Definition at line 64 of file MappingTree.cc.
References ora::MappingElement::begin(), ora::MappingElement::Blob, ora::MappingElement::columnNames(), ora::MappingElement::elementType(), ora::MappingElement::end(), ora::TableInfo::m_idColumns, ora::TableInfo::m_tableName, ora::MappingElement::NamedReference, ora::MappingElement::OraReference, ora::MappingElement::Primitive, ora::MappingElement::tableName(), ora::MappingElement::UniqueReference, and ora::MappingElement::variableType().
Referenced by ora::MappingTree::tables().
{ const std::string& tName = element.tableName(); std::map<std::string,TableInfo>::iterator iT = tableMap.find( tName ); if( iT == tableMap.end() ){ tableHierarchy.push_back( tName ); iT = tableMap.insert( std::make_pair( tName, TableInfo() ) ).first; iT->second.m_dependency = isDependency; iT->second.m_tableName = tName; iT->second.m_idColumns = element.columnNames(); iT->second.m_parentTableName = currentTable.m_tableName; iT->second.m_refColumns = currentTable.m_idColumns; } else { const std::vector<std::string>& dataCols = element.columnNames(); MappingElement::ElementType elementType = element.elementType(); switch ( elementType ) { case MappingElement::Primitive : iT->second.m_dataColumns.insert( std::make_pair( dataCols[0], element.variableType() )); break; case MappingElement::Blob : iT->second.m_dataColumns.insert( std::make_pair( dataCols[0], coral::AttributeSpecification::typeNameForId( typeid(coral::Blob) ) )); break; case MappingElement::OraReference : iT->second.m_dataColumns.insert( std::make_pair( dataCols[0], coral::AttributeSpecification::typeNameForId( typeid(int) ) )); iT->second.m_dataColumns.insert( std::make_pair( dataCols[1], coral::AttributeSpecification::typeNameForId( typeid(int) ) )); break; case MappingElement::NamedReference : iT->second.m_dataColumns.insert( std::make_pair( dataCols[0], coral::AttributeSpecification::typeNameForId( typeid(std::string) ) )); break; case MappingElement::UniqueReference : iT->second.m_dataColumns.insert( std::make_pair( dataCols[0], coral::AttributeSpecification::typeNameForId( typeid(std::string) ) )); iT->second.m_dataColumns.insert( std::make_pair( dataCols[1], coral::AttributeSpecification::typeNameForId( typeid(int) ) )); break; default: break; } } TableInfo currT = iT->second; for( MappingElement::const_iterator iM = element.begin(); iM != element.end(); ++iM ){ scanElement( iM->second, currT, isDependency, tableHierarchy, tableMap ); } }
void ora::throwException | ( | const std::string & | message, |
const std::type_info & | sourceType, | ||
const std::string & | methodName | ||
) |
Definition at line 15 of file Exception.cc.
References className(), ora::ClassUtils::demangledName(), and Exception.
{ std::string className = ClassUtils::demangledName( sourceType ); throw Exception( message, className+"::"+methodName ); }
void ora::throwException | ( | const std::string & | message, |
const std::string & | methodName | ||
) |
Definition at line 10 of file Exception.cc.
References Exception.
Referenced by ora::PoolDbCache::add(), ora::PoolContainerHeaderTable::addContainer(), ora::Selection::addIndexItem(), ora::MappingToSchema::alter(), ora::MappingElement::alterType(), ora::MappingElement::appendSubElement(), ora::BlobWriterBase::bindData(), ora::PrimitiveStreamerBase::bindDataForRead(), ora::NamedReferenceStreamerBase::bindDataForRead(), ora::OraReferenceStreamerBase::bindDataForRead(), ora::NamedReferenceStreamerBase::bindDataForUpdate(), ora::PrimitiveStreamerBase::bindDataForUpdate(), ora::OraReferenceStreamerBase::bindDataForUpdate(), ora::MultiIndexDataTrie::branchSize(), ora::STLContainerWriter::build(), ora::DependentClassReader::build(), ora::OraPtrWriter::build(), ora::CArrayWriter::build(), ora::BlobReader::build(), ora::STLContainerReader::build(), ora::QueryableVectorWriter::build(), ora::DependentClassWriter::build(), ora::CArrayReader::build(), ora::OraPtrUpdater::build(), ora::ObjectStreamerBase::buildBaseDataMembers(), ora::NamedReferenceStreamerBase::buildDataElement(), ora::PrimitiveStreamerBase::buildDataElement(), ora::BlobWriterBase::buildDataElement(), ora::OraReferenceStreamerBase::buildDataElement(), ora::InlineCArrayStreamerBase::buildDataElement(), ora::ObjectStreamerBase::buildDataMembers(), ora::Object::cast(), checkString(), ora::Database::checkTransaction(), ora::DatabaseUtilitySession::containerHandle(), ora::Database::containerHandle(), ora::OraMappingElementTable::create(), ora::PoolContainerHeaderTable::create(), ora::OraContainerHeaderTable::create(), ora::PoolMappingElementTable::create(), ora::PoolMainTable::create(), ora::OraMappingVersionTable::create(), ora::OraNamingServiceTable::create(), ora::OraSequenceTable::create(), ora::OraMainTable::create(), ora::CondMetadataTable::create(), ora::PoolMappingVersionTable::create(), ora::PoolDatabaseSchema::create(), ora::PoolClassVersionTable::create(), ora::PoolSequenceTable::create(), ora::OraClassVersionTable::create(), ora::Database::createContainer(), ora::MappingGenerator::createNewDependentMapping(), ora::MappingGenerator::createNewMapping(), ora::MultiRecordSelectOperation::data(), ora::SelectOperation::data(), ora::PoolContainerHeaderTable::decrementNumberOfObjects(), ora::Object::destruct(), ora::CondMetadataTable::drop(), ora::MappingElement::elementTypeAsString(), ora::MappingElement::elementTypeFromString(), ora::DatabaseUtilitySession::eraseMapping(), ora::ContainerSchema::evolve(), ora::PoolSequenceTable::exists(), ora::OraDatabaseSchema::exists(), ora::PoolDatabaseSchema::exists(), ora::DatabaseContainer::fetchItemAsType(), ora::PoolDbCache::find(), ora::SharedSession::get(), ora::MappingDatabase::getBaseMappingForContainer(), getContainerFromSession(), ora::MappingDatabase::getDependentMappingsForContainer(), ora::IteratorBuffer::getItemAsType(), ora::PoolSequenceTable::getLastId(), ora::MappingDatabase::getMappingByVersion(), ora::MappingDatabase::getMappingForContainer(), ora::MappingElement::idColumn(), ora::DatabaseUtilitySession::importContainerSchema(), ora::PoolContainerHeaderTable::incrementNumberOfObjects(), ora::ContainerSchema::initClassDict(), ora::PoolMappingSchema::insertClassVersion(), ora::DatabaseContainer::insertItem(), ora::Container::insertItem(), ora::STLContainerHandler::iterate(), ora::PVectorHandler::iterate(), ora::DatabaseUtility::listMappings(), ora::DatabaseUtility::listMappingVersions(), ora::RelationalPtrLoader::load(), ora::RelationalRefLoader::load(), ora::ClassUtils::loadDictionary(), ora::ContainerSchema::loadMappingForDependentClass(), ora::MultiIndexDataTrie::lookupAndClear(), ora::ClassUtils::lookupDictionary(), ora::ContainerSchema::mapping(), ora::ContainerSchema::mappingForDependentClass(), ora::ArrayHandlerFactory::newArrayHandler(), ora::RelationalStreamerFactory::newStreamer(), ora::Database::open(), cond::parseToken(), ora::MappingElement::pkColumn(), ora::MappingElement::posColumn(), ora::ArrayMapping::process(), ora::OraReferenceMapping::process(), ora::ObjectMapping::process(), ora::UniqueReferenceMapping::process(), ora::CArrayMapping::process(), processBaseClasses(), processLeafElement(), processTableHierarchy(), ora::Ptr< T >::ptr(), ora::UniqueRef< T >::ptr(), ora::MultiIndexDataTrie::push(), ora::PVectorHandler::PVectorHandler(), ora::QueryableVector< Tp >::query(), ora::QVReader::read(), ora::CArrayReader::read(), ora::DependentClassReader::read(), ora::BlobReader::read(), ora::OraPtrReader::read(), ora::UniqueRefReader::read(), ora::STLContainerReader::read(), ora::QueryableVectorReader::read(), ora::ReadBuffer::ReadBuffer(), ora::MappingElement::recordIdColumns(), ora::PoolContainerHeaderTable::removeContainer(), ora::NamedRef< T >::safePtr(), ora::CArrayReader::select(), ora::QVReader::select(), ora::OraPtrReader::select(), ora::QueryableVector< Tp >::select(), ora::STLContainerReader::select(), ora::MultiRecordSelectOperation::selectRow(), ora::PoolMappingSchema::setMappingVersion(), ora::QVReader::setQueryCondition(), ora::PoolSequenceTable::sinchronize(), ora::SpecialSTLContainerHandler::SpecialSTLContainerHandler(), ora::STLContainerHandler::STLContainerHandler(), ora::Database::transaction(), ora::PVectorUpdater::update(), ora::QueryableVectorUpdater::update(), ora::OraPtrUpdater::update(), ora::UpdateBuffer::UpdateBuffer(), ora::Container::updateItem(), ora::DatabaseContainer::updateItem(), ora::PoolContainerHeaderTable::updateNumberOfObjects(), ora::Handle< T >::validate(), ora::STLContainerWriter::write(), ora::QueryableVectorWriter::write(), ora::CArrayWriter::write(), ora::DependentClassWriter::write(), ora::OraPtrWriter::write(), ora::UniqueRefWriter::write(), and ora::WriteBuffer::WriteBuffer().
std::string ora::uniqueRefNullLabel | ( | ) |
Definition at line 181 of file UniqueRefStreamer.cc.
Referenced by ora::UniqueRefWriter::write().
{ static std::string nullLabel("ora::UniqueRef::Null"); return nullLabel; }
static std::string ora::validChars | ( | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-0123456789" | ) | [static] |
Referenced by checkString().
std::string ora::variableNameFromPool | ( | const std::string & | variableName | ) |
Definition at line 673 of file PoolDatabaseSchema.cc.
Referenced by ora::PoolMappingSchema::getMapping().
{ size_t ind = variableName.find("pool::PVector"); if( ind != std::string::npos ){ return "ora::PVector"+variableName.substr(13); } return variableName; }