/// <summary> /// 获取列名列表 /// </summary> /// <param name="dialect">Sql方言</param> /// <param name="register">实体别名注册器</param> public string ToSql(IDialect dialect, IEntityAliasRegister register) { if (Raw || IsAggregation && TableType == null && string.IsNullOrWhiteSpace(AggregationFunc)) { return(dialect.GetColumn(Name, dialect.GetSafeName(ColumnAlias))); } var result = new SqlItem(Name, GetTableAlias(register), ColumnAlias, isResolve: false, aggregationFunc: AggregationFunc); return(result.ToSql(dialect)); }
/// <summary> /// 获取列名列表 /// </summary> /// <param name="dialect">Sql方言</param> /// <param name="register">实体别名注册器</param> public string ToSql(IDialect dialect, IEntityAliasRegister register) { if (Raw || IsAggregation) { return(dialect.GetColumn(Name, dialect.GetSafeName(ColumnAlias))); } var result = new SqlItem(Name, GetTableAlias(register), ColumnAlias, isResolve: false); return(result.ToSql(dialect)); }