addFull method
TFieldDef
addFull(
- String aName,
- TFieldType aDataType,
- int aSize,
- int aPrecision,
- bool aRequired,
- bool aReadOnly,
- int aFieldNo,
- TSystemCodePage aCodePage,
Implementation
TFieldDef addFull(
String aName,
TFieldType aDataType,
int aSize,
int aPrecision,
bool aRequired,
bool aReadOnly,
int aFieldNo,
TSystemCodePage aCodePage) {
final result = fieldDefClass(this, makeNameUnique(aName), aDataType, aSize,
aRequired, aFieldNo, aCodePage);
switch (aDataType) {
case TFieldType.ftBCD:
case TFieldType.ftFMTBcd:
result.precision = aPrecision;
break;
default:
break;
}
if (aReadOnly) {
result.attributes = {...result.attributes, TFieldAttribute.faReadonly};
}
return result;
}