OdbcParserImpl.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "OdbcParser.h"
4 
5 namespace AppSecInc
6 {
7  namespace Databases
8  {
9  namespace ODBC
10  {
11  class CommandSet;
12 
14  public:
16  virtual ~OdbcParserImpl();
17 
18  void setPathResolver(PathResolver* resolver);
19  void setDelimiters(const std::vector<const std::wstring>& delimiters);
20  void setSqlFlavour(const std::wstring& sqlFlavour);
22 
23  // insert additional input from the specified source
24  // (e.g. file) in the current point
25  void insertSource(const std::wstring& path);
26  // insert additional input in the current point
27  void insertInput(const std::wstring& input);
28 
29  bool hasMore() const;
30  std::wstring getNextBatch();
31 
32  bool exitOnErrorFlag();
33  void setExitOnErrorFlag( bool on );
34 
35  std::wstring processInsertsOnly();
36 
37  void checkInitialState();
38 
39  private:
40  void prepareNext(std::wstring& buffer, bool processInsertsOnly);
41  void nextline(std::wstring& buffer);
42 
43  CommandSet* commandSet;
44  PathResolver* pathResolver;
45  unsigned int currPos;
46  std::wstring sql;
47  bool exitOnError;
48  };
49  }
50  }
51 }
OdbcParserImpl()
Definition: OdbcParserImpl.cpp:10
bool exitOnErrorFlag()
Definition: OdbcParserImpl.cpp:126
virtual ~OdbcParserImpl()
Definition: OdbcParserImpl.cpp:19
void checkInitialState()
Definition: OdbcParserImpl.cpp:118
void insertInput(const std::wstring &input)
Definition: OdbcParserImpl.cpp:52
void setSqlFlavour(const std::wstring &sqlFlavour)
Definition: OdbcParserImpl.cpp:41
void insertSource(const std::wstring &path)
Definition: OdbcParserImpl.cpp:47
void setDelimiters(const std::vector< const std::wstring > &delimiters)
Definition: OdbcParserImpl.cpp:35
PathResolver * getPathResolver() const
Definition: OdbcParserImpl.cpp:30
bool hasMore() const
Definition: OdbcParserImpl.cpp:66
Definition: OdbcParserImpl.h:13
std::wstring processInsertsOnly()
Definition: OdbcParserImpl.cpp:79
void setPathResolver(PathResolver *resolver)
Definition: OdbcParserImpl.cpp:24
void setExitOnErrorFlag(bool on)
Definition: OdbcParserImpl.cpp:131
Definition: CommandSet.h:11
Definition: PathResolver.h:14
std::wstring getNextBatch()
Definition: OdbcParserImpl.cpp:71


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