25 #ifndef LSST_MWI_PERSISTENCE_DBSTORAGE_H
26 #define LSST_MWI_PERSISTENCE_DBSTORAGE_H
53 #include <boost/scoped_ptr.hpp>
57 namespace persistence {
61 class DbStorageLocation;
65 typedef boost::shared_ptr<DbStorage>
Ptr;
78 std::string
const& templateName,
79 bool mayAlreadyExist =
false);
80 virtual void dropTable(std::string
const& tableName);
83 virtual void executeSql(std::string
const& sqlStatement);
87 void setColumn(std::string
const& columnName, T
const& value);
94 std::vector<std::string>
const& tableNameList);
95 virtual void outColumn(std::string
const& columnName,
bool isExpr =
false);
96 template <
typename T>
void outParam(std::string
const& columnName,
97 T* location,
bool isExpr =
false);
98 template <
typename T>
void condParam(std::string
const& paramName,
100 virtual void orderBy(std::string
const& expression);
101 virtual void groupBy(std::string
const& expression);
103 virtual void query(
void);
104 virtual bool next(
void);
110 explicit DbStorage(std::type_info
const& type);
113 boost::scoped_ptr<DbStorageImpl>
_impl;
void outParam(std::string const &columnName, T *location, bool isExpr=false)
virtual void executeSql(std::string const &sqlStatement)
virtual void outColumn(std::string const &columnName, bool isExpr=false)
void setColumn(std::string const &columnName, T const &value)
boost::scoped_ptr< DbStorageImpl > _impl
Implementation class for isolation.
Class for logical location of a persisted Persistable instance.
virtual void setQueryWhere(std::string const &whereClause)
boost::shared_ptr< Policy > Ptr
T const & getColumnByPos(int pos)
boost::shared_ptr< DbStorage > Ptr
Interface for Storage abstract base class.
virtual void dropTable(std::string const &tableName)
bool columnIsNull(int pos)
void condParam(std::string const ¶mName, T const &value)
Class for database storage.
virtual void startTransaction(void)
virtual void groupBy(std::string const &expression)
virtual void setPolicy(lsst::pex::policy::Policy::Ptr policy)
virtual void orderBy(std::string const &expression)
virtual void setRetrieveLocation(LogicalLocation const &location)
virtual void endTransaction(void)
virtual void insertRow(void)
virtual void setTableForQuery(std::string const &tableName, bool isExpr=false)
virtual void setTableListForQuery(std::vector< std::string > const &tableNameList)
virtual void finishQuery(void)
virtual void setTableForInsert(std::string const &tableName)
virtual void setPersistLocation(LogicalLocation const &location)
virtual void createTableFromTemplate(std::string const &tableName, std::string const &templateName, bool mayAlreadyExist=false)
virtual void setColumnToNull(std::string const &columnName)
Abstract base class for storage implementations.
virtual void truncateTable(std::string const &tableName)