comparison OrthancServer/DatabaseWrapper.cpp @ 193:a1b9d1e1497b

failed attempt to compile with linux standard base
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Nov 2012 14:02:28 +0100
parents c56dc32266e0
children 530a25320461
comparison
equal deleted inserted replaced
192:c56dc32266e0 193:a1b9d1e1497b
238 s.BindInt(0, parent); 238 s.BindInt(0, parent);
239 s.BindInt(1, child); 239 s.BindInt(1, child);
240 s.Run(); 240 s.Run();
241 } 241 }
242 242
243 void DatabaseWrapper::GetChildren(Json::Value& childrenPublicIds,
244 int64_t id)
245 {
246 SQLite::Statement s(db_, SQLITE_FROM_HERE, "SELECT publicId FROM Resources WHERE parentId=?");
247 s.BindInt(0, id);
248
249 childrenPublicIds = Json::arrayValue;
250 while (s.Step())
251 {
252 childrenPublicIds.append(s.ColumnString(0));
253 }
254 }
255
256
243 void DatabaseWrapper::DeleteResource(int64_t id) 257 void DatabaseWrapper::DeleteResource(int64_t id)
244 { 258 {
245 signalRemainingAncestor_->Reset(); 259 signalRemainingAncestor_->Reset();
246 260
247 SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM Resources WHERE internalId=?"); 261 SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM Resources WHERE internalId=?");