comparison OrthancServer/DatabaseWrapper.cpp @ 513:935e8c7e0b18

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Aug 2013 17:11:45 +0200
parents 23e5b35e3c5c
children 2c739f76d0bb
comparison
equal deleted inserted replaced
511:3b735fdf320b 513:935e8c7e0b18
947 947
948 void DatabaseWrapper::ClearTable(const std::string& tableName) 948 void DatabaseWrapper::ClearTable(const std::string& tableName)
949 { 949 {
950 db_.Execute("DELETE FROM " + tableName); 950 db_.Execute("DELETE FROM " + tableName);
951 } 951 }
952
953
954 bool DatabaseWrapper::IsExistingResource(int64_t internalId)
955 {
956 SQLite::Statement s(db_, SQLITE_FROM_HERE,
957 "SELECT * FROM Resources WHERE internalId=?");
958 s.BindInt(0, internalId);
959 return s.Step();
960 }
952 } 961 }