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

Method putType

src/dsql/DsqlCompilerScratch.cpp:186–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186void DsqlCompilerScratch::putType(const TypeClause* type, bool useSubType)
187{
188#ifdef DEV_BUILD
189 // Check if the field describes a known datatype
190 if (type->dtype > FB_NELEM(blr_dtypes) || !blr_dtypes[type->dtype])
191 {
192 SCHAR buffer[100];
193
194 sprintf(buffer, "Invalid dtype %d in put_dtype", type->dtype);
195 ERRD_bugcheck(buffer);
196 }
197#endif
198
199 if (type->notNull)
200 appendUChar(blr_not_nullable);
201
202 if (type->typeOfName.hasData())
203 {
204 if (type->typeOfTable.hasData())
205 {
206 if (type->collate.hasData())
207 {
208 appendUChar(blr_column_name2);
209 appendUChar(type->fullDomain ? blr_domain_full : blr_domain_type_of);
210 appendMetaString(type->typeOfTable.c_str());
211 appendMetaString(type->typeOfName.c_str());
212 appendUShort(type->textType);
213 }
214 else
215 {
216 appendUChar(blr_column_name);
217 appendUChar(type->fullDomain ? blr_domain_full : blr_domain_type_of);
218 appendMetaString(type->typeOfTable.c_str());
219 appendMetaString(type->typeOfName.c_str());
220 }
221 }
222 else
223 {
224 if (type->collate.hasData())
225 {
226 appendUChar(blr_domain_name2);
227 appendUChar(type->fullDomain ? blr_domain_full : blr_domain_type_of);
228 appendMetaString(type->typeOfName.c_str());
229 appendUShort(type->textType);
230 }
231 else
232 {
233 appendUChar(blr_domain_name);
234 appendUChar(type->fullDomain ? blr_domain_full : blr_domain_type_of);
235 appendMetaString(type->typeOfName.c_str());
236 }
237 }
238
239 return;
240 }
241
242 switch (type->dtype)
243 {

Callers

nothing calls this directly

Calls 4

ERRD_bugcheckFunction · 0.85
DTYPE_IS_EXACTFunction · 0.85
hasDataMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected