Mercurial > hg > orthanc-databases
comparison SQLite/Plugins/SQLiteIndex.cpp @ 201:42990b2dd51b
create IDatabaseBackendOutput only if needed
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 18 Mar 2021 16:51:51 +0100 |
parents | 8cae98f73d53 |
children | 73cc85f3d9c1 |
comparison
equal
deleted
inserted
replaced
200:30b210616f4f | 201:42990b2dd51b |
---|---|
130 | 130 |
131 return db.release(); | 131 return db.release(); |
132 } | 132 } |
133 | 133 |
134 | 134 |
135 SQLiteIndex::SQLiteIndex(const std::string& path) : | 135 SQLiteIndex::SQLiteIndex(OrthancPluginContext* context, |
136 IndexBackend(new Factory(*this)), | 136 const std::string& path) : |
137 IndexBackend(context, new Factory(*this)), | |
137 path_(path), | 138 path_(path), |
138 fast_(true) | 139 fast_(true) |
139 { | 140 { |
140 if (path.empty()) | 141 if (path.empty()) |
141 { | 142 { |
142 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); | 143 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); |
143 } | 144 } |
144 } | 145 } |
145 | 146 |
146 | 147 |
147 SQLiteIndex::SQLiteIndex() : | 148 SQLiteIndex::SQLiteIndex(OrthancPluginContext* context) : |
148 IndexBackend(new Factory(*this)), | 149 IndexBackend(context, new Factory(*this)), |
149 fast_(true) | 150 fast_(true) |
150 { | 151 { |
151 } | 152 } |
152 | 153 |
153 | 154 |