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

            return(new UpdateFieldValue(destination, source));
        }
Ejemplo n.º 2
0
 public static JsonFieldColumn Json(this FieldColumn column, string path = null) => new JsonFieldColumn(column, path);
Ejemplo n.º 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);
Ejemplo n.º 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));
Ejemplo n.º 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);
Ejemplo n.º 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);
Ejemplo n.º 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);
Ejemplo n.º 8
0
 public static InsertedValue InsertValue(this FieldColumn columnName, IColumn column)
 => new InsertedValue(columnName, column);
Ejemplo n.º 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());
Ejemplo n.º 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);
Ejemplo n.º 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;
 }