184 bool exec(
const std::string &query);
186 return(QSqlQuery::exec());
192 int fieldIndex(
const std::string &name)
const;
202 void tossQueryError(
const std::string &message,
const char *f,
int l)
const;
SqlQuery()
Default constructor.
bool isThrowing() const
Report error status when executing queries.
Connect to database immediately.
int nFields() const
Returns the number of fields (columns) from query.
std::string getQuery() const
Returns the executed query string.
void tossQueryError(const std::string &message, const char *f, int l) const
Issues an IException from various sources of error states in this class.
std::vector< std::string > fieldNameList() const
Returns the names of all fields in the resulting query.
int fieldIndex(const std::string &name) const
Returns index of column for given name.
void setThrowOnFailure()
Sets throwing of exceptions on errors to true.
Construct and execute a query on a database and manage result.
bool _throwIfFailed
User can select action on query results.
Isis database class providing generalized access to a variety of databases.
std::string fieldName(int index) const
Returns the column name of the resulting query at the given index.
int nRows() const
Returns the count of rows resulting from the query.
void setNoThrowOnFailure()
Turns throwing of iExceptions off on errors.
SqlRecord getRecord() const
Returns a SqlRecord for the current query row.
std::vector< std::string > fieldTypeList() const
Returns the types of each field/column in a resutling query.