ATLAS Offline Software
IRDBRecord.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
15 #ifndef RDBACCESSSVC_IRDBRECORD_H
16 #define RDBACCESSSVC_IRDBRECORD_H
17 
18 #include <string>
19 
27 {
28  public:
29  virtual ~IRDBRecord() = default;
30 
34  virtual bool isFieldNull(const std::string& fieldName) const = 0;
35 
39  virtual int getInt(const std::string& fieldName) const = 0;
40 
44  virtual long getLong(const std::string& fieldName) const = 0;
45 
49  virtual double getDouble(const std::string& fieldName) const = 0;
50 
54  virtual float getFloat(const std::string& fieldName) const = 0;
55 
59  virtual const std::string& getString(const std::string& fieldName) const = 0;
60 
61 
62  // Access array values by index
63  // arrays are implemented using the field with names like NAME_0, NAME_1 etc.
64 
69  virtual int getInt(const std::string& fieldName, unsigned int index) const = 0;
70 
75  virtual long getLong(const std::string& fieldName, unsigned int index) const = 0;
76 
81  virtual double getDouble(const std::string& fieldName, unsigned int index) const = 0;
82 
87  virtual float getFloat(const std::string& fieldName, unsigned int index) const = 0;
88 
93  virtual const std::string& getString(const std::string& fieldName, unsigned int index) const = 0;
94 
95 };
96 
97 #endif
98 
IRDBRecord::getInt
virtual int getInt(const std::string &fieldName) const =0
Get int field value.
IRDBRecord::getFloat
virtual float getFloat(const std::string &fieldName, unsigned int index) const =0
Get array float field value.
IRDBRecord::~IRDBRecord
virtual ~IRDBRecord()=default
IRDBRecord::getDouble
virtual double getDouble(const std::string &fieldName, unsigned int index) const =0
Get array double field value.
index
Definition: index.py:1
IRDBRecord::getString
virtual const std::string & getString(const std::string &fieldName) const =0
Get string field value.
taskman.fieldName
fieldName
Definition: taskman.py:492
IRDBRecord::getLong
virtual long getLong(const std::string &fieldName) const =0
Get long field value.
IRDBRecord::getInt
virtual int getInt(const std::string &fieldName, unsigned int index) const =0
Get array int field value.
IRDBRecord::getLong
virtual long getLong(const std::string &fieldName, unsigned int index) const =0
Get array long field value.
IRDBRecord::isFieldNull
virtual bool isFieldNull(const std::string &fieldName) const =0
Check if the field value is NULL.
IRDBRecord
IRDBRecord is one record in the IRDBRecordset object.
Definition: IRDBRecord.h:27
IRDBRecord::getDouble
virtual double getDouble(const std::string &fieldName) const =0
Get double field value.
IRDBRecord::getFloat
virtual float getFloat(const std::string &fieldName) const =0
Get float field value.
IRDBRecord::getString
virtual const std::string & getString(const std::string &fieldName, unsigned int index) const =0
Get array string field value.