@@ -40,11 +40,13 @@ class IDTraits<Poco::UInt64>
4040public:
4141 static constexpr Poco::UInt64 INVALID_ID = std::numeric_limits<Poco::UInt64>::max();
4242
43+ [[nodiscard]]
4344 static bool isValid (Poco::UInt64 id)
4445 {
4546 return id != INVALID_ID;
4647 }
4748
49+ [[nodiscard]]
4850 static std::string toString (Poco::UInt64 id)
4951 {
5052 return Poco::NumberFormatter::format (id);
@@ -58,11 +60,13 @@ class IDTraits<Poco::Int64>
5860public:
5961 static constexpr Poco::Int64 INVALID_ID = std::numeric_limits<Poco::Int64>::max();
6062
63+ [[nodiscard]]
6164 static bool isValid (Poco::Int64 id)
6265 {
6366 return id != INVALID_ID;
6467 }
6568
69+ [[nodiscard]]
6670 static std::string toString (Poco::Int64 id)
6771 {
6872 return Poco::NumberFormatter::format (id);
@@ -76,11 +80,13 @@ class IDTraits<Poco::UInt32>
7680public:
7781 static constexpr Poco::UInt32 INVALID_ID = std::numeric_limits<Poco::UInt32>::max();
7882
83+ [[nodiscard]]
7984 static bool isValid (Poco::UInt32 id)
8085 {
8186 return id != INVALID_ID;
8287 }
8388
89+ [[nodiscard]]
8490 static std::string toString (Poco::UInt32 id)
8591 {
8692 return Poco::NumberFormatter::format (id);
@@ -94,11 +100,13 @@ class IDTraits<Poco::Int32>
94100public:
95101 static const Poco::Int32 INVALID_ID = std::numeric_limits<Poco::Int32>::max();
96102
103+ [[nodiscard]]
97104 static bool isValid (Poco::Int32 id)
98105 {
99106 return id != INVALID_ID;
100107 }
101108
109+ [[nodiscard]]
102110 static std::string toString (Poco::Int32 id)
103111 {
104112 return Poco::NumberFormatter::format (id);
@@ -112,11 +120,13 @@ class IDTraits<Poco::UInt16>
112120public:
113121 static constexpr Poco::UInt16 INVALID_ID = std::numeric_limits<Poco::UInt16>::max();
114122
123+ [[nodiscard]]
115124 static bool isValid (Poco::UInt16 id)
116125 {
117126 return id != INVALID_ID;
118127 }
119128
129+ [[nodiscard]]
120130 static std::string toString (Poco::UInt16 id)
121131 {
122132 return Poco::NumberFormatter::format (id);
@@ -130,11 +140,13 @@ class IDTraits<Poco::Int16>
130140public:
131141 static constexpr Poco::Int16 INVALID_ID = std::numeric_limits<Poco::Int16>::max();
132142
143+ [[nodiscard]]
133144 static bool isValid (Poco::Int16 id)
134145 {
135146 return id != INVALID_ID;
136147 }
137148
149+ [[nodiscard]]
138150 static std::string toString (Poco::Int16 id)
139151 {
140152 return Poco::NumberFormatter::format (id);
@@ -148,11 +160,13 @@ class IDTraits<std::string>
148160public:
149161 static ActiveRecordLib_API const std::string INVALID_ID;
150162
163+ [[nodiscard]]
151164 static bool isValid (const std::string& id)
152165 {
153166 return !id.empty ();
154167 }
155168
169+ [[nodiscard]]
156170 static std::string toString (const std::string& id)
157171 {
158172 return id;
@@ -166,11 +180,13 @@ class IDTraits<Poco::UUID>
166180public:
167181 static ActiveRecordLib_API const Poco::UUID INVALID_ID;
168182
183+ [[nodiscard]]
169184 static bool isValid (const Poco::UUID& id)
170185 {
171186 return !id.isNull ();
172187 }
173188
189+ [[nodiscard]]
174190 static std::string toString (const Poco::UUID& id)
175191 {
176192 return id.toString ();
0 commit comments