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

Method addItem

src/common/MsgMetadata.cpp:327–343  ·  view source on GitHub ↗

Add an item based on a descriptor.

Source from the content-addressed store, hash-verified

325
326// Add an item based on a descriptor.
327void MsgMetadata::addItem(const MetaString& name, bool nullable, const dsc& desc)
328{
329 Item& item = items.add();
330 item.field.assign(name.c_str(), name.length());
331 item.nullable = nullable;
332
333 SLONG sqlLen, sqlSubType, sqlScale, sqlType;
334 desc.getSqlInfo(&sqlLen, &sqlSubType, &sqlScale, &sqlType);
335
336 item.type = sqlType;
337 item.subType = sqlSubType;
338 item.length = sqlLen;
339 item.scale = sqlScale;
340 item.charSet = desc.getCharSet();
341
342 item.finished = true;
343}
344
345
346// returns ~0 on success or index of not finished item

Callers 2

createMetadataMethod · 0.80
makeTriggerMethod · 0.80

Calls 6

getSqlInfoMethod · 0.80
addMethod · 0.45
assignMethod · 0.45
c_strMethod · 0.45
lengthMethod · 0.45
getCharSetMethod · 0.45

Tested by

no test coverage detected