Beispiel #1
0
        /// <summary>
        /// Appends the equality operator to the current projection buffer and changes the projection separator value to <c>,</c>.
        /// </summary>
        /// <param name="projection">The current projection.</param>
        /// <returns>A new projection containing the appended buffer.</returns>
        public static IProjection Eq(this IProjection projection)
        {
            ProjectionOptions newOptions = new ProjectionOptions(projection.Options)
            {
                Separator = "," + Environment.NewLine,
            };

            return(projection.Map(a => a.Eq()).With(options: newOptions));
        }
 /// <summary>
 /// Appends the current 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>
 /// <returns>A new projection containing the appended buffer.</returns>
 public static IProjection Lits(this IProjection projection) => projection.Map(a => a.Lit());
 /// <summary>
 /// Appends the current parameter names and values, e.g. <c>@P0</c>, to the projection buffer.
 /// </summary>
 /// <param name="projection">The current projection.</param>
 /// <returns>A new projection containing the appended buffer.</returns>
 public static IProjection Pars(this IProjection projection) => projection.Map(a => a.Par());
 /// <summary>
 /// Appends the current property names, e.g. <c>"Item.MyValue"</c>, to the projection buffer.
 /// </summary>
 /// <param name="projection">The current attribute</param>
 /// <param name="tblAlias">An alias to qualify the property name with.</param>
 /// <returns>A new projection containing the appended buffer.</returns>
 public static IProjection Props(this IProjection projection, string tblAlias = null) => projection.Map(a => a.Prop(tblAlias));
Beispiel #5
0
 /// <summary>
 /// Appends the selected column names in unqualified form, e.g. <c>T0."MyColumn"</c>, to the projection buffer.
 /// </summary>
 /// <param name="projection">The current projection</param>
 /// <returns>A new projection containing the appended buffer.</returns>
 public static IProjection ColNames(this IProjection projection) => projection.Map(a => a.ColName());
Beispiel #6
0
 /// <summary>
 /// Appends the selected column names in qualified form, e.g. <c>T0."MyColumn"</c>, to the projection buffer.
 /// </summary>
 /// <param name="projection">The current projection.</param>
 /// <param name="tblAlias">The table alias to qualify each column name with.</param>
 /// <overloads></overloads>
 /// <returns>A new projection containing the appended buffer.</returns>
 public static IProjection Cols(this IProjection projection, string tblAlias = null) => projection.Map(a => a.Col(tblAlias));
Beispiel #7
0
 /// <summary>
 /// Appends the <c> AS </c> keyword to the current projection buffer.
 /// </summary>
 /// <param name="projection">The current projection.</param>
 /// <returns>A new projection containing the appended buffer.</returns>
 public static IProjection As(this IProjection projection) => projection.Map(a => a.As());