Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp @ 4592:36bbf3169a27 db-changes
comments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 15 Mar 2021 16:16:42 +0100 |
parents | ff8170d17d90 |
children | d494b4f1103e |
comparison
equal
deleted
inserted
replaced
4591:ff8170d17d90 | 4592:36bbf3169a27 |
---|---|
378 } | 378 } |
379 } | 379 } |
380 } | 380 } |
381 | 381 |
382 | 382 |
383 // From the "ICreateInstance" interface | |
383 virtual void AttachChild(int64_t parent, | 384 virtual void AttachChild(int64_t parent, |
384 int64_t child) ORTHANC_OVERRIDE | 385 int64_t child) ORTHANC_OVERRIDE |
385 { | 386 { |
386 SQLite::Statement s(db_, SQLITE_FROM_HERE, "UPDATE Resources SET parentId = ? WHERE internalId = ?"); | 387 SQLite::Statement s(db_, SQLITE_FROM_HERE, "UPDATE Resources SET parentId = ? WHERE internalId = ?"); |
387 s.BindInt64(0, parent); | 388 s.BindInt64(0, parent); |
427 return ICreateInstance::Apply | 428 return ICreateInstance::Apply |
428 (*this, result, instanceId, patient, study, series, instance); | 429 (*this, result, instanceId, patient, study, series, instance); |
429 } | 430 } |
430 | 431 |
431 | 432 |
433 // From the "ICreateInstance" interface | |
432 virtual int64_t CreateResource(const std::string& publicId, | 434 virtual int64_t CreateResource(const std::string& publicId, |
433 ResourceType type) ORTHANC_OVERRIDE | 435 ResourceType type) ORTHANC_OVERRIDE |
434 { | 436 { |
435 SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO Resources VALUES(NULL, ?, ?, NULL)"); | 437 SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO Resources VALUES(NULL, ?, ?, NULL)"); |
436 s.BindInt(0, type); | 438 s.BindInt(0, type); |
966 s.BindString(1, value); | 968 s.BindString(1, value); |
967 s.Run(); | 969 s.Run(); |
968 } | 970 } |
969 | 971 |
970 | 972 |
973 // From the "ISetResourcesContent" interface | |
971 virtual void SetIdentifierTag(int64_t id, | 974 virtual void SetIdentifierTag(int64_t id, |
972 const DicomTag& tag, | 975 const DicomTag& tag, |
973 const std::string& value) ORTHANC_OVERRIDE | 976 const std::string& value) ORTHANC_OVERRIDE |
974 { | 977 { |
975 SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO DicomIdentifiers VALUES(?, ?, ?, ?)"); | 978 SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO DicomIdentifiers VALUES(?, ?, ?, ?)"); |
1001 // Nothing to do: The patient is already unprotected | 1004 // Nothing to do: The patient is already unprotected |
1002 } | 1005 } |
1003 } | 1006 } |
1004 | 1007 |
1005 | 1008 |
1009 // From the "ISetResourcesContent" interface | |
1006 virtual void SetMainDicomTag(int64_t id, | 1010 virtual void SetMainDicomTag(int64_t id, |
1007 const DicomTag& tag, | 1011 const DicomTag& tag, |
1008 const std::string& value) ORTHANC_OVERRIDE | 1012 const std::string& value) ORTHANC_OVERRIDE |
1009 { | 1013 { |
1010 SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO MainDicomTags VALUES(?, ?, ?, ?)"); | 1014 SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT INTO MainDicomTags VALUES(?, ?, ?, ?)"); |
1032 { | 1036 { |
1033 ISetResourcesContent::Apply(*this, content); | 1037 ISetResourcesContent::Apply(*this, content); |
1034 } | 1038 } |
1035 | 1039 |
1036 | 1040 |
1041 // From the "ICreateInstance" interface | |
1037 virtual void TagMostRecentPatient(int64_t patient) ORTHANC_OVERRIDE | 1042 virtual void TagMostRecentPatient(int64_t patient) ORTHANC_OVERRIDE |
1038 { | 1043 { |
1039 { | 1044 { |
1040 SQLite::Statement s(db_, SQLITE_FROM_HERE, | 1045 SQLite::Statement s(db_, SQLITE_FROM_HERE, |
1041 "DELETE FROM PatientRecyclingOrder WHERE patientId=?"); | 1046 "DELETE FROM PatientRecyclingOrder WHERE patientId=?"); |