MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / moveNameToIndex

Method moveNameToIndex

src/common/MsgMetadata.cpp:231–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231void MetadataBuilder::moveNameToIndex(CheckStatusWrapper* status, const char* name, unsigned index)
232{
233 try
234 {
235 MutexLockGuard g(mtx, FB_FUNCTION);
236
237 indexError(index, "moveNameToIndex");
238
239 for (ObjectsArray<MsgMetadata::Item>::iterator i = msgMetadata->items.begin();
240 i != msgMetadata->items.end();
241 ++i)
242 {
243 if (i->field == name)
244 {
245 MsgMetadata::Item copy(getPool(), *i);
246 msgMetadata->items.remove(i);
247 msgMetadata->items.insert(index, copy);
248 return;
249 }
250 }
251
252 (Arg::Gds(isc_metadata_name) << name).raise();
253 }
254 catch (const Exception& ex)
255 {
256 ex.stuffException(status);
257 }
258}
259
260unsigned MetadataBuilder::addField(CheckStatusWrapper* status)
261{

Callers

nothing calls this directly

Calls 7

GdsClass · 0.85
beginMethod · 0.45
endMethod · 0.45
removeMethod · 0.45
insertMethod · 0.45
raiseMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected