3 #if wxUSE_DATABASE_POSTGRESQL 8 m_pInterface = pInterface;
9 m_pDatabase = pDatabase;
11 m_strStatementName = strStatementName;
56 int nParameterCount = 0;
57 bool bInStringLiteral =
false;
59 for (
size_t i = 0; i < len; i++)
62 if (
'\'' == character)
65 bInStringLiteral = !bInStringLiteral;
67 else if ((
'?' == character) && !bInStringLiteral)
72 return nParameterCount;
82 int nResultFormat = 0;
88 if ((status != PGRES_COMMAND_OK) && (status != PGRES_TUPLES_OK))
97 rowsAffected.ToLong(&nRows);
101 delete []paramValues;
102 delete []paramLengths;
103 delete []paramFormats;
120 int nResultFormat = 0;
126 if ((status != PGRES_COMMAND_OK) && (status != PGRES_TUPLES_OK))
133 delete []paramValues;
134 delete []paramLengths;
135 delete []paramFormats;
143 delete []paramValues;
144 delete []paramLengths;
145 delete []paramFormats;
152 #endif//wxUSE_DATABASE_POSTGRESQL
wxPostgresPreparedStatementWrapper(wxDynamicPostgresInterface *pInterface, PGconn *pDatabase, const wxString &strSQL, const wxString &strStatementName)
wxDatabaseResultSet * RunQueryWithResults()
static int TranslateErrorCode(int nCode)
void ThrowDatabaseException()
void SetParam(int nPosition, int nValue)
wxPostgresPreparedStatementParameterCollection m_Parameters
wxDynamicPostgresInterface * m_pInterface
virtual ~wxPostgresPreparedStatementWrapper()
wxString m_strStatementName
void SetErrorMessage(const wxString &strErrorMessage)
PQresultErrorMessageType GetPQresultErrorMessage()
void SetEncoding(wxFontEncoding encoding)
#define wxDATABASE_QUERY_RESULT_ERROR
PQexecPreparedType GetPQexecPrepared()
void SetErrorCode(int nErrorCode)
virtual wxString ConvertFromUnicodeStream(const char *inputBuffer)
PQresultStatusType GetPQresultStatus()
const wxCSConv * GetEncoding()
virtual const wxCharBuffer ConvertToUnicodeStream(const wxString &inputString)
PQcmdTuplesType GetPQcmdTuples()
void SetParam(int nPosition, int nValue)