comparison OrthancServer/DatabaseWrapperBase.cpp @ 1718:2b812969e136 db-changes

getting rid of an IDatabaseWrapper::LookupIdentifier flavor
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 Oct 2015 10:11:22 +0200
parents 2ca7888f8600
children a7c05bbfaf6a
comparison
equal deleted inserted replaced
1717:3926e6317a43 1718:2b812969e136
681 while (s.Step()) 681 while (s.Step())
682 { 682 {
683 target.push_back(s.ColumnInt64(0)); 683 target.push_back(s.ColumnInt64(0));
684 } 684 }
685 } 685 }
686
687
688 void DatabaseWrapperBase::LookupIdentifier(std::list<int64_t>& target,
689 const std::string& value)
690 {
691 SQLite::Statement s(db_, SQLITE_FROM_HERE,
692 "SELECT id FROM DicomIdentifiers WHERE value=?");
693
694 s.BindString(0, value);
695
696 target.clear();
697
698 while (s.Step())
699 {
700 target.push_back(s.ColumnInt64(0));
701 }
702 }
703 } 686 }