Public Member Functions | List of all members
cyclus::PrefixInjector Class Reference

Detailed Description

Wrapper class for QueryableBackends that injects prefix in front of the title/table for every query before being executed.

A query to the "MyAgentTable" table will actually be passed to the wrapped backend as [prefix] + "MyAgentTable".

Definition at line 563 of file query_backend.h.

#include <query_backend.h>

Inheritance diagram for cyclus::PrefixInjector:
Inheritance graph

Public Member Functions

virtual std::map< std::string, DbTypesColumnTypes (std::string table)
 PrefixInjector (QueryableBackend *b, std::string prefix)
virtual QueryResult Query (std::string table, std::vector< Cond > *conds)
virtual std::list< ColumnInfoSchema (std::string table)
virtual std::set< std::string > Tables ()
- Public Member Functions inherited from cyclus::QueryableBackend
virtual ~QueryableBackend ()

Constructor & Destructor Documentation

◆ PrefixInjector()

cyclus::PrefixInjector::PrefixInjector ( QueryableBackend b,
std::string  prefix 

Definition at line 565 of file query_backend.h.

Member Function Documentation

◆ ColumnTypes()

virtual std::map<std::string, DbTypes> cyclus::PrefixInjector::ColumnTypes ( std::string  table)

Return a map of column names of the specified table to the associated database type.

Implements cyclus::QueryableBackend.

Definition at line 573 of file query_backend.h.

◆ Query()

virtual QueryResult cyclus::PrefixInjector::Query ( std::string  table,
std::vector< Cond > *  conds 

Return a set of rows from the specificed table that match all given conditions.

Conditions are AND'd together. conds may be NULL.

Implements cyclus::QueryableBackend.

Definition at line 569 of file query_backend.h.

◆ Schema()

virtual std::list<ColumnInfo> cyclus::PrefixInjector::Schema ( std::string  table)

Return information about all columns of a table.

Implements cyclus::QueryableBackend.

Definition at line 577 of file query_backend.h.

◆ Tables()

virtual std::set<std::string> cyclus::PrefixInjector::Tables ( )

Return a set of all table names currently in the database.

Implements cyclus::QueryableBackend.

Definition at line 581 of file query_backend.h.

The documentation for this class was generated from the following file: