Creates SQL for a comma-delimted list of arbitrarily-named parameters with the specified values, surrounded by parentheses.
public static Sql ParamTuple(IEnumerable values)
Empty SQL fragments are ignored. Since it would otherwise result in a confusing SQL syntax error, an InvalidOperationException is thrown if the collection of values is empty. Use Sql.Format($"({Sql.Join(", ", values.Select(Sql.Param))})")
to permit an empty tuple.
Creates SQL for a comma-delimted list of arbitrarily-named parameters with the specified values, surrounded by parentheses.
public static Sql ParamTuple(IEnumerable<object?> values)
Empty SQL fragments are ignored. Since it would otherwise result in a confusing SQL syntax error, an InvalidOperationException is thrown if the collection of values is empty. Use Sql.Format($"({Sql.Join(", ", values.Select(Sql.Param))})")
to permit an empty tuple.