EasyQtSql.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef EASYQTSQL_H
  2. #define EASYQTSQL_H
  3. /*
  4. * The MIT License (MIT)
  5. * Copyright 2018 Alexey Kramin
  6. *
  7. * Permission is hereby granted, free of charge, to any person obtaining
  8. * a copy of this software and associated documentation files (the
  9. * "Software"), to deal in the Software without restriction, including
  10. * without limitation the rights to use, copy, modify, merge, publish,
  11. * distribute, sublicense, and/or sell copies of the Software, and to
  12. * permit persons to whom the Software is furnished to do so, subject to
  13. * the following conditions:
  14. *
  15. * The above copyright notice and this permission notice shall be
  16. * included in all copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  19. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  20. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  21. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  22. * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  23. * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  24. * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  25. *
  26. */
  27. /*!
  28. \file
  29. \brief Main EasyQtSql header file
  30. To use all the EasyQtSql features just include this header file into your project
  31. \warning Please use EasyQtSql.h file only! You should never include any of EasyQtSql_*.h files.
  32. */
  33. #include <QtSql>
  34. /*!
  35. \brief Easy SQL data access helper for QtSql
  36. \author Alexey <kramolnic> Kramin
  37. \version 1.0
  38. \date November 2018
  39. \verbinclude License.txt
  40. */
  41. namespace EasyQtSql
  42. {
  43. /*!
  44. \brief Undefine to disable EasyQtSql exceptions (DBException) globally
  45. */
  46. #define DB_EXCEPTIONS_ENABLED
  47. //#undef DB_EXCEPTIONS_ENABLED
  48. /// \cond
  49. #define EASY_QT_SQL_MAIN
  50. /// \endcond
  51. //SqlFactory (DB connection manager)
  52. #include "EasyQtSql_SqlFactory.h"
  53. //Generic classes
  54. #include "EasyQtSql_DBException.h"
  55. #include "EasyQtSql_ParamDirectionWrapper.h"
  56. //Select query and query results
  57. #include "EasyQtSql_NonQueryResult.h"
  58. #include "EasyQtSql_QueryResult.h"
  59. #include "EasyQtSql_PreparedQuery.h"
  60. //Insert/Update/Delete (CUD) operations
  61. #include "EasyQtSql_InsertQuery.h"
  62. #include "EasyQtSql_UpdateQuery.h"
  63. #include "EasyQtSql_DeleteQuery.h"
  64. //Transaction helper
  65. #include "EasyQtSql_Transaction.h"
  66. #undef EASY_QT_SQL_MAIN
  67. }
  68. #endif // EASYQTSQL_H