89 _throwIfFailed(true) {
104 _throwIfFailed(other._throwIfFailed) { }
125 bool SqlQuery::exec(
const std::string &query) {
128 string mess =
"Query \'" + query +
"\' failed to execute";
164 return (record().count());
212 std::vector<std::string> fields;
214 for(
int i = 0 ; i < rec.count() ; i++) {
229 std::vector<std::string> types;
231 for(
int i = 0 ; i < rec.count() ; i++) {
232 types.push_back(rec.
getType(i).toLatin1().data());
292 string errmess = message +
" - QueryError = " +
Provide simplified access to resulting SQL query row.
std::vector< std::string > fieldTypeList() const
Returns the types of each field/column in a resutling query.
QString getType(int index) const
Returns the type of a field/column at the specified index.
SqlQuery()
Default constructor.
static std::string ToStd(const QString &str)
Converts a Qt string into a std::string.
std::vector< std::string > fieldNameList() const
Returns the names of all fields in the resulting query.
Namespace for the standard library.
SqlRecord getRecord() const
Returns a SqlRecord for the current query row.
bool isThrowing() const
Report error status when executing queries.
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.
#define _FILEINFO_
Macro for the filename and line number.
Construct and execute a query on a database and manage result.
bool exec(const std::string &query)
Execute an SQL query provided in the query string.
A type of error that could only have occurred due to a mistake on the user's part (e...
QString ToQt() const
Retuns the object string as a QString.
Isis database class providing generalized access to a variety of databases.
std::string getQuery() const
Returns the executed query string.
Namespace for ISIS/Bullet specific routines.
int nFields() const
Returns the number of fields (columns) from query.
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.