/// <summary> /// Appends the current correlated table name, e.g. <c>"MyTable" T0</c>, to the attribute buffer. /// </summary> /// <param name="attribute">The current attribute.</param> /// <param name="tblAlias">An alternative alias to use for the current table.</param> /// <returns>A new attribute containing the appended buffer.</returns> public static IProjectionAttribute Tbl(this IProjectionAttribute attribute, string tblAlias = null) { attribute = attribute.TblName().Append(" "); if (tblAlias != null) { return(attribute.Append(attribute.Context.Domain.Dialect.Identifier(tblAlias))); } else { return(attribute.Ali()); } }
/// <summary> /// Appends the current column name in qualified form, e.g. <c>T0."MyColumn"</c>, to the attribute buffer. /// </summary> /// <param name="attribute">The current attribute.</param> /// <param name="tblAlias">The table alias to qualify the column name with.</param> /// <returns>A new attribute containing the appended buffer.</returns> public static IProjectionAttribute Col(this IProjectionAttribute attribute, string tblAlias = null) { if (tblAlias != null) { attribute = attribute.Append(attribute.Context.Domain.Dialect.Identifier(tblAlias)); } else { attribute = attribute.Ali(); } return(attribute.Append(attribute.Context.Domain.Dialect.Qualifier).ColName()); }