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