|
Isis Developer Reference
|
Go to the documentation of this file.
154 return (_throwIfFailed);
161 _throwIfFailed =
true;
167 _throwIfFailed =
false;
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.
Definition: SqlQuery.h:166
bool exec()
Definition: SqlQuery.h:171
std::string fieldName(int index) const
Returns the column name of the resulting query at the given index.
Definition: SqlQuery.cpp:166
static std::string ToStd(const QString &str)
Converts a Qt string into a std::string.
Definition: IString.cpp:1333
@ Connect
Connect to database immediately.
Definition: Database.h:74
int fieldIndex(const std::string &name) const
Returns index of column for given name.
Definition: SqlQuery.cpp:181
std::vector< std::string > fieldNameList() const
Returns the names of all fields in the resulting query.
Definition: SqlQuery.cpp:198
QString getType(int index) const
Returns the type of a field/column at the specified index.
Definition: SqlRecord.cpp:130
std::vector< std::string > fieldTypeList() const
Returns the types of each field/column in a resutling query.
Definition: SqlQuery.cpp:215
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
std::string getQuery() const
Returns the executed query string.
Definition: SqlQuery.cpp:133
void setThrowOnFailure()
Sets throwing of exceptions on errors to true.
Definition: SqlQuery.h:160
int nFields() const
Returns the number of fields (columns) from query.
Definition: SqlQuery.cpp:150
Isis exception class.
Definition: IException.h:91
Namespace for the standard library.
Isis database class providing generalized access to a variety of databases.
Definition: Database.h:70
virtual ~SqlQuery()
Definition: SqlQuery.h:145
SqlRecord getRecord() const
Returns a SqlRecord for the current query row.
Definition: SqlQuery.cpp:254
int nRows() const
Returns the count of rows resulting from the query.
Definition: SqlQuery.cpp:237
SqlQuery()
Default constructor.
Definition: SqlQuery.cpp:30
Construct and execute a query on a database and manage result.
Definition: SqlQuery.h:138
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
QString ToQt() const
Retuns the object string as a QString.
Definition: IString.cpp:869
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
bool isThrowing() const
Report error status when executing queries.
Definition: SqlQuery.h:153
Provide simplified access to resulting SQL query row.
Definition: SqlRecord.h:48