OdbcParser.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "PathResolver.h"
4 
5 namespace AppSecInc
6 {
7  namespace Databases
8  {
9  namespace ODBC
10  {
11  class OdbcParserImpl;
12 
38  class OdbcParser
39  {
40  public:
41  OdbcParser();
42  virtual ~OdbcParser();
47  void setSqlFlavour(const std::wstring& sqlFlavour);
49  void setDelimiters(const std::vector<const std::wstring>& delimiters);
51  void setSqlTypeOrDelimiter(const std::wstring& type, const std::wstring& delimiter);
53  void setPathResolver(PathResolver* pathResolver);
55  void setSourcePath(const std::wstring& sourceName);
57  void setInput(const std::wstring& input);
61  bool hasMore();
63  std::wstring getNextBatch();
65  bool exitOnErrorFlag();
67  std::wstring processInsertsOnly();
68  private:
69  OdbcParser(const OdbcParser& other);
70  OdbcParser& operator=(const OdbcParser& other);
71  OdbcParserImpl* pimpl;
72  };
73  }
74  }
75 }
std::wstring getNextBatch()
get next batch to execute
Definition: OdbcParser.cpp:69
PathResolver * getPathResolver() const
get path resolver used
Definition: OdbcParser.cpp:47
virtual ~OdbcParser()
Definition: OdbcParser.cpp:11
void setSqlFlavour(const std::wstring &sqlFlavour)
select sql flavor (type of command-line tool)
Definition: OdbcParser.cpp:16
void setInput(const std::wstring &input)
set input string to process
Definition: OdbcParser.cpp:58
void setSourcePath(const std::wstring &sourceName)
set input source path (e.g. file name or MSI binary ID)
Definition: OdbcParser.cpp:52
Definition: OdbcParserImpl.h:13
Definition: OdbcParser.h:38
bool exitOnErrorFlag()
returns current state of error processing in the script
Definition: OdbcParser.cpp:74
OdbcParser()
Definition: OdbcParser.cpp:6
Definition: PathResolver.h:14
bool hasMore()
check if there are more batches in the input
Definition: OdbcParser.cpp:64
void setSqlTypeOrDelimiter(const std::wstring &type, const std::wstring &delimiter)
convenience method that sets either sql flavour or delimiter - whichever not empty.
Definition: OdbcParser.cpp:26
std::wstring processInsertsOnly()
return input with all files inserted (flatten input)
Definition: OdbcParser.cpp:79
void setDelimiters(const std::vector< const std::wstring > &delimiters)
set arbitrary delimiters (insert commands not supported)
Definition: OdbcParser.cpp:21
void setPathResolver(PathResolver *pathResolver)
set path resolver (default - file system path resolver)
Definition: OdbcParser.cpp:42


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