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

Method setupDesc

src/jrd/ExtEngineManager.cpp:81–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 virtual USHORT setupDesc(thread_db* tdbb, CompilerScratch* csb, USHORT index,
82 dsc* desc, ItemInfo* itemInfo)
83 {
84 *desc = format->fmt_desc[index];
85
86 if (index % 2 == 0 && index / 2u < parameters.getCount())
87 {
88 const Parameter* param = parameters[index / 2];
89
90 if (param->prm_mechanism != prm_mech_type_of &&
91 !fb_utils::implicit_domain(param->prm_field_source.c_str()))
92 {
93 MetaNamePair namePair(param->prm_field_source, "");
94
95 FieldInfo fieldInfo;
96 bool exist = csb->csb_map_field_info.get(namePair, fieldInfo);
97 MET_get_domain(tdbb, csb->csb_pool, param->prm_field_source, desc,
98 (exist ? NULL : &fieldInfo));
99
100 if (!exist)
101 csb->csb_map_field_info.put(namePair, fieldInfo);
102
103 itemInfo->field = namePair;
104 itemInfo->nullable = fieldInfo.nullable;
105 itemInfo->fullDomain = true;
106 }
107
108 itemInfo->name = param->prm_name;
109
110 if (!param->prm_nullable)
111 itemInfo->nullable = false;
112 }
113
114 return type_alignments[desc->dsc_dtype];
115 }
116
117 public:
118 Array<NestConst<Parameter> >& parameters;

Callers

nothing calls this directly

Calls 5

implicit_domainFunction · 0.85
getCountMethod · 0.45
c_strMethod · 0.45
getMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected