Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp @ 5762:d52b3f394f69 find-refactoring
FormatLimits (SQLServer needs custom code)
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Fri, 06 Sep 2024 16:04:18 +0200 |
parents | ca06dde85358 |
children | 093a8693ba16 |
comparison
equal
deleted
inserted
replaced
5761:0b44920843b5 | 5762:d52b3f394f69 |
---|---|
63 virtual std::string FormatWildcardEscape() ORTHANC_OVERRIDE | 63 virtual std::string FormatWildcardEscape() ORTHANC_OVERRIDE |
64 { | 64 { |
65 return "ESCAPE '\\'"; | 65 return "ESCAPE '\\'"; |
66 } | 66 } |
67 | 67 |
68 virtual std::string FormatLimits(uint64_t since, uint64_t count) ORTHANC_OVERRIDE | |
69 { | |
70 std::string sql; | |
71 if (count > 0) | |
72 { | |
73 sql += " LIMIT " + boost::lexical_cast<std::string>(count); | |
74 } | |
75 if (since > 0) | |
76 { | |
77 sql += " OFFSET " + boost::lexical_cast<std::string>(since); | |
78 } | |
79 | |
80 return sql; | |
81 } | |
82 | |
68 virtual bool IsEscapeBrackets() const ORTHANC_OVERRIDE | 83 virtual bool IsEscapeBrackets() const ORTHANC_OVERRIDE |
69 { | 84 { |
70 return false; | 85 return false; |
71 } | 86 } |
72 | 87 |