3 #if wxUSE_DATABASE_POSTGRESQL 10 m_FieldLookupMap.clear();
13 m_bBinaryResults =
false;
26 for (
int i=0; i<nFields; i++)
30 m_FieldLookupMap[strField] = i;
71 wxString strValue = wxT(
"");
74 wxLogError(_(
"Not implemented\n"));
95 wxLogError(_(
"Not implemented\n"));
104 strValue.ToLong(&nValue);
117 wxLogError(_(
"Not implemented\n"));
126 bValue = (strValue != _(
"0"));
136 wxDateTime dateValue = wxInvalidDateTime;
143 if (! dateValue.ParseDateTime(strDateValue))
145 if (dateValue.ParseDate(strDateValue) )
147 dateValue.SetHour(0);
148 dateValue.SetMinute(0);
149 dateValue.SetSecond(0);
150 dateValue.SetMillisecond(0);
154 dateValue = wxInvalidDateTime;
164 if (! dateValue.ParseDateTime(strDateValue))
166 if (dateValue.ParseDate(strDateValue))
168 dateValue.SetHour(0);
169 dateValue.SetMinute(0);
170 dateValue.SetSecond(0);
171 dateValue.SetMillisecond(0);
175 dateValue = wxInvalidDateTime;
188 size_t nUnescapedLength = 0;
191 wxMemoryBuffer tempBuffer(nUnescapedLength);
192 void* pUnescapedBuffer = tempBuffer.GetWriteBuf(nUnescapedLength);
193 memcpy(pUnescapedBuffer, pUnescapedBlob, nUnescapedLength);
195 tempBuffer.UngetWriteBuf(nUnescapedLength);
197 tempBuffer.SetBufSize(nUnescapedLength);
198 tempBuffer.SetDataLen(nUnescapedLength);
201 Buffer.UngetWriteBuf(nUnescapedLength);
203 if (nUnescapedLength < 1)
206 return Buffer.GetData();
214 wxLogError(_(
"Not implemented\n"));
221 strValue.ToDouble(&dblValue);
235 wxString strLocalCopy(strField);
236 strLocalCopy.MakeUpper();
237 StringToIntMap::iterator SearchIterator =
m_FieldLookupMap.find(strLocalCopy);
240 wxString msg(_(
"Field '") + strField + _(
"' not found in the resultset"));
241 #if wxUSE_DATABASE_EXCEPTIONS 251 return ((*SearchIterator).second+1);
262 #endif//wxUSE_DATABASE_POSTGRESQL virtual bool GetResultBool(int nField)
Retrieve a boolean from the result set by the 1-based field index.
virtual long GetResultLong(int nField)
Retrieve a long from the result set by the 1-based field index.
PQunescapeByteaType GetPQunescapeBytea()
PQgetisnullType GetPQgetisnull()
void LogMetaDataForCleanup(wxResultSetMetaData *pMetaData)
Add meta data object pointer to the list for "garbage collection".
virtual int LookupField(const wxString &strField)
wxDynamicPostgresInterface * m_pInterface
#define wxDATABASE_FIELD_NOT_IN_RESULTSET
wxDynamicPostgresInterface * m_pInterface
virtual wxString GetResultString(int nField)
Retrieve a wxString from the result set by the 1-based field index.
PQbinaryTuplesType GetPQbinaryTuples()
virtual wxResultSetMetaData * GetMetaData()
Retrieve the MetaData associated with this result set.
void CloseMetaData()
Close all meta data objects that have been generated but not yet closed.
wxPostgresResultSet(wxDynamicPostgresInterface *pInterface)
virtual wxDateTime GetResultDate(int nField)
Retrieve a wxDateTime from the result set by the 1-based field index.
virtual ~wxPostgresResultSet()
PQntuplesType GetPQntuples()
virtual void * GetResultBlob(int nField, wxMemoryBuffer &Buffer)
Retrieve a BLOB from the result set by the 1-based field index.
virtual void Close()
Close the result set (call wxDatabase::CloseResultSet() instead on the result set)
virtual bool Next()
Move to the next record in the result set.
virtual int GetResultInt(int nField)
Retrieve an integer from the result set by the 1-based field index.
StringToIntMap m_FieldLookupMap
virtual wxString ConvertFromUnicodeStream(const char *inputBuffer)
PQfreememType GetPQfreemem()
PQgetvalueType GetPQgetvalue()
virtual bool IsFieldNull(int nField)
Check if a field in the current result set record is NULL.
PQnfieldsType GetPQnfields()
virtual double GetResultDouble(int nField)
Retrieve a double from the result set by the 1-based field index.