Table of Contents

Class LogicalBuilder<TBuilder>

Namespace
FluentCommand.Query
Assembly
FluentCommand.dll

Provides a generic base class for building logical SQL query expressions (such as grouped AND/OR conditions) with fluent, chainable methods.

public abstract class LogicalBuilder<TBuilder> : WhereBuilder<TBuilder>, IStatementBuilder, IQueryBuilder where TBuilder : LogicalBuilder<TBuilder>

Type Parameters

TBuilder

The type of the builder for fluent chaining.

Inheritance
WhereBuilder<TBuilder>
LogicalBuilder<TBuilder>
Implements
Derived
Inherited Members

Constructors

LogicalBuilder(IQueryGenerator, List<QueryParameter>, LogicalOperators)

Initializes a new instance of the LogicalBuilder<TBuilder> class.

protected LogicalBuilder(IQueryGenerator queryGenerator, List<QueryParameter> parameters, LogicalOperators logicalOperator = LogicalOperators.And)

Parameters

queryGenerator IQueryGenerator

The IQueryGenerator used to generate SQL expressions.

parameters List<QueryParameter>

The list of QueryParameter objects for the query.

logicalOperator LogicalOperators

The logical operator (LogicalOperators) to combine WHERE expressions. Defaults to And.

Methods

BuildStatement()

Builds the logical SQL expression using the current WHERE expressions and logical operator.

public override QueryStatement BuildStatement()

Returns

QueryStatement

A QueryStatement containing the logical SQL expression and its parameters, or null if no WHERE expressions are present.