FormatSQL.h 934 B

12345678910111213141516171819202122232425262728293031323334
  1. // FormatSQL.h: interface for the CFormatSQL class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_FORMATSQL_H__3D7AC79C_FDD8_4948_B7CD_601FB513F208__INCLUDED_)
  5. #define AFX_FORMATSQL_H__3D7AC79C_FDD8_4948_B7CD_601FB513F208__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CFormatSQL
  10. {
  11. public:
  12. CFormatSQL();
  13. virtual ~CFormatSQL();
  14. void Parse(CString cs);
  15. CString GetSQLString() { return _T("(") + m_csWhere + _T(")"); }
  16. void SetVariable(CString cs) { m_csVariable = cs;}
  17. protected:
  18. CString m_csWhere;
  19. CString m_csVariable;
  20. enum eSpecialTypes{eINVALID, eNOT, eAND, eOR};
  21. bool AddToSQL(CString cs, eSpecialTypes &eNOTValue, eSpecialTypes &eORValue);
  22. CFormatSQL::eSpecialTypes ConvetToKey(CString cs);
  23. CString GetKeyWordString(eSpecialTypes eKeyWord);
  24. };
  25. #endif // !defined(AFX_FORMATSQL_H__3D7AC79C_FDD8_4948_B7CD_601FB513F208__INCLUDED_)