ATLAS Offline Software
Loading...
Searching...
No Matches
CoraCoolFolder.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// CoraCoolFolder.cxx
6// implementation for CoraCoolFolder
7// Richard Hawkings, started 10/2006
8
9#include "RelationalAccess/ISessionProxy.h"
10#include "RelationalAccess/ITransaction.h"
11#include "RelationalAccess/ISchema.h"
12#include "RelationalAccess/ITable.h"
13#include "RelationalAccess/ITableDescription.h"
14#include "RelationalAccess/ITableDataEditor.h"
15#include "RelationalAccess/IBulkOperation.h"
16#include "RelationalAccess/IColumn.h"
17#include "RelationalAccess/IQuery.h"
18#include "RelationalAccess/ICursor.h"
19#include "RelationalAccess/SchemaException.h"
20#include "CoralBase/Attribute.h"
21#include "CoralBase/Exception.h"
22#include "CoolKernel/ValidityKey.h"
23#include "CoolKernel/IDatabase.h"
24#include "CoolKernel/IFolder.h"
25#include "CoolKernel/IObject.h"
26#include "CoolKernel/Record.h"
27#include "CoolKernel/StorageType.h"
30#include "CoraCoolSequence.h"
33
36
37// size of attributelist buffer for write operations
38#define WB_SIZE 256
39
40CoraCoolFolder::CoraCoolFolder(const std::string& coolfolder,
41 coral::ISessionProxy* proxy, cool::IDatabasePtr cooldb,
42 CoraCoolDatabase* coradb, coral::MessageStream& log)
43 :
44 m_foldername(coolfolder),
45 m_proxy(proxy),m_cooldb(std::move(cooldb)),m_coradb(coradb),
46 m_log(log),
49{
50 m_dbname=m_coradb->dbname();
51
52 // get information from COOL
53 m_log << coral::Debug << "Initialize CoraCoolFolder " << coolfolder <<
54 " in database instance " << m_dbname << coral::MessageStream::endmsg;
55
56 std::string folderdesc;
57 try {
59 folderdesc=m_coolfolder->description();
60 }
61 catch (cool::Exception& e) {
62 throw CoraCoolException(e.what(),"CoraCoolFolder::CoraCoolFolder");
63 }
64 m_log << coral::Debug << "COOL Folder description is: " << folderdesc
65 << coral::MessageStream::endmsg;
66
67 // set up linking information between COOL and CORAL folders
68 if (m_coradb->parseFolderDescription(folderdesc,m_tablename,m_keycolcool,
70 m_pkey=(m_keycolcoral!=m_pkeycolcoral);
71 } else {
72 throw CoraCoolException("incorrect <coracool> description string ",
73 "CoraCoolFolder::CoraCoolFolder");
74 }
75
76 // obtain information about CORAL folder
77 try {
78 m_proxy->transaction().start(true);
79 coral::ISchema& schema=m_proxy->nominalSchema();
80 m_table=&schema.tableHandle(m_tablename);
81 m_tabledesc=&(m_table->description());
82 // find type of foreign key
83 // lookup attribute specification for query outputs
84 if (!decodeAttrSpec()) throw CoraCoolException(
85 "Problem extracting attribute specification",
86 "CoraCoolFolder::CoraCoolFolder");
87 m_proxy->transaction().commit();
88 }
89 catch (coral::SessionException& e) {
90 throw CoraCoolException("Problem accessing CORAL table "+m_tablename,
91 "CoraCoolFolder::CoraCoolFolder");
92 }
93}
94
96 delete m_payloadbuf;
97
98 if (m_seqpk) delete m_seqpk;
99 if (m_seqfk) delete m_seqfk;
100}
101
102const std::string&
103
105 static const std::string empty;
106 return empty;
107}
108
109const cool::IRecordSpecification& CoraCoolFolder::fkSpecification()
110 const
111{ return m_coolfolder->payloadSpecification(); }
112
113const cool::RecordSpecification
115 // have to assemble a RecordSpecification and return the specification
116 // as ITableDescription does not allow to get this directly
117 cool::RecordSpecification atrspec;
118 for (AttrItr itr=m_attrvec.begin();itr!=m_attrvec.end();++itr)
119 atrspec.extend(itr->first,nameToCoolType(itr->second));
120 return atrspec;
121}
122
123coral::AttributeList CoraCoolFolder::emptyAttrList() const {
124 // assemble and return an attributelist for use in constructing payloads
125 coral::AttributeList atrlist;
126 for (AttrItr itr=m_attrvec.begin();itr!=m_attrvec.end();++itr)
127 atrlist.extend(itr->first,
128 cool::StorageType::storageType(nameToCoolType(itr->second)).cppType());
129 return atrlist;
130}
131
132int CoraCoolFolder::storeObject (const cool::ValidityKey& since,
133 const cool::ValidityKey until,
134 const_iterator begin,
135 const_iterator end,
136 const cool::ChannelId& channelId,
137 const std::string& tagName,
138 const bool userTagOnly) {
139 // store objects into CORAL table, and reference in COOL table
140 // generate new FK and PK for CORAL data as needed
141
142 int fkey=0;
143 if (m_bulkactive) {
144 fkey=m_nextfk++;
145 ++m_usedfk;
146 bulkInsert(begin,end,fkey,true);
147 } else {
148 // non-bulk insert
149 // first count number of CORAL rows to be inserted
150 unsigned int nrow=0;
151 for (const_iterator payitr=begin;payitr!=end;++payitr) ++nrow;
152 m_log << coral::Debug << "Storing " << nrow << " rows in CoraCool folder "
153 << m_foldername << " channel " << channelId <<
154 coral::MessageStream::endmsg;
155
156 // generate keys - start transaction here
157 int pkey;
158 try {
159 m_proxy->transaction().start(false);
160 CoraCoolSequence seqfk(m_dbname,m_tablename+"_FK",m_proxy,false);
161 fkey=seqfk.fetch();
162 if (m_pkey) {
163 CoraCoolSequence seqfk(m_dbname,m_tablename+"_PK",m_proxy,false);
164 pkey=seqfk.fetch(nrow);
165 } else {
166 pkey=0; // set to 0 to satisfy compiler
167 }
168 // commit key transaction, releasing lock on keytable
169 m_proxy->transaction().commit();
170 }
171 catch (coral::Exception& e) {
172 throw CoraCoolException(e.what(),"CoraCoolFolder::storeObject(key)");
173 }
174
175 // insert rows into CORAL, using bulk operation
176 try {
177 m_proxy->transaction().start(false);
178 coral::ISchema& schema=m_proxy->nominalSchema();
179 m_table=&schema.tableHandle(m_tablename);
180 coral::ITableDataEditor& editor=m_table->dataEditor();
181 coral::AttributeList data=*begin;
182 coral::IBulkOperation* bulki=editor.bulkInsert(data,WB_SIZE);
183
184 for (const_iterator payitr=begin;payitr!=end;++payitr) {
185 // copy data from iterator
186 data.fastCopyData(*payitr);
187 // update the keys
189 if (m_pkey) setAttrKey(data[m_pkeycolcoral],pkey++);
190 // store data into CORAL table
191 bulki->processNextIteration();
192 }
193 bulki->flush();
194 m_proxy->transaction().commit();
195 }
196 catch (coral::Exception& e) {
197 throw CoraCoolException(e.what(),"CoraCoolFolder::storeObject(payload)");
198 }
199
200 // now store data in COOL, with correct foreign key (bulk/non bulk)
201 // in bulk case, the COOL operation is already going via storage buffer
202 }
203 cool::Record coolfk(m_coolfolder->payloadSpecification());
204 setFieldKey(coolfk[m_keycolcool],fkey);
205 try {
206 m_coolfolder->storeObject(since,until,coolfk,channelId,tagName,
207 userTagOnly);
208 }
209 catch (cool::Exception &e) {
210 throw CoraCoolException(e.what(),"CoraCoolFolder::storeObject");
211 }
212 // return FK value, in case user wants to use it in a reference object call
213 return fkey;
214}
215
216// Actually ok, but marked as not thread-safe due to the copy
217// of the (non-shared) AttributeList.
219 // flush any existing data first to get clean state
221 if (m_payloadbuf==0) {
222 // actions done if this is the first time setupStorageBuffer done for
223 // this folder
224 // create AttributeList as bulk buffer
225 m_payloadbuf=new coral::AttributeList(emptyAttrList());
226 // setup bulk storage for the COOL folder
227 m_coolfolder->setupStorageBuffer();
228 }
229 // setup bulk operation buffer - transaction begins here
230 m_proxy->transaction().start(false);
231 coral::ISchema& schema=m_proxy->nominalSchema();
232 m_table=&schema.tableHandle(m_tablename);
233 coral::ITableDataEditor& editor=m_table->dataEditor();
234 m_bulki=editor.bulkInsert(*m_payloadbuf,WB_SIZE);
235 // prepare the key sequences
236 if (m_pkey) {
237 if (m_seqpk==0)
239 m_seqpk->querySeq(m_nextpk,true,true);
240 m_usedpk=0;
241 }
242 if (m_seqfk==0)
244 m_seqfk->querySeq(m_nextfk,true,true);
245 m_usedfk=0;
246 m_bulkactive=true;
247 return true;
248}
249
251 if (!m_bulkactive) return;
252 // execute bulk store
253 try {
254 m_bulki->flush();
255 // update the keys
256 if (m_usedpk>0) m_seqpk->fetch(m_usedpk);
257 if (m_usedfk>0) m_seqfk->fetch(m_usedfk);
258 // commit transaction for payload table and keys
259 m_proxy->transaction().commit();
260 }
261 catch (coral::Exception& e) {
262 throw CoraCoolException(e.what(),"CoraCoolFolder::flushStorageBuffer");
263 }
264 m_coolfolder->flushStorageBuffer();
265 m_bulkactive=false;
266}
267
268void CoraCoolFolder::referenceObject(const cool::ValidityKey& since,
269 const cool::ValidityKey& until,
270 const coral::Attribute& fkey,
271 const cool::ChannelId& channelId,
272 const std::string& tagName,
273 const bool userTagOnly) {
274 // add reference to existing payload object
275 // call COOL API, just checking fkey has correct name
276 if (fkey.specification().name()==m_keycolcool) {
277 cool::Record fkeylist(m_coolfolder->payloadSpecification());
278 setFieldAttr(fkeylist[m_keycolcool],fkey);
279 m_coolfolder->storeObject(since,until,fkeylist,channelId,tagName,
280 userTagOnly);
281 } else {
282 throw CoraCoolException("Foreign key name should be "+m_keycolcool,
283 "CoraCool::Folder::referenceObject");
284 }
285}
286
287void CoraCoolFolder::referenceObject(const cool::ValidityKey& since,
288 const cool::ValidityKey& until,
289 const int ifkey,
290 const cool::ChannelId& channelId,
291 const std::string& tagName,
292 const bool userTagOnly) {
293 // add reference to existing payload object, supplying key as int
294 cool::Record fkeylist(m_coolfolder->payloadSpecification());
295 setFieldKey(fkeylist[m_keycolcool],ifkey);
296 m_coolfolder->storeObject(since,until,fkeylist,channelId,tagName,
297 userTagOnly);
298}
299
300void CoraCoolFolder::addPayload(const_iterator begin, const_iterator end) { // Copies AttributeList, giving shared specification.
301 // add payload to the CORAL table, using existing FKs in data
302 // but regenerating primary keys
303
304 // only makes sense to use this method for folders with separate pkeys
305 if (!m_pkey) throw CoraCoolException("Folder has no primary key",
306 "CoralCoolFolder::addPayload");
307 if (m_bulkactive) {
308 // via bulk operation buffer
309 bulkInsert(begin,end,0,false);
310 } else {
311 // first count number of CORAL rows to be inserted
312 unsigned int nrow=0;
313 for (const_iterator payitr=begin;payitr!=end;++payitr) ++nrow;
314 m_log << coral::Debug << "Adding " << nrow << " into CoraCool folder "
315 << m_foldername << coral::MessageStream::endmsg;
316 // generate keys - start transaction here
317 int pkey;
318 try {
319 m_proxy->transaction().start(false);
320 CoraCoolSequence seqfk(m_dbname,m_tablename+"_PK",m_proxy,false);
321 pkey=seqfk.fetch(nrow);
322 // commit key transaction, releasing lock on keytable
323 m_proxy->transaction().commit();
324 }
325 catch (coral::Exception& e) {
326 throw CoraCoolException(e.what(),"CoraCoolFolder::addPayload(key)");
327 }
328 // insert rows into CORAL
329 try {
330 m_proxy->transaction().start(false);
331 coral::ISchema& schema=m_proxy->nominalSchema();
332 m_table=&schema.tableHandle(m_tablename);
333 coral::ITableDataEditor& editor=m_table->dataEditor();
334
335 for (const_iterator payitr=begin;payitr!=end;++payitr) {
336 // store data, updating pkey
337 coral::AttributeList data=*payitr;
339 editor.insertRow(data);
340 }
341 m_proxy->transaction().commit();
342 }
343 catch (coral::Exception& e) {
344 throw CoraCoolException(e.what(),"CoraCoolFolder::addPayload(payload)");
345 }
346 }
347}
348
349bool CoraCoolFolder::setAttrKey(coral::Attribute& attr,
350 const int keyval) {
351 // set the value of the key in the attribute, regardless of type
352 const std::string typen=attr.specification().typeName();
353 if (typen=="int") {
354 attr.data<int>()=keyval;
355 } else if (typen=="unsigned int") {
356 attr.data<unsigned int>()=keyval;
357 } else if (typen=="long long") {
358 attr.data<long long>()=keyval;
359 } else if (typen=="unsigned long long") {
360 attr.data<unsigned long long>()=keyval;
361 } else {
362 // throw exception here?
363 m_log << coral::Error << "Unrecognised key type " << typen <<
364 " in CoraCoolFolder::setAttrKey" << coral::MessageStream::endmsg;
365 return false;
366 }
367 return true;
368}
369
370bool CoraCoolFolder::setFieldKey(cool::IField& attr,
371 const int keyval) {
372 // set the value of the key in the Record, regardless of type
373 const cool::StorageType& typen=attr.specification().storageType();
374 if (typen==cool::StorageType::Int32) {
375 attr.setValue<int>(keyval);
376 } else if (typen==cool::StorageType::UInt32) {
377 attr.setValue<unsigned int>(keyval);
378 } else if (typen==cool::StorageType::Int64) {
379 attr.setValue<long long>(keyval);
380 } else if (typen==cool::StorageType::UInt63) {
381 attr.setValue<unsigned long long>(keyval);
382 } else {
383 // throw exception here?
384 m_log << coral::Error << "Unrecognised key type " << typen.name() <<
385 " in CoraCoolFolder::setFieldKey" << coral::MessageStream::endmsg;
386 return false;
387 }
388 return true;
389}
390
391bool CoraCoolFolder::setFieldAttr(cool::IField& attr,
392 const coral::Attribute& keyval) {
393 // set the value of the key in the Record, from input Attribute
394 const cool::StorageType& typen=attr.specification().storageType();
395 if (typen==cool::StorageType::Int32) {
396 attr.setValue<int>(keyval.data<int>());
397 } else if (typen==cool::StorageType::UInt32) {
398 attr.setValue<unsigned int>(keyval.data<unsigned int>());
399 } else if (typen==cool::StorageType::Int64) {
400 attr.setValue<long long>(keyval.data<long long>());
401 } else if (typen==cool::StorageType::UInt63) {
402 attr.setValue<unsigned long long>(keyval.data<unsigned long long>());
403 } else {
404 // throw exception here?
405 m_log << coral::Error << "Unrecognised key type " << typen.name() <<
406 " in CoraCoolFolder::setFieldAttr" << coral::MessageStream::endmsg;
407 return false;
408 }
409 return true;
410}
411
412
413int CoraCoolFolder::getAttrKey(const coral::Attribute& attr) {
414 const std::string typen=attr.specification().typeName();
415 if (typen=="int") {
416 return attr.data<int>();
417 } else if (typen=="unsigned int") {
418 return static_cast<int>(attr.data<unsigned int>());
419 } else if (typen=="long long") {
420 return static_cast<int>(attr.data<long long>());
421 } else if (typen=="unsigned long long") {
422 return static_cast<int>(attr.data<unsigned long long>());
423 } else {
424 m_log << coral::Error << "Unrecognised key type " << typen <<
425 " in CoraCoolFolder::getAttrKey" << coral::MessageStream::endmsg;
426 return 0;
427 }
428}
429
431 // read information from the CORACOOLATTR table
432 bool bres=false;
433 coral::IQuery* query=0;
434 try {
435 coral::ITable& table=m_proxy->nominalSchema().tableHandle(
436 m_dbname+"_CORACOOLATTR");
437 query=table.newQuery();
438 coral::AttributeList bindvar;
439 bindvar.extend<std::string>("SNAME");
440 bindvar[0].data<std::string>()=m_tablename;
441 query->setCondition("NAME=:SNAME",bindvar);
442 query->setRowCacheSize(1);
443 query->defineOutputType("NAME","string");
444 coral::ICursor& cursor=query->execute();
445 if (cursor.next()) {
446 const coral::AttributeList& res=cursor.currentRow();
447 std::string spec=res["ATTRSPEC"].data<std::string>();
448 // decode specification
449 std::string::size_type iofs1,iofs2,iofs3;
450 iofs1=0;
451 bool last=false;
452 while (!last) {
453 iofs2=spec.find(':',iofs1);
454 iofs3=spec.find(',',iofs2);
455 if (iofs3==std::string::npos) {
456 iofs3=spec.size();
457 last=true;
458 }
459 m_attrvec.emplace_back(spec.substr(iofs1,iofs2-iofs1),spec.substr(iofs2+1,iofs3-iofs2-1));
460 if (!last) iofs1=iofs3+1;
461 }
462 bres=true;
463 } else {
464 m_log << coral::Error << "No data obtained for CORACOOLATTR" <<
465 coral::MessageStream::endmsg;
466 }
467 }
468 catch (coral::Exception &e) {
469 m_log << coral::Error << "Exception reading CORACOOLATTR table: "
470 << e.what() << coral::MessageStream::endmsg;
471 }
472 delete query;
473 return bres;
474}
475
476cool::StorageType::TypeId CoraCoolFolder::nameToCoolType(
477 const std::string& coolName) const {
478 if (coolName=="Int16") return cool::StorageType::Int16;
479 if (coolName=="UInt16") return cool::StorageType::UInt16;
480 if (coolName=="Int32") return cool::StorageType::Int32;
481 if (coolName=="UInt32") return cool::StorageType::UInt32;
482 if (coolName=="UInt63") return cool::StorageType::UInt63;
483 if (coolName=="Int64") return cool::StorageType::Int64;
484 if (coolName=="Float") return cool::StorageType::Float;
485 if (coolName=="Double") return cool::StorageType::Double;
486 if (coolName=="String255") return cool::StorageType::String255;
487 if (coolName=="String4k") return cool::StorageType::String4k;
488 if (coolName=="String64k") return cool::StorageType::String64k;
489 if (coolName=="String16M") return cool::StorageType::String16M;
490 if (coolName=="Blob64k") return cool::StorageType::Blob64k;
491
492 throw CoraCoolException("Undefined type: "+coolName,
493 "CoraCoolFolder::nameToCoolType");
494}
495
497 for (AttrItr itr=m_attrvec.begin();itr!=m_attrvec.end();++itr)
498 query->defineOutputType(itr->first,
499 coral::AttributeSpecification::typeNameForId(
500 cool::StorageType::storageType(nameToCoolType(itr->second)).cppType()));
501}
502
504 const int fkey,bool updatefk) {
505 // do bulk insertion into CORAL table buffer
506 // if updateFK=true, update rows with given FK value
507 try {
508 for (const_iterator payitr=begin;payitr!=end;++payitr) {
509 // copy data into buffer bound to bulk insert
510 m_payloadbuf->fastCopyData(*payitr);
511 // update the keys
512 if (updatefk) setAttrKey((*m_payloadbuf)[m_keycolcoral],fkey);
513 if (m_pkey) {
515 ++m_usedpk;
516 }
517 // add to bulk operation
518 m_bulki->processNextIteration();
519 }
520 }
521 catch (coral::Exception& e) {
522 throw CoraCoolException(e.what(),"CoraCoolFolder::bulkInsert");
523 }
524}
525
527 const cool::ValidityKey& pointInTime, const cool::ChannelId& channelId,
528 const std::string& tagName) {
529 // first query cool to get foreign key
530 m_log << coral::Debug << "CoraCoolFolder query time " << pointInTime <<
531 " channel " << channelId << " tag " << tagName << coral::MessageStream::endmsg;
532 cool::IObjectPtr obj=m_coolfolder->findObject(pointInTime,channelId,tagName);
533 // create result object with IOV from COOL
534 CoraCoolObjectPtr result(new CoraCoolObject(obj->since(),obj->until(),
535 obj->channelId()));
536 // now query CORAL for payload
537 try {
538 m_proxy->transaction().start(true);
539 coral::IQuery* query=m_table->newQuery();
540 std::string where=m_keycolcoral+"=:"+m_keycolcool;
541 const coral::AttributeList& fkeybind=obj->payload().attributeList();
542 query->setCondition(where,fkeybind);
543 coral::ICursor& cursor=query->execute();
544 while (cursor.next()) {
545 const coral::AttributeList& res=cursor.currentRow();
546 result->add(res);
547 }
548 delete query;
549 m_proxy->transaction().commit();
550 }
551 catch (coral::Exception& e) {
552 throw CoraCoolException(e.what(),"CoraCoolFolder::findObject");
553 }
554 return result;
555}
556
558 const cool::ValidityKey& pointInTime,
559 const cool::ChannelSelection& channels,
560 const std::string& tagName) {
561 return browseObjects(pointInTime,pointInTime,channels,tagName);
562}
563
565 const cool::ValidityKey& since,
566 const cool::ValidityKey& until,
567 const cool::ChannelSelection& channels,
568 const std::string& tagName)
569{
570 // first initialise COOL query
571 cool::IObjectIteratorPtr coolitr=m_coolfolder->browseObjects(since,until,
572 channels,tagName);
573 CoraCoolObjectIterPtr itr(new CoraCoolObjectIter(this,std::move(coolitr)));
574 return itr;
575}
576
577void CoraCoolFolder::setPrefetchAll(bool prefetchAll) {
578 // pass setting onto COOL - no special actions for CoraCool yet
579 m_coolfolder->setPrefetchAll(prefetchAll);
580}
581
582coral::ITable* CoraCoolFolder::table() {
583 return &(m_proxy->nominalSchema().tableHandle(m_tablename));
584}
#define WB_SIZE
boost::shared_ptr< CoraCoolObject > CoraCoolObjectPtr
boost::shared_ptr< CoraCoolObjectIter > CoraCoolObjectIterPtr
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
std::pair< std::vector< unsigned int >, bool > res
static const Attributes_t empty
Define macros for attributes used to control the static checker.
std::string m_tablename
const cool::RecordSpecification payloadSpecification() const
coral::ITable * table()
cool::StorageType::TypeId nameToCoolType(const std::string &coolName) const
CoraCoolFolder(const std::string &coolfolder, coral::ISessionProxy *proxy, cool::IDatabasePtr cooldb, CoraCoolDatabase *coradb, coral::MessageStream &log)
cool::IFolderPtr m_coolfolder
std::string m_foldername
void addPayload(const_iterator begin, const_iterator end)
coral::IBulkOperation * m_bulki
void referenceObject(const cool::ValidityKey &since, const cool::ValidityKey &until, const coral::Attribute &fkey, const cool::ChannelId &channelId=0, const std::string &tagName=defaultTagName(), const bool userTagOnly=false)
std::string m_keycolcool
coral::ISessionProxy * proxy()
AttrVec::const_iterator AttrItr
std::string m_dbname
std::string m_keycolcoral
coral::ITable * m_table
coral::MessageStream & m_log
CoraCoolSequence * m_seqfk
std::vector< coral::AttributeList >::const_iterator const_iterator
coral::AttributeList emptyAttrList() const
CoraCoolSequence * m_seqpk
coral::ISessionProxy * m_proxy
void setOutputSpec(coral::IQuery *query)
coral::AttributeList * m_payloadbuf
int storeObject(const cool::ValidityKey &since, const cool::ValidityKey until, const_iterator begin, const_iterator end, const cool::ChannelId &channelId=0, const std::string &tagName=defaultTagName(), const bool userTagOnly=false)
cool::IDatabasePtr m_cooldb
CoraCoolObjectIterPtr browseObjects(const cool::ValidityKey &pointInTime, const cool::ChannelSelection &channels, const std::string &tagName=defaultTagName())
CoraCoolObjectPtr findObject(const cool::ValidityKey &pointInTime, const cool::ChannelId &channelId=0, const std::string &tagName=defaultTagName())
friend class CoraCoolObjectIter
bool setFieldKey(cool::IField &attr, const int keyval)
int getAttrKey(const coral::Attribute &attr)
const cool::IRecordSpecification & fkSpecification() const
CoraCoolDatabase * m_coradb
bool setAttrKey(coral::Attribute &attr, const int keyval)
std::string m_pkeycolcoral
static const std::string & defaultTagName()
void setPrefetchAll(const bool prefetchAll)
bool setFieldAttr(cool::IField &attr, const coral::Attribute &keyval)
void bulkInsert(const_iterator begin, const_iterator end, const int fkey, bool updatefk)
int fetch(const int inc=1)
Definition query.py:1
STL namespace.