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

Method assignFieldDtypeFromDsc

src/dsql/ExprNodes.cpp:3939–3961  ·  view source on GitHub ↗

Set a field's descriptor from a DSC. (If dsql_fld* is ever redefined this can be removed)

Source from the content-addressed store, hash-verified

3937// Set a field's descriptor from a DSC.
3938// (If dsql_fld* is ever redefined this can be removed)
3939void CollateNode::assignFieldDtypeFromDsc(dsql_fld* field, const dsc* desc)
3940{
3941 DEV_BLKCHK(field, dsql_type_fld);
3942
3943 field->dtype = desc->dsc_dtype;
3944 field->scale = desc->dsc_scale;
3945 field->subType = desc->dsc_sub_type;
3946 field->length = desc->dsc_length;
3947
3948 if (desc->dsc_dtype <= dtype_any_text)
3949 {
3950 field->collationId = DSC_GET_COLLATE(desc);
3951 field->charSetId = DSC_GET_CHARSET(desc);
3952 }
3953 else if (desc->dsc_dtype == dtype_blob)
3954 {
3955 field->charSetId = desc->dsc_scale;
3956 field->collationId = desc->dsc_flags >> 8;
3957 }
3958
3959 if (desc->dsc_flags & DSC_nullable)
3960 field->flags |= FLD_nullable;
3961}
3962
3963
3964//--------------------

Callers

nothing calls this directly

Calls 2

DSC_GET_COLLATEFunction · 0.85
DSC_GET_CHARSETFunction · 0.85

Tested by

no test coverage detected