#ifndef DBIASCIIDBIMPORTER_H
#define DBIASCIIDBIMPORTER_H
/**
*
* \class COMET::IDbiAsciiDbImporter
*
*
* \brief
* Concept A utility to prepare an ASCII database from a
* a collection of ASCII files.
*
*
* Purpose To prepare a temporary (process specific) ASCII database.
*
*
* Acknowledgments The code is essentially a translation of
* RDBC/TSQLImporter by Valeriy Onuchin 21/03/2001
*
* Contact: A.Finch@lancaster.ac.uk
*
*
*
*/
#include
#include
#include "IDbiExceptionLog.hxx"
namespace COMET {
class IDbiAsciiTablePreparer;
}
class TSQLServer;
class TString;
namespace COMET {
class IDbiAsciiDbImporter
{
public:
IDbiAsciiDbImporter();
IDbiAsciiDbImporter(const TString& url,TSQLServer* server);
virtual ~IDbiAsciiDbImporter();
const IDbiExceptionLog& GetExceptionLog() const { return fExceptionLog; }
Int_t Import(const TString& url,TSQLServer* server);
const std::list& GetImportedTableNames() const { return fImportedTableNames; }
Bool_t IsValid() const;
private:
void LoadCatalog(const TString& url);
void LoadTable(const TString& url);
/// Status of import procedure, fStatus < 400 status is OK
Int_t fStatus;
/// Log of exceptions generated.
IDbiExceptionLog fExceptionLog;
/// List of imported table names
std::list fImportedTableNames;
/// Where to import data. Not owned.
TSQLServer* fServer;
/// Helper class used to prepare a single table. May be null
IDbiAsciiTablePreparer* fTablePreparer;
ClassDef(IDbiAsciiDbImporter,0)// class used to create a temporary ASCII database
};
};
#endif // DBIASCIIDBIMPORTER_H