55 if ( attr.p_is_multi_value )
57 std::vector<tref> adj;
58 item.get ( attr.p_name, adj );
61 else if ( attr.p_is_not_null )
68 catch ( daq::dbe::config_object_retrieval_result_is_null
const & e )
70 if ( attr.p_is_not_null )
73 "Query returned null value for an attr that has p_is_not_null set true",
74 "Program parsing data validation failure", item.full_name(),
75 " for attribute ", attr.p_name );
79 DEBUG (
"Query returned null value",
"Program parsing data validation" );
97 return object.
get<
tref> ( r.p_name );
111 catch ( daq::dbe::config_object_retrieval_result_is_null
const & e )
119 std::vector<tref> adjacent;
120 item.get ( r.p_name, adjacent );
132 for (
auto const & x : adjacent )
134 result.push_back ( x.UID().c_str() );
141std::vector<dbe::config_object_description<std::string>>
relation <
142 std::vector<dbe::config_object_description<std::string> > > (
145 std::vector<dbe::config_object_description<std::string>> result;
150 for (
auto const & x : adjacent )
152 result.push_back ( x );
168 input.
get ( relation.p_name, value );
177std::vector<ConfigObject>
192 std::vector<T> voisins;
196 std::vector<T> a = relation<std::vector<T>> ( o, r );
197 voisins.insert ( voisins.end(), a.begin(), a.end() );
200 voisins.erase ( std::unique ( std::begin ( voisins ), std::end ( voisins ) ),
201 std::end ( voisins ) );
215 std::vector<T> voisins;
219 std::vector<tref> a = attribute<std::vector<T>> ( o, attr );
220 voisins.insert ( voisins.end(), a.begin(), a.end() );
223 voisins.erase ( std::unique ( std::begin ( voisins ), std::end ( voisins ) ),
224 std::end ( voisins ) );
238 input.
get ( relation.p_name, value );
247 std::vector<ConfigObject> adjacent;
259 for (
auto const & x : adjacent )
261 result.push_back ( x.UID().c_str() );
271std::vector<ConfigObject>
296std::vector<dbe::config_object_description<std::string> > > (
313 if ( not rlinks.empty() )
315 links.insert ( links.end(), rlinks.begin(), rlinks.end() );
318 links.erase ( std::unique ( links.begin(), links.end() ), links.end() );
326std::vector<inner::configobject::tref>
351std::vector<inner::configobject::tref>
static T linked(dunedaq::conffwk::ConfigObject &item, dunedaq::conffwk::relationship_t const &relation)
static dunedaq::conffwk::class_t definition(std::string const &cn, bool direct_only)
U get(std::string const &key)
std::string class_name() const
std::vector< T > referenced_by(std::string const &name="*", bool check_composite_only=true) const
Represents database objects.
void get(const std::string &name, T &value)
Get value of object's attribute or relationship.
std::vector< T > object(tref const &item)
QStringList relation< QStringList >(tref item, dunedaq::conffwk::relationship_t const &r)
std::vector< T > attributes(tref const &item)
T attribute(tref item, dunedaq::conffwk::attribute_t const &attr)
tref relation< tref >(tref object, dunedaq::conffwk::relationship_t const &r)
tref attribute< tref >(tref object, dunedaq::conffwk::attribute_t const &attr)
T relation(tref item, dunedaq::conffwk::relationship_t const &relation)
std::vector< T > relations(tref const &item)
std::vector< inner::configobject::tref > object< inner::configobject::tref >(inner::configobject::tref const &o)
template std::vector< inner::configobject::tref > linked::by::object< inner::configobject::tref >(inner::configobject::tref const &)
bool is_simple(dunedaq::conffwk::relationship_t const &)
inner::configobject::tref tref