Class UpdateStatement
- Namespace
- FluentCommand.Query.Generators
- Assembly
- FluentCommand.dll
Represents a complete SQL UPDATE statement, including table, assignments, output, joins, where, and comments.
public record UpdateStatement : IEquatable<UpdateStatement>
- Inheritance
-
UpdateStatement
- Implements
- Inherited Members
Constructors
UpdateStatement(TableExpression, IReadOnlyCollection<UpdateExpression>, IReadOnlyCollection<ColumnExpression>, IReadOnlyCollection<TableExpression>, IReadOnlyCollection<JoinExpression>, IReadOnlyCollection<WhereExpression>, IReadOnlyCollection<string>)
Represents a complete SQL UPDATE statement, including table, assignments, output, joins, where, and comments.
public UpdateStatement(TableExpression TableExpression, IReadOnlyCollection<UpdateExpression> UpdateExpressions, IReadOnlyCollection<ColumnExpression> OutputExpressions, IReadOnlyCollection<TableExpression> FromExpressions, IReadOnlyCollection<JoinExpression> JoinExpressions, IReadOnlyCollection<WhereExpression> WhereExpressions, IReadOnlyCollection<string> CommentExpressions)
Parameters
TableExpression
TableExpressionThe table to update.
UpdateExpressions
IReadOnlyCollection<UpdateExpression>The column assignments for the update.
OutputExpressions
IReadOnlyCollection<ColumnExpression>The columns to return/output after update (optional).
FromExpressions
IReadOnlyCollection<TableExpression>The FROM clause tables (optional).
JoinExpressions
IReadOnlyCollection<JoinExpression>The join clauses (optional).
WhereExpressions
IReadOnlyCollection<WhereExpression>The WHERE clause conditions (optional).
CommentExpressions
IReadOnlyCollection<string>The comment expressions to include in the statement.
UpdateStatement(UpdateStatement)
protected UpdateStatement(UpdateStatement original)
Parameters
original
UpdateStatement
Properties
CommentExpressions
The comment expressions to include in the statement.
public IReadOnlyCollection<string> CommentExpressions { get; init; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
FromExpressions
The FROM clause tables (optional).
public IReadOnlyCollection<TableExpression> FromExpressions { get; init; }
Property Value
JoinExpressions
The join clauses (optional).
public IReadOnlyCollection<JoinExpression> JoinExpressions { get; init; }
Property Value
OutputExpressions
The columns to return/output after update (optional).
public IReadOnlyCollection<ColumnExpression> OutputExpressions { get; init; }
Property Value
TableExpression
The table to update.
public TableExpression TableExpression { get; init; }
Property Value
UpdateExpressions
The column assignments for the update.
public IReadOnlyCollection<UpdateExpression> UpdateExpressions { get; init; }
Property Value
WhereExpressions
The WHERE clause conditions (optional).
public IReadOnlyCollection<WhereExpression> WhereExpressions { get; init; }
Property Value
Methods
Deconstruct(out TableExpression, out IReadOnlyCollection<UpdateExpression>, out IReadOnlyCollection<ColumnExpression>, out IReadOnlyCollection<TableExpression>, out IReadOnlyCollection<JoinExpression>, out IReadOnlyCollection<WhereExpression>, out IReadOnlyCollection<string>)
public void Deconstruct(out TableExpression TableExpression, out IReadOnlyCollection<UpdateExpression> UpdateExpressions, out IReadOnlyCollection<ColumnExpression> OutputExpressions, out IReadOnlyCollection<TableExpression> FromExpressions, out IReadOnlyCollection<JoinExpression> JoinExpressions, out IReadOnlyCollection<WhereExpression> WhereExpressions, out IReadOnlyCollection<string> CommentExpressions)
Parameters
TableExpression
TableExpressionUpdateExpressions
IReadOnlyCollection<UpdateExpression>OutputExpressions
IReadOnlyCollection<ColumnExpression>FromExpressions
IReadOnlyCollection<TableExpression>JoinExpressions
IReadOnlyCollection<JoinExpression>WhereExpressions
IReadOnlyCollection<WhereExpression>CommentExpressions
IReadOnlyCollection<string>
Equals(UpdateStatement?)
public virtual bool Equals(UpdateStatement? other)
Parameters
other
UpdateStatement
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builder
StringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(UpdateStatement?, UpdateStatement?)
public static bool operator ==(UpdateStatement? left, UpdateStatement? right)
Parameters
left
UpdateStatementright
UpdateStatement
Returns
operator !=(UpdateStatement?, UpdateStatement?)
public static bool operator !=(UpdateStatement? left, UpdateStatement? right)
Parameters
left
UpdateStatementright
UpdateStatement