comparison OrthancServer/DatabaseWrapper.cpp @ 438:7bbe77cb9e12

DELETE metadata
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 15 May 2013 16:51:10 +0200
parents d51186bf7602
children 23e5b35e3c5c
comparison
equal deleted inserted replaced
437:beca6747945e 438:7bbe77cb9e12
338 s.BindInt(1, type); 338 s.BindInt(1, type);
339 s.BindString(2, value); 339 s.BindString(2, value);
340 s.Run(); 340 s.Run();
341 } 341 }
342 342
343 void DatabaseWrapper::DeleteMetadata(int64_t id,
344 MetadataType type)
345 {
346 SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM Metadata WHERE id=? and type=?");
347 s.BindInt(0, id);
348 s.BindInt(1, type);
349 s.Run();
350 }
351
343 bool DatabaseWrapper::LookupMetadata(std::string& target, 352 bool DatabaseWrapper::LookupMetadata(std::string& target,
344 int64_t id, 353 int64_t id,
345 MetadataType type) 354 MetadataType type)
346 { 355 {
347 SQLite::Statement s(db_, SQLITE_FROM_HERE, 356 SQLite::Statement s(db_, SQLITE_FROM_HERE,