15#include "IException.h"
170 bool exec(
const std::string &query);
172 return(QSqlQuery::exec());
178 int fieldIndex(
const std::string &name)
const;
188 void tossQueryError(
const std::string &message,
const char *f,
int l)
const;
Isis database class providing generalized access to a variety of databases.
@ Connect
Connect to database immediately.
bool isThrowing() const
Report error status when executing queries.
std::string fieldName(int index) const
Returns the column name of the resulting query at the given index.
int nFields() const
Returns the number of fields (columns) from query.
bool _throwIfFailed
User can select action on query results.
void setNoThrowOnFailure()
Turns throwing of iExceptions off on errors.
std::vector< std::string > fieldTypeList() const
Returns the types of each field/column in a resutling query.
int nRows() const
Returns the count of rows resulting from the query.
std::string getQuery() const
Returns the executed query string.
SqlRecord getRecord() const
Returns a SqlRecord for the current query row.
std::vector< std::string > fieldNameList() const
Returns the names of all fields in the resulting query.
void setThrowOnFailure()
Sets throwing of exceptions on errors to true.
int fieldIndex(const std::string &name) const
Returns index of column for given name.
void tossQueryError(const std::string &message, const char *f, int l) const
Issues an IException from various sources of error states in this class.
SqlQuery()
Default constructor.
Provide simplified access to resulting SQL query row.
This is free and unencumbered software released into the public domain.