Exemple #1
0
        public static UpdateFieldValue UpdateValueTo(this FieldColumn destination, ColumnBase source)
        {
            if (destination == null)
            {
                throw new ArgumentNullException(nameof(destination));
            }

            return(new UpdateFieldValue(destination, source));
        }
Exemple #2
0
 public static JsonFieldColumn Json(this FieldColumn column, string path = null) => new JsonFieldColumn(column, path);
Exemple #3
0
 /// <summary>
 /// Creates a <see cref="WhereClause"/> that states <paramref name="column"/>'s value is in the <see cref="SelectColumn"/>
 /// </summary>
 /// <param name="column">column to apply the clause onto</param>
 /// <param name="select"></param>
 /// <returns></returns>
 public static WhereClause In(this FieldColumn column, SelectQuery select) => new WhereClause(column, ClauseOperator.In, select);
Exemple #4
0
 /// <summary>
 /// Creates a <see cref="WhereClause"/> that states <paramref name="column"/>'s value is one the
 /// </summary>
 /// <param name="column">column to apply the clause onto</param>
 /// <param name="first"></param>
 /// <param name="values"></param>
 /// <returns></returns>
 public static WhereClause In(this FieldColumn column, string first, params string[] values) => new WhereClause(column, ClauseOperator.In, new StringValues(first, values));
Exemple #5
0
 /// <summary>
 /// Creates a <see cref="WhereClause"/> equivalent to <code>column = constraint</code>
 /// </summary>
 /// <param name="column"></param>
 /// <param name="constraint"></param>
 /// <returns></returns>
 public static WhereClause EqualTo(this FieldColumn column, ColumnBase constraint) => new WhereClause(column, ClauseOperator.EqualTo, constraint);
Exemple #6
0
 /// <summary>
 /// Creates a <see cref="WhereClause"/> that states <paramref name="column"/>'value is <c> &gt; </c> <paramref name="constraint"/>'s value.
 /// </summary>
 /// <param name="column">Column to apply the clause onto</param>
 /// <param name="constraint"></param>
 /// <returns></returns>
 public static WhereClause GreaterThan(this FieldColumn column, ColumnBase constraint) => new WhereClause(column, ClauseOperator.GreaterThan, constraint);
Exemple #7
0
 /// <summary>
 /// Creates a <see cref="WhereClause"/> that states <paramref name="column"/>'s value is not <c>null</c>.
 /// </summary>
 /// <param name="column">Column to apply the clause onto</param>
 /// <returns></returns>
 public static WhereClause IsNotNull(this FieldColumn column) => new WhereClause(column, ClauseOperator.IsNotNull);
Exemple #8
0
 public static InsertedValue InsertValue(this FieldColumn columnName, IColumn column)
 => new InsertedValue(columnName, column);
Exemple #9
0
 /// <summary>
 /// Creates a <see cref="WhereClause"/> that states <paramref name="column"/>'s value is like <paramref name="variable"/>.
 /// </summary>
 /// <param name="column">column to apply the clause onto</param>
 /// <param name="variable"></param>
 /// <returns></returns>
 public static WhereClause Like(this FieldColumn column, string variable) => new WhereClause(column, ClauseOperator.Like, variable.Literal());
Exemple #10
0
 /// <summary>
 /// Creates a <see cref="WhereClause"/> that states <paramref name="column"/>'s value is like <paramref name="variable"/>.
 /// </summary>
 /// <param name="column">column to apply the clause onto</param>
 /// <param name="variable"></param>
 /// <returns></returns>
 public static WhereClause Like(this FieldColumn column, IColumn variable) => new WhereClause(column, ClauseOperator.Like, variable);
Exemple #11
0
 /// <summary>
 /// Builds a new <see cref="InsertedValue"/>
 /// </summary>
 /// <param name="column">column where the <paramref name="value"/> will be inserted.</param>
 /// <param name="value">value to insert</param>
 /// <exception cref="ArgumentNullException"><paramref name="column"/> is <c>null</c>.</exception>
 public InsertedValue(FieldColumn column, IColumn value)
 {
     Column = column ?? throw new ArgumentNullException(nameof(column));
     Value  = value;
 }