protected virtual string CompileCondition(WhereCondition condition, SqlCompilerContext context) { return(condition switch { CompareColumnsCondition compareColumnsCondition => CompileCondition(compareColumnsCondition, context), CompareCondition compareCondition => CompileCondition(compareCondition, context), InCondition inCondition => CompileCondition(inCondition, context), NestedCondition nestedCondition => CompileCondition(nestedCondition, context), RawCondition rawCondition => CompileCondition(rawCondition, context), _ => throw new ArgumentOutOfRangeException(nameof(condition)) });
/// <summary> /// Defines a <c>JOIN</c> between two tables. /// </summary> /// <param name="parentColumn">The column on the parent table.</param> /// <param name="childColumn">The column on the child table</param> /// <param name="op">The join operator.</param> /// <returns>The <see cref="JoinBuilder"/> instance.</returns> public void On(string parentColumn, string childColumn, string op = "=") { if (parentColumn == null) { throw new ArgumentNullException(nameof(parentColumn)); } if (childColumn == null) { throw new ArgumentNullException(nameof(childColumn)); } if (op == null) { throw new ArgumentNullException(nameof(op)); } Condition = new CompareColumnsCondition(ParentTableAlias, parentColumn, op, ChildTableAlias, childColumn); }