/// <summary> /// Appends the selected values in safe literal form, e.g. <c>1</c>, to the projection buffer. Parameters are used for unsafe literals. /// </summary> /// <param name="projection">The current projection.</param> /// <param name="expression">Expression selecting a specific attribute.</param> /// <returns>A new projection containing the appended buffer.</returns> public static IProjection Lits <TModel, TProperty>(this IProjection <TModel> projection, Expression <Func <TModel, TProperty> > expression) => projection.For(expression).Lits();
/// <summary> /// Appends the selected correlated table name, e.g. <c>"MyTable" T0</c>, to a new attribute buffer. /// </summary> /// <param name="projection">The current projection.</param> /// <param name="expression">Expression selecting a specific attribute.</param> /// <param name="tblAlias">An alternative alias to use for the selected table.</param> /// <returns>A new attribute containing the appended buffer.</returns> public static IProjectionAttribute Tbl <TModel, TProperty>(this IProjection <TModel> projection, Expression <Func <TModel, TProperty> > expression, string tblAlias = null) => projection.For(expression).Tbl(tblAlias);
/// <summary> /// Appends a correlated table-valued parameter from the selected values, e.g. <c>@TP0 T0</c>, to the projection buffer. /// </summary> /// <param name="projection">The current projection.</param> /// <param name="expression">Expression selecting a specific attribute.</param> /// <returns>A new attribute containing the appended buffer.</returns> public static IProjectionAttribute Tvp <TModel, TProperty>(this IProjection <TModel> projection, Expression <Func <TModel, TProperty> > expression) => projection.For(expression).Tvp();
/// <summary> /// Filters the selected projection to include only non key attributes. /// </summary> /// <param name="projection">The current projection</param> /// <param name="expression">Expression selecting a projection target.</param> /// <returns>A new projection containing the filtered attributes.</returns> public static IProjection NonKey <TModel, TProperty>(this IProjection <TModel> projection, Expression <Func <TModel, TProperty> > expression) => projection.For(expression).NonKey();
/// <summary> /// Appends mappings between the selected qualified columns and their properties, e.g. <c>T0."MyColumn" AS "Item.MyValue"</c>, to the projection buffer. Identical to calling <c>Cols().As().Props()</c>. /// </summary> /// <param name="projection">The current projection</param> /// <param name="expression">Expression selecting a specific attribute.</param> /// <param name="tblAlias">The table alias to qualify each column name with.</param> /// <returns>A new projection containing the appended buffer.</returns> public static IProjection Star <TModel, TProperty>(this IProjection <TModel> projection, Expression <Func <TModel, TProperty> > expression, string tblAlias = null) => projection.For(expression).Star(tblAlias);
public static IProjectionAttribute Refcursor <TModel, TProperty>(this IProjection <TModel> projection, Expression <Func <TModel, TProperty> > expression) => projection.For(expression).Refcursor();
public static IEnumerable <IProjectionAttribute> Attrs <TModel, TProperty>(this IProjection <TModel> projection, Expression <Func <TModel, TProperty> > expression) => projection.For(expression).Attrs();
/// <summary> /// Navigates the current projection to the default item target of a selected target. /// </summary> /// <param name="projection">The current projection.</param> /// <param name="expression">Expression selecting a projection target.</param> /// <returns>A new, typed projection of the item target.</returns> public static IProjection <TItem> Open <TModel, TItem>(this IProjection <TModel> projection, Expression <Func <TModel, IEnumerable <TItem> > > expression) => projection.For(expression).Open();
public static ISqlContent Subcommand <TModel, TProperty>(this IProjection <TModel> projection, Expression <Func <TModel, TProperty> > expression, string commandName) => projection.For(expression).Subcommand(commandName);
public static ISqlContent Subquery <TModel, TProperty>(this IProjection <TModel> projection, Expression <Func <TModel, TProperty> > expression, string queryName, object model = null) => projection.For(expression).Subquery(queryName, model);