Mercurial > hg > orthanc
comparison OrthancFramework/Sources/SQLite/StatementId.cpp @ 5566:8b507b1514eb find-refactoring
cache dynamic SQLite statements (imported from large-queries branch)
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Tue, 23 Apr 2024 14:37:11 +0200 |
parents | 48b8dae6dc77 |
children | 3f13db27b399 |
comparison
equal
deleted
inserted
replaced
5565:def06a42e5ef | 5566:8b507b1514eb |
---|---|
54 file_(file), | 54 file_(file), |
55 line_(line) | 55 line_(line) |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
59 Orthanc::SQLite::StatementId::StatementId(const char *file, | |
60 int line, | |
61 const std::string& statement) : | |
62 file_(file), | |
63 line_(line), | |
64 statement_(statement) | |
65 { | |
66 } | |
67 | |
59 bool StatementId::operator< (const StatementId& other) const | 68 bool StatementId::operator< (const StatementId& other) const |
60 { | 69 { |
61 if (line_ != other.line_) | 70 if (line_ != other.line_) |
62 return line_ < other.line_; | 71 return line_ < other.line_; |
63 | 72 |
64 return strcmp(file_, other.file_) < 0; | 73 if (strcmp(file_, other.file_) < 0) |
74 return true; | |
75 | |
76 return statement_ < other.statement_; | |
65 } | 77 } |
66 } | 78 } |
67 } | 79 } |