Implementation
@override
List<FieldInfo> get fieldsInfo {
if (_tableFields == null && _selectFields == null) {
if (_targetTable != null) {
return _targetTable!.fieldsInfo;
}
var tmp = <FieldInfo>[];
//table fields
if (_tableFields != null) {
for (DbTable t in _tableFields!) {
tmp.addAll(t.fieldsInfo);
}
}
//fields
if (_selectFields != null) {
for (Expr exp in _selectFields!) {
if (exp is DbColumn) {
tmp.add(new FieldInfo.fromColumn(exp as DbColumn));
} else if (exp is AliasedExpr) {
var a = exp as AliasedExpr;
tmp.add(new FieldInfo(a.fieldType, a.alias));
}
}
}
return tmp;
}
return [];
}