Table of Contents

Class InsertStatement

Namespace
FluentCommand.Query.Generators
Assembly
FluentCommand.dll

Represents a complete SQL INSERT statement, including table, columns, values, output, and comments.

public record InsertStatement : IEquatable<InsertStatement>
Inheritance
InsertStatement
Implements
Inherited Members

Constructors

InsertStatement(InsertStatement)

protected InsertStatement(InsertStatement original)

Parameters

original InsertStatement

InsertStatement(TableExpression, IReadOnlyCollection<ColumnExpression>, IReadOnlyCollection<ColumnExpression>, IReadOnlyCollection<string>, IReadOnlyCollection<string>)

Represents a complete SQL INSERT statement, including table, columns, values, output, and comments.

public InsertStatement(TableExpression TableExpression, IReadOnlyCollection<ColumnExpression> ColumnExpressions, IReadOnlyCollection<ColumnExpression> OutputExpressions, IReadOnlyCollection<string> ValueExpressions, IReadOnlyCollection<string> CommentExpressions)

Parameters

TableExpression TableExpression

The table to insert into.

ColumnExpressions IReadOnlyCollection<ColumnExpression>

The columns to insert values into.

OutputExpressions IReadOnlyCollection<ColumnExpression>

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

ValueExpressions IReadOnlyCollection<string>

The values to insert.

CommentExpressions IReadOnlyCollection<string>

The comment expressions to include in the statement.

Properties

ColumnExpressions

The columns to insert values into.

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

Property Value

IReadOnlyCollection<ColumnExpression>

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

OutputExpressions

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

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

Property Value

IReadOnlyCollection<ColumnExpression>

TableExpression

The table to insert into.

public TableExpression TableExpression { get; init; }

Property Value

TableExpression

ValueExpressions

The values to insert.

public IReadOnlyCollection<string> ValueExpressions { get; init; }

Property Value

IReadOnlyCollection<string>

Methods

Deconstruct(out TableExpression, out IReadOnlyCollection<ColumnExpression>, out IReadOnlyCollection<ColumnExpression>, out IReadOnlyCollection<string>, out IReadOnlyCollection<string>)

public void Deconstruct(out TableExpression TableExpression, out IReadOnlyCollection<ColumnExpression> ColumnExpressions, out IReadOnlyCollection<ColumnExpression> OutputExpressions, out IReadOnlyCollection<string> ValueExpressions, out IReadOnlyCollection<string> CommentExpressions)

Parameters

TableExpression TableExpression
ColumnExpressions IReadOnlyCollection<ColumnExpression>
OutputExpressions IReadOnlyCollection<ColumnExpression>
ValueExpressions IReadOnlyCollection<string>
CommentExpressions IReadOnlyCollection<string>

Equals(InsertStatement?)

public virtual bool Equals(InsertStatement? other)

Parameters

other InsertStatement

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 ==(InsertStatement?, InsertStatement?)

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

Parameters

left InsertStatement
right InsertStatement

Returns

bool

operator !=(InsertStatement?, InsertStatement?)

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

Parameters

left InsertStatement
right InsertStatement

Returns

bool