src/Common/ODBC/RowSet.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 namespace AppSecInc
00004 {
00005         namespace Databases
00006         {
00007                 namespace ODBC
00008                 {
00010                         class ODBCRowSet
00011                         {
00012                         private:
00014                                 ODBCHandle _stmt;
00016                                 std::vector<ODBCColumn *> _columns;
00018                                 std::map<std::wstring, ODBCColumn *> _columnmap;
00020                                 std::vector<ODBCDiagnosticsMessage> _messages;
00022                 ODBCRowSet& operator=(const ODBCRowSet& value) { };
00023                         public:
00025                                 const std::vector<ODBCDiagnosticsMessage>& GetMessages() const { return _messages; }
00027                 unsigned int GetColumnCount() const { return _columns.size(); }
00029                                 const ODBCColumn * operator[](const std::wstring& name) const;
00031                 const ODBCColumn * operator[](int index) const;
00033                                 const ODBCHandle& PeekStatementHandle() const { return _stmt; }
00035                                 void AddColumn(const std::wstring& name, int type, int size = ODBCColumn::INVALID_SIZE);
00037                                 void Bind(SQLHANDLE hconn);
00039                                 void BindColumns();
00042                                 bool Fetch();
00044                                 void ExecuteDirect(const std::wstring& query);
00046                                 void Prepare(const std::wstring& query);
00048                                 void Execute();
00050                 std::wstring GetError() const { return _stmt.GetError(); }
00052                                 std::vector<ODBCError> GetErrors() const { return _stmt.GetErrors(); }
00054                                 SQLSMALLINT GetNumResultCols() const;
00057                                 SQLINTEGER GetSQLRowCount() const;
00058                                 ODBCRowSet();
00059                                 virtual ~ODBCRowSet();
00060                         };
00061                 }
00062         }
00063 }


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com