22 fResult = (sqlite3_stmt *) result;
55 Error(
"IsValid",
"result set closed");
59 Error(
"IsValid",
"field index out of bounds");
71 Error(
"GetFieldCount",
"result set closed");
74 return sqlite3_column_count(
fResult);
83 Error(
"GetFieldName",
"result set closed");
86 return sqlite3_column_name(
fResult, field);
105 Error(
"Next",
"result set closed");
109 int ret = sqlite3_step(
fResult);
110 if ((ret != SQLITE_DONE) && (ret != SQLITE_ROW)) {
111 Error(
"Statement",
"SQL Error: %d %s", ret, sqlite3_errmsg(sqlite3_db_handle(
fResult)));
114 if (ret == SQLITE_DONE) {
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void Close(Option_t *opt="") final
Close query result.
const char * GetFieldName(Int_t field) final
Get name of specified field.
Int_t GetRowCount() const final
SQLite can not determine the row count for a Query, return -1 instead.
~TSQLiteResult()
Cleanup SQLite query result.
TSQLRow * Next() final
Get next query result row.
Int_t GetFieldCount() final
Get number of fields in result.
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
TSQLiteResult(void *result)
SQLite query result.