3 #if wxUSE_DATABASE_SQLITE 10 m_pSqliteStatement = NULL;
11 m_bManageStatement =
false;
17 m_pStatement = pStatement;
19 m_bManageStatement = bManageStatement;
22 int nFieldCount = sqlite3_column_count(m_pSqliteStatement);
23 for (
int i=0; i<nFieldCount; i++)
26 m_FieldLookupMap[strField] = i;
58 if (nReturn != SQLITE_ROW)
61 if ((nReturn != SQLITE_ROW) && (nReturn != SQLITE_DONE))
63 wxLogError(_(
"Error with RunQueryWithResults\n"));
65 #if SQLITE_VERSION_NUMBER>=3002002 75 return (nReturn == SQLITE_ROW);
92 wxString strValue = wxT(
"");
117 return (nValue != 0);
126 if (date.ParseFormat(strDate, wxT(
"%m/%d/%y %H:%M:%S")))
130 else if (date.ParseDateTime(strDate) )
134 else if (date.ParseDate(strDate))
140 return wxInvalidDateTime;
146 double dblValue = -1;
162 wxMemoryBuffer tempBuffer(0);
163 tempBuffer.SetDataLen(0);
164 tempBuffer.SetBufSize(0);
172 wxMemoryBuffer tempBuffer(nLength);
173 void* pBuffer = tempBuffer.GetWriteBuf(nLength);
174 memcpy(pBuffer, pBlob, nLength);
175 tempBuffer.UngetWriteBuf(nLength);
176 tempBuffer.SetDataLen(nLength);
177 tempBuffer.SetBufSize(nLength);
181 return Buffer.GetData();
196 wxString msg(_(
"Field '") + strField + _(
"' not found in the resultset"));
197 #if wxUSE_DATABASE_EXCEPTIONS 207 return ((*SearchIterator).second + 1);
218 #endif//wxUSE_DATABASE_SQLITE virtual bool Next()
Move to the next record in the result set.
wxSqlitePreparedStatement * m_pStatement
virtual bool IsFieldNull(int nField)
Check if a field in the current result set record is NULL.
virtual void Close()
Close the result set (call wxDatabase::CloseResultSet() instead on the result set)
sqlite3_stmt * GetLastStatement()
virtual wxDateTime GetResultDate(int nField)
Retrieve a wxDateTime from the result set by the 1-based field index.
StringToIntMap m_FieldLookupMap
virtual long GetResultLong(int nField)
Retrieve a long from the result set by the 1-based field index.
void LogMetaDataForCleanup(wxResultSetMetaData *pMetaData)
Add meta data object pointer to the list for "garbage collection".
virtual wxResultSetMetaData * GetMetaData()
Retrieve the MetaData associated with this result set.
#define wxDATABASE_FIELD_NOT_IN_RESULTSET
virtual double GetResultDouble(int nField)
Retrieve a double from the result set by the 1-based field index.
void ThrowDatabaseException()
virtual int GetResultInt(int nField)
Retrieve an integer from the result set by the 1-based field index.
virtual void * GetResultBlob(int nField, wxMemoryBuffer &Buffer)
Retrieve a BLOB from the result set by the 1-based field index.
sqlite3_stmt * m_pSqliteStatement
void CloseMetaData()
Close all meta data objects that have been generated but not yet closed.
void SetErrorMessage(const wxString &strErrorMessage)
virtual void Close()
Close the result set (call wxDatabase::ClosePreparedStatement() instead on the statement)
virtual wxString GetResultString(int nField)
Retrieve a wxString from the result set by the 1-based field index.
virtual bool GetResultBool(int nField)
Retrieve a boolean from the result set by the 1-based field index.
void SetErrorCode(int nErrorCode)
static int TranslateErrorCode(int nCode)
virtual wxString ConvertFromUnicodeStream(const char *inputBuffer)
virtual ~wxSqliteResultSet()
virtual int LookupField(const wxString &strField)