Mercurial > hg > orthanc-databases
comparison Framework/SQLite/SQLiteTransaction.h @ 237:35598014f140
refactoring to remove GlobalProperties.cpp
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 08 Apr 2021 19:09:04 +0200 |
parents | ab96698c73a3 |
children | 16aac0287485 |
comparison
equal
deleted
inserted
replaced
236:d1d2edbbe6fb | 237:35598014f140 |
---|---|
33 namespace OrthancDatabases | 33 namespace OrthancDatabases |
34 { | 34 { |
35 class SQLiteTransaction : public ITransaction | 35 class SQLiteTransaction : public ITransaction |
36 { | 36 { |
37 private: | 37 private: |
38 SQLiteDatabase& database_; | |
38 Orthanc::SQLite::Transaction transaction_; | 39 Orthanc::SQLite::Transaction transaction_; |
39 | 40 |
40 public: | 41 public: |
41 explicit SQLiteTransaction(SQLiteDatabase& database); | 42 explicit SQLiteTransaction(SQLiteDatabase& database); |
42 | 43 |
58 virtual IResult* Execute(IPrecompiledStatement& statement, | 59 virtual IResult* Execute(IPrecompiledStatement& statement, |
59 const Dictionary& parameters) ORTHANC_OVERRIDE; | 60 const Dictionary& parameters) ORTHANC_OVERRIDE; |
60 | 61 |
61 virtual void ExecuteWithoutResult(IPrecompiledStatement& statement, | 62 virtual void ExecuteWithoutResult(IPrecompiledStatement& statement, |
62 const Dictionary& parameters) ORTHANC_OVERRIDE; | 63 const Dictionary& parameters) ORTHANC_OVERRIDE; |
64 | |
65 virtual bool DoesTableExist(const std::string& name) ORTHANC_OVERRIDE | |
66 { | |
67 return database_.GetObject().DoesTableExist(name.c_str()); | |
68 } | |
69 | |
70 virtual bool DoesTriggerExist(const std::string& name) ORTHANC_OVERRIDE | |
71 { | |
72 return false; | |
73 } | |
74 | |
75 virtual void ExecuteMultiLines(const std::string& query) ORTHANC_OVERRIDE | |
76 { | |
77 database_.GetObject().Execute(query); | |
78 } | |
63 }; | 79 }; |
64 } | 80 } |