25 #ifndef LSST_MWI_PERSISTENCE_DBTSVSTORAGE_H
26 #define LSST_MWI_PERSISTENCE_DBTSVSTORAGE_H
53 #include <boost/scoped_ptr.hpp>
64 namespace persistence {
68 typedef boost::shared_ptr<DbTsvStorage>
Ptr;
81 std::string
const& templateName,
82 bool mayAlreadyExist =
false);
83 virtual void dropTable(std::string
const& tableName);
88 void setColumn(std::string
const& columnName, T
const& value);
93 template <
typename T>
void outParam(std::string
const& columnName,
94 T* location,
bool isExpr =
false);
95 template <
typename T>
void condParam(std::string
const& paramName,
109 boost::scoped_ptr<std::ofstream>
_osp;
virtual void startTransaction(void)
int _getColumnIndex(std::string const &columnName)
virtual void setPersistLocation(LogicalLocation const &location)
Interface for DbStorage class.
std::vector< std::string > _rowBuffer
Class for logical location of a persisted Persistable instance.
boost::shared_ptr< DbTsvStorage > Ptr
virtual void setPolicy(lsst::pex::policy::Policy::Ptr policy)
char * _fileName
Full pathname for temporary TSV file.
virtual void setColumnToNull(std::string const &columnName)
boost::shared_ptr< Policy > Ptr
std::string _location
Database location URL.
T const & getColumnByPos(int pos)
Class for database storage.
void outParam(std::string const &columnName, T *location, bool isExpr=false)
std::map< std::string, int > _colMap
Map from column names to positions.
std::ostringstream _convertStream
Stream to convert to text.
std::string _tempPath
Directory pathname for temporary TSV file.
virtual void truncateTable(std::string const &tableName)
bool _saveTemp
Do not delete temporary TSV file if true.
boost::scoped_ptr< std::ofstream > _osp
Output TSV stream.
virtual void setTableForInsert(std::string const &tableName)
Class for database storage with data loading from TSV files.
virtual void endTransaction(void)
virtual void createTableFromTemplate(std::string const &tableName, std::string const &templateName, bool mayAlreadyExist=false)
virtual void insertRow(void)
Interface for LogicalLocation class.
void setColumn(std::string const &columnName, T const &value)
virtual void setRetrieveLocation(LogicalLocation const &location)
void condParam(std::string const ¶mName, T const &value)
virtual void dropTable(std::string const &tableName)