Table of Contents

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 TableExpression

The 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

IReadOnlyCollection<string>

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

FromExpressions

The FROM clause tables (optional).

public IReadOnlyCollection<TableExpression> FromExpressions { get; init; }

Property Value

IReadOnlyCollection<TableExpression>

JoinExpressions

The join clauses (optional).

public IReadOnlyCollection<JoinExpression> JoinExpressions { get; init; }

Property Value

IReadOnlyCollection<JoinExpression>

OutputExpressions

The columns to return/output after update (optional).

public IReadOnlyCollection<ColumnExpression> OutputExpressions { get; init; }

Property Value

IReadOnlyCollection<ColumnExpression>

TableExpression

The table to update.

public TableExpression TableExpression { get; init; }

Property Value

TableExpression

UpdateExpressions

The column assignments for the update.

public IReadOnlyCollection<UpdateExpression> UpdateExpressions { get; init; }

Property Value

IReadOnlyCollection<UpdateExpression>

WhereExpressions

The WHERE clause conditions (optional).

public IReadOnlyCollection<WhereExpression> WhereExpressions { get; init; }

Property Value

IReadOnlyCollection<WhereExpression>

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 TableExpression
UpdateExpressions 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

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(UpdateStatement?, UpdateStatement?)

public static bool operator ==(UpdateStatement? left, UpdateStatement? right)

Parameters

left UpdateStatement
right UpdateStatement

Returns

bool

operator !=(UpdateStatement?, UpdateStatement?)

public static bool operator !=(UpdateStatement? left, UpdateStatement? right)

Parameters

left UpdateStatement
right UpdateStatement

Returns

bool