Commit f114cf38 authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Change '#ifdef COOL260' into '#ifdef COOL270'.

Some API extensions will definitely be released in COOL260
(tag cloning and a few changes to existing classes),
some may only make it to COOL270
(IOV truncation, payload queries, manual transations).


git-svn-id: file:///git/lcgcool.svndb/cool/trunk@14362 4525493e-7705-40b1-a816-d608a930855b
parent 5667f130
// $Id: CompositeSelection.h,v 1.3 2008-07-31 11:20:41 avalassi Exp $
// $Id: CompositeSelection.h,v 1.4 2008-08-27 10:41:55 avalassi Exp $
#ifndef COOLKERNEL_COMPOSITESELECTION_H
#define COOLKERNEL_COMPOSITESELECTION_H 1
#ifdef COOL260
#ifdef COOL270
// Include files
#include <vector>
......
// $Id: FieldSelection.h,v 1.11 2008-08-21 08:26:08 avalassi Exp $
// $Id: FieldSelection.h,v 1.12 2008-08-27 10:41:55 avalassi Exp $
#ifndef COOLKERNEL_FIELDSELECTION_H
#define COOLKERNEL_FIELDSELECTION_H 1
#ifdef COOL260
#ifdef COOL270
// Include files
#include "CoolKernel/FieldSpecification.h"
......
// $Id: IDatabase.h,v 1.83 2008-07-08 10:10:32 avalassi Exp $
// $Id: IDatabase.h,v 1.84 2008-08-27 10:41:55 avalassi Exp $
#ifndef COOLKERNEL_IDATABASE_H
#define COOLKERNEL_IDATABASE_H 1
......@@ -7,7 +7,7 @@
#include "CoolKernel/FolderVersioning.h"
#include "CoolKernel/IHvsNode.h"
#include "CoolKernel/pointers.h"
#ifdef COOL260
#ifdef COOL270
#include "CoolKernel/ITransaction.h"
#endif
......@@ -171,7 +171,7 @@ namespace cool
/// Return the "COOL database name".
virtual const std::string& databaseName() const = 0;
#ifdef COOL260
#ifdef COOL270
/// Start a new transaction and enter manual transaction mode
virtual ITransactionPtr startTransaction() = 0;
#endif
......
// $Id: IFolder.h,v 1.120 2008-08-27 10:32:21 avalassi Exp $
// $Id: IFolder.h,v 1.121 2008-08-27 10:41:55 avalassi Exp $
#ifndef COOLKERNEL_IFOLDER_H
#define COOLKERNEL_IFOLDER_H
......@@ -127,7 +127,7 @@ namespace cool {
const std::string& userTagName = "",
const bool userTagOnly = false ) = 0;
#ifdef COOL260
#ifdef COOL270
/// Set a new finite end-of-validity value for all SV objects in a given
/// channel selection whose end-of-validity is currently infinite.
/// The channel selection is specified through a ChannelSelection object.
......@@ -179,7 +179,7 @@ namespace cool {
const ValidityKey& until,
const ChannelSelection& channels,
const std::string& tagName = ""
#ifdef COOL260
#ifdef COOL270
, const IRecordSelection* payloadQuery = 0
#endif
) const = 0;
......@@ -199,7 +199,7 @@ namespace cool {
const ValidityKey& until,
const ChannelSelection& channels,
const std::string& tagName = ""
#ifdef COOL260
#ifdef COOL270
, const IRecordSelection* payloadQuery = 0
#endif
) const = 0;
......
// $Id: IRecordSelection.h,v 1.8 2008-07-29 06:51:14 avalassi Exp $
// $Id: IRecordSelection.h,v 1.9 2008-08-27 10:41:56 avalassi Exp $
#ifndef COOLKERNEL_IRECORDSELECTION_H
#define COOLKERNEL_IRECORDSELECTION_H 1
......@@ -8,7 +8,7 @@
namespace cool
{
#ifdef COOL260
#ifdef COOL270
//--------------------------------------------------------------------------
......
// $Id: RecordSelectionException.h,v 1.1 2008-07-31 11:34:17 avalassi Exp $
// $Id: RecordSelectionException.h,v 1.2 2008-08-27 10:41:56 avalassi Exp $
#ifndef COOLKERNEL_RECORDSELECTIONEXCEPTION_H
#define COOLKERNEL_RECORDSELECTIONEXCEPTION_H 1
......@@ -8,7 +8,7 @@
namespace cool {
#ifdef COOL260
#ifdef COOL270
//--------------------------------------------------------------------------
......
......@@ -11,8 +11,8 @@ use LCG_Policy v*
use Boost v* LCG_Interfaces
use CORAL v* LCG_Interfaces
# Uncomment this line to enable the COOL260 API extensions
###macro_append use_pp_cppflags ' -DCOOL260' WIN32 ' /DCOOL260'
# Uncomment this line to enable the COOL270 API extensions
###macro_append use_pp_cppflags ' -DCOOL270' WIN32 ' /DCOOL270'
# Disable CRT deprecation warnings on VC9 (getenv, sprintf...)
macro_append use_pp_cppflags '' win32_vc9_dbg '/D_CRT_SECURE_NO_WARNINGS'
......
......@@ -4,6 +4,16 @@ Package managers: Andrea Valassi, Sven A. Schmidt and Marco Clemencic.
==============================================================================
!2008.08.27 - Andrea
Change '#ifdef COOL260' into '#ifdef COOL270'.
Some API extensions will definitely be released in COOL260
(tag cloning and a few changes to existing classes),
some may only make it to COOL270
(IOV truncation, payload queries, manual transations).
==============================================================================
!2008.08.27 - Andrea
Changes disabled by #ifdef COOL260 (truncateValidity, task #7656):
- Add the IFolder::truncateObjectValidity method.
[This is not implemented yet!].
......
// $Id: CompositeSelection.cpp,v 1.5 2008-07-31 11:39:48 avalassi Exp $
#ifdef COOL260
// $Id: CompositeSelection.cpp,v 1.6 2008-08-27 10:41:56 avalassi Exp $
#ifdef COOL270
// Include files
#include <sstream>
......
// $Id: FieldSelection.cpp,v 1.13 2008-08-20 20:58:26 avalassi Exp $
#ifdef COOL260
// $Id: FieldSelection.cpp,v 1.14 2008-08-27 10:41:56 avalassi Exp $
#ifdef COOL270
// Include files
//#include <iostream>
......
// $Id: test_RecordSelection.cpp,v 1.13 2008-08-13 17:41:18 avalassi Exp $
// $Id: test_RecordSelection.cpp,v 1.14 2008-08-27 10:41:57 avalassi Exp $
// Include files
#include <iostream>
#ifdef COOL260
#ifdef COOL270
//#include "CoolKernel/FieldRangeSelection.h"
#include "CoolKernel/FieldSelection.h"
//#include "CoolKernel/RecordSelection.h"
......@@ -37,7 +37,7 @@ public:
void test_createFieldSelection()
{
#ifdef COOL260
#ifdef COOL270
try
{
RecordSpecification spec;
......@@ -150,7 +150,7 @@ public:
throw;
}
#else
std::cout << "WARNING! COOL260 API is disabled" << std::endl;
std::cout << "WARNING! COOL270 API is disabled" << std::endl;
#endif
}
......
// $Id: PyCool_headers.h,v 1.62 2008-08-26 08:38:27 avalassi Exp $
// $Id: PyCool_headers.h,v 1.63 2008-08-27 10:41:57 avalassi Exp $
#ifndef DICT_PYCOOL_HEADERS_H
#define DICT_PYCOOL_HEADERS_H 1
......@@ -139,7 +139,7 @@ public:
// This is needed to declare all FieldSelection ctors to genreflex
template<typename T> void dummyMethod( const T& refValue )
{
#ifdef COOL260
#ifdef COOL270
cool::FieldSelection dummy( "",
cool::StorageType::Bool,
cool::FieldSelection::EQ,
......
// $Id: RalObjectIterator2.cpp,v 1.31 2008-08-06 15:39:49 avalassi Exp $
// $Id: RalObjectIterator2.cpp,v 1.32 2008-08-27 10:41:57 avalassi Exp $
// Include files
#include "CoolKernel/types.h"
......@@ -37,7 +37,7 @@ RalObjectIterator2::RalObjectIterator2
const ChannelSelection& channels,
const std::string& tagName,
const bool isUserTag,
#ifdef COOL260
#ifdef COOL270
const IRecordSelection* payloadQuery )
#else
const IRecordSelection* /*payloadQuery*/ )
......@@ -50,7 +50,7 @@ RalObjectIterator2::RalObjectIterator2
, m_versioningMode( folder.versioningMode() )
, m_transaction( new RelationalTransaction( transactionMgr, true ) ) // r/o
, m_dataBuffer( new coral::AttributeList() )
#ifdef COOL260
#ifdef COOL270
, m_selection( payloadQuery != 0 ? payloadQuery->clone() : 0 )
, m_pq( payloadQuery != 0 ?
new RelationalPayloadQuery( *m_selection.get() ) : 0 )
......@@ -272,7 +272,7 @@ const bool RalObjectIterator2::goToNext()
// Iterator (Started or Active) has a non-null next object
else if ( m_currentObject < m_size )
{
#ifdef COOL260
#ifdef COOL270
bool client_side_pq = m_selection.get()!=0 && !m_pq->isTrusted();
// If there is a payload selection (m_selection), fetch objects
// until one satisfies the selection or we have no more objects
......@@ -291,7 +291,7 @@ const bool RalObjectIterator2::goToNext()
}
m_currentObject++;
}
#ifdef COOL260
#ifdef COOL270
while ( client_side_pq
&& !m_selection->select(currentRef().payload())
&& m_currentObject < m_size );
......@@ -304,7 +304,7 @@ const bool RalObjectIterator2::goToNext()
( "cool::RalObjectIterator2::goToNext()" );
if ( m_currentObject < m_size )
return true;
#ifdef COOL260
#ifdef COOL270
// Special case: last object, check it against m_selection->select()
else
return !client_side_pq || m_selection->select( currentRef().payload() );
......@@ -362,7 +362,7 @@ unsigned int RalObjectIterator2::size() const
if ( m_isClosed ) {
throw IteratorIsClosed( "RalObjectIterator2" );
}
#ifdef COOL260
#ifdef COOL270
else if ( m_selection.get()!=0 && !m_pq->isTrusted() )
{
throw RelationalException
......
// $Id: RalObjectIterator2.h,v 1.15 2008-08-06 09:22:39 avalassi Exp $
// $Id: RalObjectIterator2.h,v 1.16 2008-08-27 10:41:57 avalassi Exp $
#ifndef COOLKERNEL_RALOBJECTITERATOR2_H
#define COOLKERNEL_RALOBJECTITERATOR2_H
......@@ -243,7 +243,7 @@ namespace cool {
/// Data buffer used by the active RAL query
boost::shared_ptr<coral::AttributeList> m_dataBuffer;
#ifdef COOL260
#ifdef COOL270
/// Record selection for this iterator
std::auto_ptr<IRecordSelection> m_selection;
......
// $Id: RelationalFolder.cpp,v 1.219 2008-08-27 10:00:41 avalassi Exp $
// $Id: RelationalFolder.cpp,v 1.220 2008-08-27 10:41:57 avalassi Exp $
// Include files
#include <list>
......@@ -490,7 +490,7 @@ RelationalFolder::browseObjects( const ValidityKey& since,
const ChannelSelection& channels,
const std::string& tagName,
const bool prefetchAll
#ifdef COOL260
#ifdef COOL270
, const IRecordSelection* payloadQuery
#endif
) const
......@@ -503,7 +503,7 @@ RelationalFolder::browseObjects( const ValidityKey& since,
TimingReportMgr::startTimer( "cool::RelationalFolder::browseObjects()" );
IObjectIteratorPtr browserIt;
#ifdef COOL260
#ifdef COOL270
if ( payloadQuery != 0 && !payloadQuery->canSelect(payloadSpecification()) )
throw RelationalException
( "Invalid payload query for this folder (wrong payload specification)",
......@@ -530,7 +530,7 @@ RelationalFolder::browseObjects( const ValidityKey& since,
if ( TimingReportMgr::isActive() )
TimingReportMgr::stopTimer( "cool::RelationalFolder::browseObjects()" );
#ifdef COOL260
#ifdef COOL270
if (payloadQuery !=0 )
log() << "Browse objects will return an iterator with a payloadQuery"
<< coral::MessageStream::endmsg;
......@@ -548,7 +548,7 @@ RelationalFolder::browseObjects( const ValidityKey& since,
const ValidityKey& until,
const ChannelSelection& channels,
const std::string& tagName
#ifdef COOL260
#ifdef COOL270
, const IRecordSelection* payloadQuery
#endif
) const
......@@ -565,7 +565,7 @@ RelationalFolder::browseObjects( const ValidityKey& since,
}
*/
return browseObjects( since, until, channels, tagName, m_prefetchAll
#ifdef COOL260
#ifdef COOL270
, payloadQuery
#endif
);
......@@ -581,7 +581,7 @@ RelationalFolder::findObjects( const ValidityKey& pointInTime,
ValidityKey since = pointInTime;
ValidityKey until = pointInTime;
return browseObjects( since, until, channels, tagName, m_prefetchAll
#ifdef COOL260
#ifdef COOL270
, 0
#endif
);
......@@ -597,7 +597,7 @@ RelationalFolder::fetchObjectsInRange( const ValidityKey& since,
{
//return db().fetchObjects( this, since, until, channels, tagName );
return browseObjects( since, until, channels, tagName, m_prefetchAll
#ifdef COOL260
#ifdef COOL270
, 0
#endif
)->fetchAllAsVector();
......@@ -622,7 +622,7 @@ RelationalFolder::countObjects( const ValidityKey& since,
const ValidityKey& until,
const ChannelSelection& channels,
const std::string& tagName
#ifdef COOL260
#ifdef COOL270
, const IRecordSelection* payloadQuery
#endif
) const
......@@ -630,7 +630,7 @@ RelationalFolder::countObjects( const ValidityKey& since,
bool prefetchAll = false;
unsigned int count =
browseObjects( since, until, channels, tagName, prefetchAll
#ifdef COOL260
#ifdef COOL270
, payloadQuery
#endif
)->size();
......@@ -1103,7 +1103,7 @@ RelationalFolder::cloneTagAsUserTag( const std::string& tagName,
ChannelSelection::all(),
tagName,
true
#ifdef COOL260
#ifdef COOL270
, 0
#endif
);
......
// $Id: RelationalFolder.h,v 1.150 2008-08-27 10:34:57 avalassi Exp $
// $Id: RelationalFolder.h,v 1.151 2008-08-27 10:41:57 avalassi Exp $
#ifndef RELATIONALCOOL_RELATIONALFOLDER_H
#define RELATIONALCOOL_RELATIONALFOLDER_H
......@@ -194,7 +194,7 @@ namespace cool {
const ValidityKey& until,
const ChannelSelection& channels,
const std::string& tagName = ""
#ifdef COOL260
#ifdef COOL270
, const IRecordSelection* payloadQuery = 0
#endif
) const;
......@@ -206,7 +206,7 @@ namespace cool {
const ChannelSelection& channels,
const std::string& tagName,
const bool prefetchAll
#ifdef COOL260
#ifdef COOL270
, const IRecordSelection* payloadQuery
#endif
) const;
......@@ -219,7 +219,7 @@ namespace cool {
const ValidityKey& until,
const ChannelSelection& channels,
const std::string& tagName = ""
#ifdef COOL260
#ifdef COOL270
, const IRecordSelection* payloadQuery = 0
#endif
) const;
......
// $Id: RelationalFolderUnsupported.h,v 1.19 2008-08-27 09:53:13 avalassi Exp $
// $Id: RelationalFolderUnsupported.h,v 1.20 2008-08-27 10:41:58 avalassi Exp $
#ifndef RELATIONALCOOL_RELATIONALFOLDERUNSUPPORTED_H
#define RELATIONALCOOL_RELATIONALFOLDERUNSUPPORTED_H
......@@ -171,7 +171,7 @@ namespace cool {
const ValidityKey& /*until*/,
const ChannelSelection& /*channels*/,
const std::string& /*tagName*/
#ifdef COOL260
#ifdef COOL270
,const IRecordSelection* /*payloadQuery*/
#endif
) const
......@@ -202,7 +202,7 @@ namespace cool {
const ValidityKey& /*until*/,
const ChannelSelection& /*channels*/,
const std::string& /*tagName = ""*/
#ifdef COOL260
#ifdef COOL270
, const IRecordSelection* /*payloadQuery = 0*/
#endif
) const
......
// $Id: RelationalObjectTable.cpp,v 1.174 2008-08-25 18:00:00 avalassi Exp $
// $Id: RelationalObjectTable.cpp,v 1.175 2008-08-27 10:41:58 avalassi Exp $
// Include files
#include "CoralBase/AttributeSpecification.h"
......@@ -1538,7 +1538,7 @@ RelationalObjectTable::queryDefinitionGeneric
}
if ( payloadQuery !=0 )
{
#ifdef COOL260
#ifdef COOL270
RelationalPayloadQuery pq(*payloadQuery, cool_i_main,
m_queryMgr->databaseTechnology());
......@@ -1549,7 +1549,7 @@ RelationalObjectTable::queryDefinitionGeneric
//std::cout <<"where clause "<< whereClauseMQ << std::endl;
#else
throw RelationalException
( "PANIC! Payload queries while COOL260 is not defined?",
( "PANIC! Payload queries while COOL270 is not defined?",
"RelationalObjectTable" );
#endif
}
......
// $Id: RelationalPayloadQuery.cpp,v 1.10 2008-08-06 16:28:08 avalassi Exp $
#ifdef COOL260
// $Id: RelationalPayloadQuery.cpp,v 1.11 2008-08-27 10:41:58 avalassi Exp $
#ifdef COOL270
// Include files
#include <typeinfo>
......
// $Id: RelationalPayloadQuery.h,v 1.5 2008-08-06 09:22:39 avalassi Exp $
// $Id: RelationalPayloadQuery.h,v 1.6 2008-08-27 10:41:58 avalassi Exp $
#ifndef RELATIONALCOOL_RELATIONALPAYLOADQUERY_H
#define RELATIONALCOOL_RELATIONALPAYLOADQUERY_H
#ifdef COOL260
#ifdef COOL270
// Include files
#include "CoolKernel/CompositeSelection.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment