Class SqlNode
- Namespace
- LfrlAnvil.Sql.Expressions
- Assembly
- LfrlAnvil.Sql.Core.dll
Creates instances of SqlNodeBase type.
public static class SqlNode
- Inheritance
-
SqlNode
- Inherited Members
Methods
Add(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlAddExpressionNode instance.
[Pure]
public static SqlAddExpressionNode Add(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlAddExpressionNode
New SqlAddExpressionNode instance.
AddColumn(SqlRecordSetInfo, SqlColumnDefinitionNode)
Creates a new SqlAddColumnNode instance.
[Pure]
public static SqlAddColumnNode AddColumn(SqlRecordSetInfo table, SqlColumnDefinitionNode definition)
Parameters
table
SqlRecordSetInfoSource table.
definition
SqlColumnDefinitionNodeDefinition of the column to add.
Returns
- SqlAddColumnNode
New SqlAddColumnNode instance.
AggregationFilterTrait(SqlConditionNode, bool)
Creates a new SqlAggregationFilterTraitNode instance.
[Pure]
public static SqlAggregationFilterTraitNode AggregationFilterTrait(SqlConditionNode filter, bool isConjunction)
Parameters
filter
SqlConditionNodeUnderlying predicate.
isConjunction
boolSpecifies whether or not this trait should be merged with other SqlAggregationFilterTraitNode instances through an SqlAndConditionNode rather than an SqlOrConditionNode.
Returns
- SqlAggregationFilterTraitNode
New SqlAggregationFilterTraitNode instance.
AggregationTrait(params SqlExpressionNode[])
Creates a new SqlAggregationTraitNode instance.
[Pure]
public static SqlAggregationTraitNode AggregationTrait(params SqlExpressionNode[] expressions)
Parameters
expressions
SqlExpressionNode[]Collection of expressions to aggregate by.
Returns
- SqlAggregationTraitNode
New SqlAggregationTraitNode instance.
And(SqlConditionNode, SqlConditionNode)
Creates a new SqlAndConditionNode instance.
[Pure]
public static SqlAndConditionNode And(SqlConditionNode left, SqlConditionNode right)
Parameters
left
SqlConditionNodeFirst operand.
right
SqlConditionNodeSecond operand.
Returns
- SqlAndConditionNode
New SqlAndConditionNode instance.
Batch(params ISqlStatementNode[])
Creates a new SqlStatementBatchNode instance.
[Pure]
public static SqlStatementBatchNode Batch(params ISqlStatementNode[] statements)
Parameters
statements
ISqlStatementNode[]Collection of SQL statements.
Returns
- SqlStatementBatchNode
New SqlStatementBatchNode instance.
BeginTransaction(IsolationLevel)
Creates a new SqlBeginTransactionNode instance.
[Pure]
public static SqlBeginTransactionNode BeginTransaction(IsolationLevel isolationLevel)
Parameters
isolationLevel
IsolationLevelTransaction's IsolationLevel.
Returns
- SqlBeginTransactionNode
New SqlBeginTransactionNode instance.
Between(SqlExpressionNode, SqlExpressionNode, SqlExpressionNode)
Creates a new SqlBetweenConditionNode instance.
[Pure]
public static SqlBetweenConditionNode Between(SqlExpressionNode value, SqlExpressionNode min, SqlExpressionNode max)
Parameters
value
SqlExpressionNodeValue to check.
min
SqlExpressionNodeMinimum acceptable value.
max
SqlExpressionNodeMaximum acceptable value.
Returns
- SqlBetweenConditionNode
New SqlBetweenConditionNode instance.
BitwiseAnd(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlBitwiseAndExpressionNode instance.
[Pure]
public static SqlBitwiseAndExpressionNode BitwiseAnd(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlBitwiseAndExpressionNode
New SqlBitwiseAndExpressionNode instance.
BitwiseLeftShift(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlBitwiseLeftShiftExpressionNode instance.
[Pure]
public static SqlBitwiseLeftShiftExpressionNode BitwiseLeftShift(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
BitwiseNot(SqlExpressionNode)
Creates a new SqlBitwiseNotExpressionNode instance.
[Pure]
public static SqlBitwiseNotExpressionNode BitwiseNot(SqlExpressionNode value)
Parameters
value
SqlExpressionNodeOperand.
Returns
- SqlBitwiseNotExpressionNode
New SqlBitwiseNotExpressionNode instance.
BitwiseOr(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlBitwiseOrExpressionNode instance.
[Pure]
public static SqlBitwiseOrExpressionNode BitwiseOr(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlBitwiseOrExpressionNode
New SqlBitwiseOrExpressionNode instance.
BitwiseRightShift(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlBitwiseRightShiftExpressionNode instance.
[Pure]
public static SqlBitwiseRightShiftExpressionNode BitwiseRightShift(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
BitwiseXor(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlBitwiseXorExpressionNode instance.
[Pure]
public static SqlBitwiseXorExpressionNode BitwiseXor(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlBitwiseXorExpressionNode
New SqlBitwiseXorExpressionNode instance.
Check(SqlSchemaObjectName, SqlConditionNode)
Creates a new SqlCheckDefinitionNode instance.
[Pure]
public static SqlCheckDefinitionNode Check(SqlSchemaObjectName name, SqlConditionNode condition)
Parameters
name
SqlSchemaObjectNameCheck constraint's name.
condition
SqlConditionNodeCheck constraint's condition.
Returns
- SqlCheckDefinitionNode
New SqlCheckDefinitionNode instance.
Column(string, ISqlColumnTypeDefinition, bool, SqlExpressionNode?, SqlColumnComputation?)
Creates a new SqlColumnDefinitionNode instance.
[Pure]
public static SqlColumnDefinitionNode Column(string name, ISqlColumnTypeDefinition typeDefinition, bool isNullable = false, SqlExpressionNode? defaultValue = null, SqlColumnComputation? computation = null)
Parameters
name
stringColumn's name.
typeDefinition
ISqlColumnTypeDefinitionISqlColumnTypeDefinition instance that defines this column's type.
isNullable
boolSpecifies whether or not this column should be nullable. Equal to false by default.
defaultValue
SqlExpressionNodeColumn's optional default value. Equal to null by default.
computation
SqlColumnComputation?Column's optional computation. Equal to null by default.
Returns
- SqlColumnDefinitionNode
New SqlColumnDefinitionNode instance.
Column(string, TypeNullability, SqlExpressionNode?, SqlColumnComputation?)
Creates a new SqlColumnDefinitionNode instance.
[Pure]
public static SqlColumnDefinitionNode Column(string name, TypeNullability type, SqlExpressionNode? defaultValue = null, SqlColumnComputation? computation = null)
Parameters
name
stringColumn's name.
type
TypeNullabilityColumn's runtime type.
defaultValue
SqlExpressionNodeColumn's optional default value. Equal to null by default.
computation
SqlColumnComputation?Column's optional computation. Equal to null by default.
Returns
- SqlColumnDefinitionNode
New SqlColumnDefinitionNode instance.
Column<T>(string, bool, SqlExpressionNode?, SqlColumnComputation?)
Creates a new SqlColumnDefinitionNode instance.
[Pure]
public static SqlColumnDefinitionNode Column<T>(string name, bool isNullable = false, SqlExpressionNode? defaultValue = null, SqlColumnComputation? computation = null) where T : notnull
Parameters
name
stringColumn's name.
isNullable
boolSpecifies whether or not this column should be nullable. Equal to false by default.
defaultValue
SqlExpressionNodeColumn's optional default value. Equal to null by default.
computation
SqlColumnComputation?Column's optional computation. Equal to null by default.
Returns
- SqlColumnDefinitionNode
New SqlColumnDefinitionNode instance.
Type Parameters
T
Column's runtime type.
CommitTransaction()
Creates a new SqlCommitTransactionNode instance.
[Pure]
public static SqlCommitTransactionNode CommitTransaction()
Returns
- SqlCommitTransactionNode
New SqlCommitTransactionNode instance.
CommonTableExpressionTrait(params SqlCommonTableExpressionNode[])
Creates a new SqlCommonTableExpressionTraitNode instance.
[Pure]
public static SqlCommonTableExpressionTraitNode CommonTableExpressionTrait(params SqlCommonTableExpressionNode[] commonTableExpressions)
Parameters
commonTableExpressions
SqlCommonTableExpressionNode[]Collection of common table expressions.
Returns
CompoundQuery(SqlQueryExpressionNode, params SqlCompoundQueryComponentNode[])
Creates a new SqlCompoundQueryExpressionNode instance.
[Pure]
public static SqlCompoundQueryExpressionNode CompoundQuery(SqlQueryExpressionNode firstQuery, params SqlCompoundQueryComponentNode[] followingQueries)
Parameters
firstQuery
SqlQueryExpressionNodeFirst underlying query.
followingQueries
SqlCompoundQueryComponentNode[]Collection of queries that sequentially follow after the first query.
Returns
- SqlCompoundQueryExpressionNode
New SqlCompoundQueryExpressionNode instance.
CompoundWith(SqlCompoundQueryOperator, SqlQueryExpressionNode)
Creates a new SqlCompoundQueryComponentNode instance.
[Pure]
public static SqlCompoundQueryComponentNode CompoundWith(SqlCompoundQueryOperator @operator, SqlQueryExpressionNode query)
Parameters
operator
SqlCompoundQueryOperatorCompound query operator with which this query should be included.
query
SqlQueryExpressionNodeUnderlying query.
Returns
- SqlCompoundQueryComponentNode
New SqlCompoundQueryComponentNode instance.
Concat(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlConcatExpressionNode instance.
[Pure]
public static SqlConcatExpressionNode Concat(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlConcatExpressionNode
New SqlConcatExpressionNode instance.
CreateIndex(SqlSchemaObjectName, bool, SqlRecordSetNode, ReadOnlyArray<SqlOrderByNode>, bool, SqlConditionNode?)
Creates a new SqlCreateIndexNode instance.
[Pure]
public static SqlCreateIndexNode CreateIndex(SqlSchemaObjectName name, bool isUnique, SqlRecordSetNode table, ReadOnlyArray<SqlOrderByNode> columns, bool replaceIfExists = false, SqlConditionNode? filter = null)
Parameters
name
SqlSchemaObjectNameIndex's name.
isUnique
boolSpecifies whether or not this index is unique.
table
SqlRecordSetNodeTable on which this index is created.
columns
ReadOnlyArray<SqlOrderByNode>Collection of expressions that define this index.
replaceIfExists
boolSpecifies whether or not the index should be replaced if it already exists in DB. Equal to false by default.
filter
SqlConditionNodeOptional filter condition. Equal to null by default.
Returns
- SqlCreateIndexNode
New SqlCreateIndexNode instance.
CreateTable(SqlRecordSetInfo, SqlColumnDefinitionNode[], bool, Func<SqlNewTableNode, SqlCreateTableConstraints>?)
Creates a new SqlCreateTableNode instance.
[Pure]
public static SqlCreateTableNode CreateTable(SqlRecordSetInfo info, SqlColumnDefinitionNode[] columns, bool ifNotExists = false, Func<SqlNewTableNode, SqlCreateTableConstraints>? constraintsProvider = null)
Parameters
info
SqlRecordSetInfoTable's name.
columns
SqlColumnDefinitionNode[]Collection of columns.
ifNotExists
boolSpecifies whether or not this table should only be created if it does not already exist in DB. Equal to false by default.
constraintsProvider
Func<SqlNewTableNode, SqlCreateTableConstraints>Optional SqlCreateTableConstraints provider.
Returns
- SqlCreateTableNode
New SqlCreateTableNode instance.
CreateView(SqlRecordSetInfo, SqlQueryExpressionNode, bool)
Creates a new SqlCreateViewNode instance.
[Pure]
public static SqlCreateViewNode CreateView(SqlRecordSetInfo info, SqlQueryExpressionNode source, bool replaceIfExists = false)
Parameters
info
SqlRecordSetInfoView's name.
source
SqlQueryExpressionNodeUnderlying source query expression that defines this view.
replaceIfExists
boolSpecifies whether or not the view should be replaced if it already exists in DB. Equal to false by default.
Returns
- SqlCreateViewNode
New SqlCreateViewNode instance.
CrossJoin(SqlRecordSetNode)
Creates a new SqlDataSourceJoinOnNode instance with Cross type.
[Pure]
public static SqlDataSourceJoinOnNode CrossJoin(SqlRecordSetNode innerRecordSet)
Parameters
innerRecordSet
SqlRecordSetNodeInner SqlRecordSetNode instance.
Returns
- SqlDataSourceJoinOnNode
New SqlDataSourceJoinOnNode instance.
DeleteFrom(SqlDataSourceNode)
Creates a new SqlDeleteFromNode instance.
[Pure]
public static SqlDeleteFromNode DeleteFrom(SqlDataSourceNode dataSource)
Parameters
dataSource
SqlDataSourceNodeData source that defines records to be deleted.
Returns
- SqlDeleteFromNode
New SqlDeleteFromNode instance.
DistinctTrait()
Creates a new SqlDistinctTraitNode instance.
[Pure]
public static SqlDistinctTraitNode DistinctTrait()
Returns
- SqlDistinctTraitNode
New SqlDistinctTraitNode instance.
Divide(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlDivideExpressionNode instance.
[Pure]
public static SqlDivideExpressionNode Divide(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlDivideExpressionNode
New SqlDivideExpressionNode instance.
DropColumn(SqlRecordSetInfo, string)
Creates a new SqlDropColumnNode instance.
[Pure]
public static SqlDropColumnNode DropColumn(SqlRecordSetInfo table, string name)
Parameters
table
SqlRecordSetInfoSource table.
name
stringColumn's name.
Returns
- SqlDropColumnNode
New SqlDropColumnNode instance.
DropIndex(SqlRecordSetInfo, SqlSchemaObjectName, bool)
Creates a new SqlDropIndexNode instance.
[Pure]
public static SqlDropIndexNode DropIndex(SqlRecordSetInfo table, SqlSchemaObjectName name, bool ifExists = false)
Parameters
table
SqlRecordSetInfoSource table.
name
SqlSchemaObjectNameIndex's name.
ifExists
boolSpecifies whether or not the removal attempt should only be made if this index exists in DB. Equal to false by default.
Returns
- SqlDropIndexNode
New SqlDropIndexNode instance.
DropTable(SqlRecordSetInfo, bool)
Creates a new SqlDropTableNode instance.
[Pure]
public static SqlDropTableNode DropTable(SqlRecordSetInfo table, bool ifExists = false)
Parameters
table
SqlRecordSetInfoTable's name.
ifExists
boolSpecifies whether or not the removal attempt should only be made if this table exists in DB. Equal to false by default.
Returns
- SqlDropTableNode
New SqlDropTableNode instance.
DropView(SqlRecordSetInfo, bool)
Creates a new SqlDropViewNode instance.
[Pure]
public static SqlDropViewNode DropView(SqlRecordSetInfo view, bool ifExists = false)
Parameters
view
SqlRecordSetInfoView's name.
ifExists
boolSpecifies whether or not the removal attempt should only be made if this view exists in DB. Equal to false by default.
Returns
- SqlDropViewNode
New SqlDropViewNode instance.
DummyDataSource()
Creates a new SqlDummyDataSourceNode instance.
[Pure]
public static SqlDummyDataSourceNode DummyDataSource()
Returns
- SqlDummyDataSourceNode
New SqlDummyDataSourceNode instance.
EqualTo(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlEqualToConditionNode instance.
[Pure]
public static SqlEqualToConditionNode EqualTo(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlEqualToConditionNode
New SqlEqualToConditionNode instance.
ExceptWith(SqlQueryExpressionNode)
Creates a new SqlCompoundQueryComponentNode instance with Except operator.
[Pure]
public static SqlCompoundQueryComponentNode ExceptWith(SqlQueryExpressionNode query)
Parameters
query
SqlQueryExpressionNodeUnderlying query.
Returns
- SqlCompoundQueryComponentNode
New SqlCompoundQueryComponentNode instance.
Exists(SqlQueryExpressionNode)
Creates a new SqlExistsConditionNode instance.
[Pure]
public static SqlExistsConditionNode Exists(SqlQueryExpressionNode query)
Parameters
query
SqlQueryExpressionNodeSub-query to check.
Returns
- SqlExistsConditionNode
New SqlExistsConditionNode instance.
False()
Creates a new SqlFalseNode instance.
[Pure]
public static SqlFalseNode False()
Returns
- SqlFalseNode
New SqlFalseNode instance.
FilterTrait(SqlConditionNode, bool)
Creates a new SqlFilterTraitNode instance.
[Pure]
public static SqlFilterTraitNode FilterTrait(SqlConditionNode filter, bool isConjunction)
Parameters
filter
SqlConditionNodeUnderlying predicate.
isConjunction
boolSpecifies whether or not this trait should be merged with other SqlFilterTraitNode instances through an SqlAndConditionNode rather than an SqlOrConditionNode.
Returns
- SqlFilterTraitNode
New SqlFilterTraitNode instance.
ForeignKey(SqlSchemaObjectName, SqlDataFieldNode[], SqlRecordSetNode, SqlDataFieldNode[], ReferenceBehavior?, ReferenceBehavior?)
Creates a new SqlForeignKeyDefinitionNode instance.
[Pure]
public static SqlForeignKeyDefinitionNode ForeignKey(SqlSchemaObjectName name, SqlDataFieldNode[] columns, SqlRecordSetNode referencedTable, SqlDataFieldNode[] referencedColumns, ReferenceBehavior? onDeleteBehavior = null, ReferenceBehavior? onUpdateBehavior = null)
Parameters
name
SqlSchemaObjectNameForeign key constraint's name.
columns
SqlDataFieldNode[]Collection of columns from source table that this foreign key originates from.
referencedTable
SqlRecordSetNodeTable referenced by this foreign key constraint.
referencedColumns
SqlDataFieldNode[]Collection of columns from referenced table referenced by this foreign key constraint.
onDeleteBehavior
ReferenceBehaviorSpecifies this foreign key constraint's on delete behavior. Equal to Restrict by default.
onUpdateBehavior
ReferenceBehaviorSpecifies this foreign key constraint's on update behavior. Equal to Restrict by default.
Returns
- SqlForeignKeyDefinitionNode
New SqlForeignKeyDefinitionNode instance.
FullJoinOn(SqlRecordSetNode, SqlConditionNode)
Creates a new SqlDataSourceJoinOnNode instance with Full type.
[Pure]
public static SqlDataSourceJoinOnNode FullJoinOn(SqlRecordSetNode innerRecordSet, SqlConditionNode onExpression)
Parameters
innerRecordSet
SqlRecordSetNodeInner SqlRecordSetNode instance.
onExpression
SqlConditionNodeCondition of this join operation.
Returns
- SqlDataSourceJoinOnNode
New SqlDataSourceJoinOnNode instance.
GreaterThan(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlGreaterThanConditionNode instance.
[Pure]
public static SqlGreaterThanConditionNode GreaterThan(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlGreaterThanConditionNode
New SqlGreaterThanConditionNode instance.
GreaterThanOrEqualTo(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlGreaterThanOrEqualToConditionNode instance.
[Pure]
public static SqlGreaterThanOrEqualToConditionNode GreaterThanOrEqualTo(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
Iif(SqlConditionNode, SqlExpressionNode, SqlExpressionNode)
Creates a new SqlSwitchExpressionNode instance.
[Pure]
public static SqlSwitchExpressionNode Iif(SqlConditionNode condition, SqlExpressionNode whenTrue, SqlExpressionNode whenFalse)
Parameters
condition
SqlConditionNodeUnderlying condition.
whenTrue
SqlExpressionNodeExpression to be returned when the condition returns true.
whenFalse
SqlExpressionNodeExpression to be returned when the condition returns false.
Returns
- SqlSwitchExpressionNode
New SqlSwitchExpressionNode instance.
In(SqlExpressionNode, params SqlExpressionNode[])
Creates a new SqlInConditionNode instance or SqlFalseNode
when expressions
are empty.
[Pure]
public static SqlConditionNode In(SqlExpressionNode value, params SqlExpressionNode[] expressions)
Parameters
value
SqlExpressionNodeValue to check.
expressions
SqlExpressionNode[]Collection of values that the value is compared against.
Returns
- SqlConditionNode
New SqlInConditionNode instance or SqlFalseNode instance.
InQuery(SqlExpressionNode, SqlQueryExpressionNode)
Creates a new SqlInQueryConditionNode instance.
[Pure]
public static SqlInQueryConditionNode InQuery(SqlExpressionNode value, SqlQueryExpressionNode query)
Parameters
value
SqlExpressionNodeValue to check.
query
SqlQueryExpressionNodeSub-query that the value is compared against.
Returns
- SqlInQueryConditionNode
New SqlInQueryConditionNode instance.
InnerJoinOn(SqlRecordSetNode, SqlConditionNode)
Creates a new SqlDataSourceJoinOnNode instance with Inner type.
[Pure]
public static SqlDataSourceJoinOnNode InnerJoinOn(SqlRecordSetNode innerRecordSet, SqlConditionNode onExpression)
Parameters
innerRecordSet
SqlRecordSetNodeInner SqlRecordSetNode instance.
onExpression
SqlConditionNodeCondition of this join operation.
Returns
- SqlDataSourceJoinOnNode
New SqlDataSourceJoinOnNode instance.
InsertInto(SqlQueryExpressionNode, SqlRecordSetNode, params SqlDataFieldNode[])
Creates a new SqlInsertIntoNode instance.
[Pure]
public static SqlInsertIntoNode InsertInto(SqlQueryExpressionNode query, SqlRecordSetNode recordSet, params SqlDataFieldNode[] dataFields)
Parameters
query
SqlQueryExpressionNodeSqlQueryExpressionNode source of records to be inserted.
recordSet
SqlRecordSetNodeTable to insert into.
dataFields
SqlDataFieldNode[]Collection of record set data fields that this insertion refers to.
Returns
- SqlInsertIntoNode
New SqlInsertIntoNode instance.
InsertInto(SqlValuesNode, SqlRecordSetNode, params SqlDataFieldNode[])
Creates a new SqlInsertIntoNode instance.
[Pure]
public static SqlInsertIntoNode InsertInto(SqlValuesNode values, SqlRecordSetNode recordSet, params SqlDataFieldNode[] dataFields)
Parameters
values
SqlValuesNodeSqlValuesNode source of records to be inserted.
recordSet
SqlRecordSetNodeTable to insert into.
dataFields
SqlDataFieldNode[]Collection of record set data fields that this insertion refers to.
Returns
- SqlInsertIntoNode
New SqlInsertIntoNode instance.
IntersectWith(SqlQueryExpressionNode)
Creates a new SqlCompoundQueryComponentNode instance with Intersect operator.
[Pure]
public static SqlCompoundQueryComponentNode IntersectWith(SqlQueryExpressionNode query)
Parameters
query
SqlQueryExpressionNodeUnderlying query.
Returns
- SqlCompoundQueryComponentNode
New SqlCompoundQueryComponentNode instance.
Join(SqlDataSourceNode, params SqlDataSourceJoinOnNode[])
Creates a new SqlMultiDataSourceNode instance.
[Pure]
public static SqlMultiDataSourceNode Join(SqlDataSourceNode from, params SqlDataSourceJoinOnNode[] joins)
Parameters
from
SqlDataSourceNodeSqlDataSourceNode instance from which this data source's definition begins.
joins
SqlDataSourceJoinOnNode[]Sequential collection of all SqlDataSourceJoinOnNode instances that define this data source.
Returns
- SqlMultiDataSourceNode
New SqlMultiDataSourceNode instance.
Join(SqlDataSourceNode, params SqlJoinDefinition[])
Creates a new SqlMultiDataSourceNode instance.
[Pure]
public static SqlMultiDataSourceNode Join(SqlDataSourceNode from, params SqlJoinDefinition[] definitions)
Parameters
from
SqlDataSourceNodeSqlDataSourceNode instance from which this data source's definition begins.
definitions
SqlJoinDefinition[]Sequential collection of all SqlJoinDefinition instances that define this data source.
Returns
- SqlMultiDataSourceNode
New SqlMultiDataSourceNode instance.
Join(SqlRecordSetNode, params SqlDataSourceJoinOnNode[])
Creates a new SqlMultiDataSourceNode instance.
[Pure]
public static SqlMultiDataSourceNode Join(SqlRecordSetNode from, params SqlDataSourceJoinOnNode[] joins)
Parameters
from
SqlRecordSetNodeFirst SqlRecordSetNode instance from which this data source's definition begins.
joins
SqlDataSourceJoinOnNode[]Sequential collection of all SqlDataSourceJoinOnNode instances that define this data source.
Returns
- SqlMultiDataSourceNode
New SqlMultiDataSourceNode instance.
Join(SqlRecordSetNode, params SqlJoinDefinition[])
Creates a new SqlMultiDataSourceNode instance.
[Pure]
public static SqlMultiDataSourceNode Join(SqlRecordSetNode from, params SqlJoinDefinition[] definitions)
Parameters
from
SqlRecordSetNodeFirst SqlRecordSetNode instance from which this data source's definition begins.
definitions
SqlJoinDefinition[]Sequential collection of all SqlJoinDefinition instances that define this data source.
Returns
- SqlMultiDataSourceNode
New SqlMultiDataSourceNode instance.
LeftJoinOn(SqlRecordSetNode, SqlConditionNode)
Creates a new SqlDataSourceJoinOnNode instance with Left type.
[Pure]
public static SqlDataSourceJoinOnNode LeftJoinOn(SqlRecordSetNode innerRecordSet, SqlConditionNode onExpression)
Parameters
innerRecordSet
SqlRecordSetNodeInner SqlRecordSetNode instance.
onExpression
SqlConditionNodeCondition of this join operation.
Returns
- SqlDataSourceJoinOnNode
New SqlDataSourceJoinOnNode instance.
LessThan(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlLessThanConditionNode instance.
[Pure]
public static SqlLessThanConditionNode LessThan(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlLessThanConditionNode
New SqlLessThanConditionNode instance.
LessThanOrEqualTo(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlLessThanOrEqualToConditionNode instance.
[Pure]
public static SqlLessThanOrEqualToConditionNode LessThanOrEqualTo(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
Like(SqlExpressionNode, SqlExpressionNode, SqlExpressionNode?)
Creates a new SqlLikeConditionNode instance.
[Pure]
public static SqlLikeConditionNode Like(SqlExpressionNode value, SqlExpressionNode pattern, SqlExpressionNode? escape = null)
Parameters
value
SqlExpressionNodeValue to check.
pattern
SqlExpressionNodeString pattern to check the value against.
escape
SqlExpressionNodeOptional escape character for the pattern. Equal to null by default.
Returns
- SqlLikeConditionNode
New SqlLikeConditionNode instance.
LimitTrait(SqlExpressionNode)
Creates a new SqlLimitTraitNode instance.
[Pure]
public static SqlLimitTraitNode LimitTrait(SqlExpressionNode value)
Parameters
value
SqlExpressionNodeUnderlying value.
Returns
- SqlLimitTraitNode
New SqlLimitTraitNode instance.
Literal<T>(T?)
Creates a new SqlLiteralNode<T> instance or SqlNullNode instance when value
is null.
[Pure]
public static SqlExpressionNode Literal<T>(T? value) where T : struct
Parameters
value
T?Underlying value.
Returns
- SqlExpressionNode
New SqlLiteralNode<T> instance or SqlNullNode instance.
Type Parameters
T
Value type.
Literal<T>(T?)
Creates a new SqlLiteralNode<T> instance or SqlNullNode instance when value
is null.
[Pure]
public static SqlExpressionNode Literal<T>(T? value) where T : notnull
Parameters
value
TUnderlying value.
Returns
- SqlExpressionNode
New SqlLiteralNode<T> instance or SqlNullNode instance.
Type Parameters
T
Value type.
Modulo(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlModuloExpressionNode instance.
[Pure]
public static SqlModuloExpressionNode Modulo(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlModuloExpressionNode
New SqlModuloExpressionNode instance.
Multiply(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlMultiplyExpressionNode instance.
[Pure]
public static SqlMultiplyExpressionNode Multiply(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlMultiplyExpressionNode
New SqlMultiplyExpressionNode instance.
NamedFunctionRecordSet(SqlNamedFunctionExpressionNode, string)
Creates a new SqlNamedFunctionRecordSetNode instance.
[Pure]
public static SqlNamedFunctionRecordSetNode NamedFunctionRecordSet(SqlNamedFunctionExpressionNode function, string alias)
Parameters
function
SqlNamedFunctionExpressionNodeUnderlying SqlNamedFunctionExpressionNode instance.
alias
stringAlias of this record set.
Returns
- SqlNamedFunctionRecordSetNode
New SqlNamedFunctionRecordSetNode instance.
Negate(SqlExpressionNode)
Creates a new SqlNegateExpressionNode instance.
[Pure]
public static SqlNegateExpressionNode Negate(SqlExpressionNode value)
Parameters
value
SqlExpressionNodeOperand.
Returns
- SqlNegateExpressionNode
New SqlNegateExpressionNode instance.
NewTableRecordSet(SqlCreateTableNode, string?)
Creates a new SqlNewTableNode instance.
[Pure]
public static SqlNewTableNode NewTableRecordSet(SqlCreateTableNode creationNode, string? alias = null)
Parameters
creationNode
SqlCreateTableNodeUnderlying SqlCreateTableNode instance.
alias
stringOptional alias of this record set. Equal to null by default.
Returns
- SqlNewTableNode
New SqlNewTableNode instance.
NewViewRecordSet(SqlCreateViewNode, string?)
Creates a new SqlNewViewNode instance.
[Pure]
public static SqlNewViewNode NewViewRecordSet(SqlCreateViewNode creationNode, string? alias = null)
Parameters
creationNode
SqlCreateViewNodeUnderlying SqlCreateViewNode instance.
alias
stringOptional alias of this record set. Equal to null by default.
Returns
- SqlNewViewNode
New SqlNewViewNode instance.
NotBetween(SqlExpressionNode, SqlExpressionNode, SqlExpressionNode)
Creates a new negated SqlBetweenConditionNode instance.
[Pure]
public static SqlBetweenConditionNode NotBetween(SqlExpressionNode value, SqlExpressionNode min, SqlExpressionNode max)
Parameters
value
SqlExpressionNodeValue to check.
min
SqlExpressionNodeMinimum acceptable value.
max
SqlExpressionNodeMaximum acceptable value.
Returns
- SqlBetweenConditionNode
New negated SqlBetweenConditionNode instance.
NotEqualTo(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlNotEqualToConditionNode instance.
[Pure]
public static SqlNotEqualToConditionNode NotEqualTo(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlNotEqualToConditionNode
New SqlNotEqualToConditionNode instance.
NotExists(SqlQueryExpressionNode)
Creates a new negated SqlExistsConditionNode instance.
[Pure]
public static SqlExistsConditionNode NotExists(SqlQueryExpressionNode query)
Parameters
query
SqlQueryExpressionNodeSub-query to check.
Returns
- SqlExistsConditionNode
New negated SqlExistsConditionNode instance.
NotIn(SqlExpressionNode, params SqlExpressionNode[])
Creates a new negated SqlInConditionNode instance or SqlTrueNode
when expressions
are empty.
[Pure]
public static SqlConditionNode NotIn(SqlExpressionNode value, params SqlExpressionNode[] expressions)
Parameters
value
SqlExpressionNodeValue to check.
expressions
SqlExpressionNode[]Collection of values that the value is compared against.
Returns
- SqlConditionNode
New negated SqlInConditionNode instance or SqlTrueNode instance.
NotInQuery(SqlExpressionNode, SqlQueryExpressionNode)
Creates a new negated SqlInQueryConditionNode instance.
[Pure]
public static SqlInQueryConditionNode NotInQuery(SqlExpressionNode value, SqlQueryExpressionNode query)
Parameters
value
SqlExpressionNodeValue to check.
query
SqlQueryExpressionNodeSub-query that the value is compared against.
Returns
- SqlInQueryConditionNode
New negated SqlInQueryConditionNode instance.
NotLike(SqlExpressionNode, SqlExpressionNode, SqlExpressionNode?)
Creates a new negated SqlLikeConditionNode instance.
[Pure]
public static SqlLikeConditionNode NotLike(SqlExpressionNode value, SqlExpressionNode pattern, SqlExpressionNode? escape = null)
Parameters
value
SqlExpressionNodeValue to check.
pattern
SqlExpressionNodeString pattern to check the value against.
escape
SqlExpressionNodeOptional escape character for the pattern. Equal to null by default.
Returns
- SqlLikeConditionNode
New negated SqlLikeConditionNode instance.
Null()
Creates a new SqlNullNode instance.
[Pure]
public static SqlNullNode Null()
Returns
- SqlNullNode
New SqlNullNode instance.
OffsetTrait(SqlExpressionNode)
Creates a new SqlOffsetTraitNode instance.
[Pure]
public static SqlOffsetTraitNode OffsetTrait(SqlExpressionNode value)
Parameters
value
SqlExpressionNodeUnderlying value.
Returns
- SqlOffsetTraitNode
New SqlOffsetTraitNode instance.
Or(SqlConditionNode, SqlConditionNode)
Creates a new SqlOrConditionNode instance.
[Pure]
public static SqlOrConditionNode Or(SqlConditionNode left, SqlConditionNode right)
Parameters
left
SqlConditionNodeFirst operand.
right
SqlConditionNodeSecond operand.
Returns
- SqlOrConditionNode
New SqlOrConditionNode instance.
OrderBy(SqlExpressionNode, OrderBy)
Creates a new SqlOrderByNode instance.
[Pure]
public static SqlOrderByNode OrderBy(SqlExpressionNode expression, OrderBy ordering)
Parameters
expression
SqlExpressionNodeUnderlying expression.
ordering
OrderByOrdering used by this definition.
Returns
- SqlOrderByNode
New SqlOrderByNode instance.
OrderByAsc(SqlExpressionNode)
Creates a new SqlOrderByNode instance with Asc ordering.
[Pure]
public static SqlOrderByNode OrderByAsc(SqlExpressionNode expression)
Parameters
expression
SqlExpressionNodeUnderlying expression.
Returns
- SqlOrderByNode
New SqlOrderByNode instance.
OrderByDesc(SqlExpressionNode)
Creates a new SqlOrderByNode instance with Desc ordering.
[Pure]
public static SqlOrderByNode OrderByDesc(SqlExpressionNode expression)
Parameters
expression
SqlExpressionNodeUnderlying expression.
Returns
- SqlOrderByNode
New SqlOrderByNode instance.
OrdinalCommonTableExpression(SqlQueryExpressionNode, string)
Creates a new SqlOrdinalCommonTableExpressionNode instance.
[Pure]
public static SqlOrdinalCommonTableExpressionNode OrdinalCommonTableExpression(SqlQueryExpressionNode query, string name)
Parameters
query
SqlQueryExpressionNodeUnderlying query that defines this common table expression.
name
stringName of this common table expression.
Returns
Parameter(string, TypeNullability?, int?)
Creates a new SqlParameterNode instance.
[Pure]
public static SqlParameterNode Parameter(string name, TypeNullability? type = null, int? index = null)
Parameters
name
stringParameter's name.
type
TypeNullability?Optional runtime type of this parameter. Equal to null by default.
index
int?Optional 0-based position of this parameter. Non-null values mean that the parameter may be interpreted as a positional parameter. Equal to null by default.
Returns
- SqlParameterNode
New SqlParameterNode instance.
ParameterRange(string, int, TypeNullability?, int?)
Creates a new collection of SqlParameterNode instances.
[Pure]
public static SqlParameterNode[] ParameterRange(string name, int count, TypeNullability? type = null, int? firstIndex = null)
Parameters
name
stringBase name of all parameters.
count
intNumber of parameters.
type
TypeNullability?Optional runtime type of all parameters. Equal to null by default.
firstIndex
int?Optional 0-based position of the first parameter. Non-null values mean that the parameter may be interpreted as a positional parameter. Equal to null by default.
Returns
- SqlParameterNode[]
New collection of SqlParameterNode instances.
Exceptions
- ArgumentOutOfRangeException
When
count
is less than 0.
ParameterRange<T>(string, int, bool, int?)
Creates a new collection of SqlParameterNode instances.
[Pure]
public static SqlParameterNode[] ParameterRange<T>(string name, int count, bool isNullable = false, int? firstIndex = null)
Parameters
name
stringBase name of all parameters.
count
intNumber of parameters.
isNullable
boolSpecifies whether or not all parameters should be nullable. Equal to false by default.
firstIndex
int?Optional 0-based position of the first parameter. Non-null values mean that the parameter may be interpreted as a positional parameter. Equal to null by default.
Returns
- SqlParameterNode[]
New collection of SqlParameterNode instances.
Type Parameters
T
Value type.
Exceptions
- ArgumentOutOfRangeException
When
count
is less than 0.
Parameter<T>(string, bool, int?)
Creates a new SqlParameterNode instance.
[Pure]
public static SqlParameterNode Parameter<T>(string name, bool isNullable = false, int? index = null)
Parameters
name
stringParameter's name.
isNullable
boolSpecifies whether or not this parameter should be nullable. Equal to false by default.
index
int?Optional 0-based position of this parameter. Non-null values mean that the parameter may be interpreted as a positional parameter. Equal to null by default.
Returns
- SqlParameterNode
New SqlParameterNode instance.
Type Parameters
T
Value type.
PrimaryKey(SqlSchemaObjectName, ReadOnlyArray<SqlOrderByNode>)
Creates a new SqlPrimaryKeyDefinitionNode instance.
[Pure]
public static SqlPrimaryKeyDefinitionNode PrimaryKey(SqlSchemaObjectName name, ReadOnlyArray<SqlOrderByNode> columns)
Parameters
name
SqlSchemaObjectNamePrimary key constraint's name.
columns
ReadOnlyArray<SqlOrderByNode>Collection of columns that define this primary key constraint.
Returns
- SqlPrimaryKeyDefinitionNode
New SqlPrimaryKeyDefinitionNode instance.
QueryRecordSet(SqlQueryExpressionNode, string)
Creates a new SqlQueryRecordSetNode instance.
[Pure]
public static SqlQueryRecordSetNode QueryRecordSet(SqlQueryExpressionNode query, string alias)
Parameters
query
SqlQueryExpressionNodeUnderlying SqlQueryExpressionNode instance.
alias
stringAlias of this record set.
Returns
- SqlQueryRecordSetNode
New SqlQueryRecordSetNode instance.
Query<TDataSourceNode>(TDataSourceNode, params SqlSelectNode[])
Creates a new SqlDataSourceQueryExpressionNode<TDataSourceNode> instance.
[Pure]
public static SqlDataSourceQueryExpressionNode<TDataSourceNode> Query<TDataSourceNode>(TDataSourceNode dataSource, params SqlSelectNode[] selection) where TDataSourceNode : SqlDataSourceNode
Parameters
dataSource
TDataSourceNodeUnderlying data source.
selection
SqlSelectNode[]Collection of expressions to include in this query's selection.
Returns
- SqlDataSourceQueryExpressionNode<TDataSourceNode>
New SqlDataSourceQueryExpressionNode<TDataSourceNode> instance.
Type Parameters
TDataSourceNode
SQL data source node type.
RangeWindowFrame(SqlWindowFrameBoundary, SqlWindowFrameBoundary)
Creates a new SqlWindowFrameNode instance with Range type.
[Pure]
public static SqlWindowFrameNode RangeWindowFrame(SqlWindowFrameBoundary start, SqlWindowFrameBoundary end)
Parameters
start
SqlWindowFrameBoundaryBeginning SqlWindowFrameBoundary of this frame.
end
SqlWindowFrameBoundaryEnding SqlWindowFrameBoundary of this frame.
Returns
- SqlWindowFrameNode
New SqlWindowFrameNode instance.
RawCondition(string, params SqlParameterNode[])
Creates a new SqlRawConditionNode instance.
[Pure]
public static SqlRawConditionNode RawCondition(string sql, params SqlParameterNode[] parameters)
Parameters
sql
stringRaw SQL condition.
parameters
SqlParameterNode[]Collection of parameter nodes.
Returns
- SqlRawConditionNode
New SqlRawConditionNode instance.
RawDataField(SqlRecordSetNode, string, TypeNullability?)
Creates a new SqlRawDataFieldNode instance.
[Pure]
public static SqlRawDataFieldNode RawDataField(SqlRecordSetNode recordSet, string name, TypeNullability? type = null)
Parameters
recordSet
SqlRecordSetNodeSqlRecordSetNode that this data field belongs to.
name
stringName of this data field.
type
TypeNullability?Optional runtime type of this data field. Equal to null by default.
Returns
- SqlRawDataFieldNode
New SqlRawDataFieldNode instance.
RawExpression(string, params SqlParameterNode[])
Creates a new SqlRawExpressionNode instance.
[Pure]
public static SqlRawExpressionNode RawExpression(string sql, params SqlParameterNode[] parameters)
Parameters
sql
stringRaw SQL expression.
parameters
SqlParameterNode[]Collection of parameter nodes.
Returns
- SqlRawExpressionNode
New SqlRawExpressionNode instance.
RawExpression(string, TypeNullability?, params SqlParameterNode[])
Creates a new SqlRawExpressionNode instance.
[Pure]
public static SqlRawExpressionNode RawExpression(string sql, TypeNullability? type, params SqlParameterNode[] parameters)
Parameters
sql
stringRaw SQL expression.
type
TypeNullability?Optional runtime type of the result of this expression.
parameters
SqlParameterNode[]Collection of parameter nodes.
Returns
- SqlRawExpressionNode
New SqlRawExpressionNode instance.
RawQuery(string, params SqlParameterNode[])
Creates a new SqlRawQueryExpressionNode instance.
[Pure]
public static SqlRawQueryExpressionNode RawQuery(string sql, params SqlParameterNode[] parameters)
Parameters
sql
stringRaw SQL query expression.
parameters
SqlParameterNode[]Collection of parameter nodes.
Returns
- SqlRawQueryExpressionNode
New SqlRawQueryExpressionNode instance.
RawRecordSet(SqlRecordSetInfo, string?)
Creates a new SqlRawRecordSetNode instance.
[Pure]
public static SqlRawRecordSetNode RawRecordSet(SqlRecordSetInfo info, string? alias = null)
Parameters
info
SqlRecordSetInfoSqlRecordSetInfo associated with this record set.
alias
stringOptional alias of this record set. Equal to null by default.
Returns
- SqlRawRecordSetNode
New SqlRawRecordSetNode instance.
RawRecordSet(string, string?)
Creates a new SqlRawRecordSetNode instance marked as raw.
[Pure]
public static SqlRawRecordSetNode RawRecordSet(string name, string? alias = null)
Parameters
name
stringRaw name of this record set.
alias
stringOptional alias of this record set. Equal to null by default.
Returns
- SqlRawRecordSetNode
New SqlRawRecordSetNode instance.
RawStatement(string, params SqlParameterNode[])
Creates a new SqlRawStatementNode instance.
[Pure]
public static SqlRawStatementNode RawStatement(string sql, params SqlParameterNode[] parameters)
Parameters
sql
stringRaw SQL statement.
parameters
SqlParameterNode[]Collection of parameter nodes.
Returns
- SqlRawStatementNode
New SqlRawStatementNode instance.
RecursiveCommonTableExpression(SqlCompoundQueryExpressionNode, string)
Creates a new SqlRecursiveCommonTableExpressionNode instance.
[Pure]
public static SqlRecursiveCommonTableExpressionNode RecursiveCommonTableExpression(SqlCompoundQueryExpressionNode query, string name)
Parameters
query
SqlCompoundQueryExpressionNodeUnderlying query that defines this common table expression.
name
stringName of this common table expression.
Returns
RenameColumn(SqlRecordSetInfo, string, string)
Creates a new SqlRenameColumnNode instance.
[Pure]
public static SqlRenameColumnNode RenameColumn(SqlRecordSetInfo table, string oldName, string newName)
Parameters
table
SqlRecordSetInfoSource table.
oldName
stringColumn's new name.
newName
stringColumn's new name.
Returns
- SqlRenameColumnNode
New SqlRenameColumnNode instance.
RenameTable(SqlRecordSetInfo, SqlSchemaObjectName)
Creates a new SqlRenameTableNode instance.
[Pure]
public static SqlRenameTableNode RenameTable(SqlRecordSetInfo info, SqlSchemaObjectName newName)
Parameters
info
SqlRecordSetInfoTable's old name.
newName
SqlSchemaObjectNameTable's new name.
Returns
- SqlRenameTableNode
New SqlRenameTableNode instance.
RightJoinOn(SqlRecordSetNode, SqlConditionNode)
Creates a new SqlDataSourceJoinOnNode instance with Right type.
[Pure]
public static SqlDataSourceJoinOnNode RightJoinOn(SqlRecordSetNode innerRecordSet, SqlConditionNode onExpression)
Parameters
innerRecordSet
SqlRecordSetNodeInner SqlRecordSetNode instance.
onExpression
SqlConditionNodeCondition of this join operation.
Returns
- SqlDataSourceJoinOnNode
New SqlDataSourceJoinOnNode instance.
RollbackTransaction()
Creates a new SqlRollbackTransactionNode instance.
[Pure]
public static SqlRollbackTransactionNode RollbackTransaction()
Returns
- SqlRollbackTransactionNode
New SqlRollbackTransactionNode instance.
RowsWindowFrame(SqlWindowFrameBoundary, SqlWindowFrameBoundary)
Creates a new SqlWindowFrameNode instance with Rows type.
[Pure]
public static SqlWindowFrameNode RowsWindowFrame(SqlWindowFrameBoundary start, SqlWindowFrameBoundary end)
Parameters
start
SqlWindowFrameBoundaryBeginning SqlWindowFrameBoundary of this frame.
end
SqlWindowFrameBoundaryEnding SqlWindowFrameBoundary of this frame.
Returns
- SqlWindowFrameNode
New SqlWindowFrameNode instance.
Select(SqlDataFieldNode, string?)
Creates a new SqlSelectFieldNode instance.
[Pure]
public static SqlSelectFieldNode Select(SqlDataFieldNode dataField, string? alias = null)
Parameters
dataField
SqlDataFieldNodeSelected data field.
alias
stringOptional alias of the selected expression. Equal to null by default.
Returns
- SqlSelectFieldNode
New SqlSelectFieldNode instance.
Select(SqlExpressionNode, string)
Creates a new SqlSelectFieldNode instance.
[Pure]
public static SqlSelectFieldNode Select(SqlExpressionNode expression, string alias)
Parameters
expression
SqlExpressionNodeSelected expression.
alias
stringAlias of the selected expression.
Returns
- SqlSelectFieldNode
New SqlSelectFieldNode instance.
SelectAll(SqlDataSourceNode)
Creates a new SqlSelectAllNode instance.
[Pure]
public static SqlSelectAllNode SelectAll(SqlDataSourceNode dataSource)
Parameters
dataSource
SqlDataSourceNodeData source to select all data fields from.
Returns
- SqlSelectAllNode
New SqlSelectAllNode instance.
SelectAll(SqlRecordSetNode)
Creates a new SqlSelectRecordSetNode instance.
[Pure]
public static SqlSelectRecordSetNode SelectAll(SqlRecordSetNode recordSet)
Parameters
recordSet
SqlRecordSetNodeSingle record set to select all data fields from.
Returns
- SqlSelectRecordSetNode
New SqlSelectRecordSetNode instance.
SelectExpression(SqlSelectNode)
Creates a new SqlSelectExpressionNode instance.
[Pure]
public static SqlSelectExpressionNode SelectExpression(SqlSelectNode selectNode)
Parameters
selectNode
SqlSelectNodeUnderlying selection.
Returns
- SqlSelectExpressionNode
New SqlSelectExpressionNode instance.
SingleDataSource<TRecordSetNode>(TRecordSetNode)
Creates a new SqlSingleDataSourceNode<TRecordSetNode> instance.
[Pure]
public static SqlSingleDataSourceNode<TRecordSetNode> SingleDataSource<TRecordSetNode>(TRecordSetNode from) where TRecordSetNode : SqlRecordSetNode
Parameters
from
TRecordSetNodeSqlRecordSetNode instance from which this data source's definition begins.
Returns
- SqlSingleDataSourceNode<TRecordSetNode>
New SqlSingleDataSourceNode<TRecordSetNode> instance.
Type Parameters
TRecordSetNode
SQL record set node type.
SortTrait(params SqlOrderByNode[])
Creates a new SqlSortTraitNode instance.
[Pure]
public static SqlSortTraitNode SortTrait(params SqlOrderByNode[] ordering)
Parameters
ordering
SqlOrderByNode[]Collection of ordering definitions.
Returns
- SqlSortTraitNode
New SqlSortTraitNode instance.
Subtract(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlSubtractExpressionNode instance.
[Pure]
public static SqlSubtractExpressionNode Subtract(SqlExpressionNode left, SqlExpressionNode right)
Parameters
left
SqlExpressionNodeFirst operand.
right
SqlExpressionNodeSecond operand.
Returns
- SqlSubtractExpressionNode
New SqlSubtractExpressionNode instance.
Switch(IEnumerable<SqlSwitchCaseNode>, SqlExpressionNode)
Creates a new SqlSwitchExpressionNode instance.
[Pure]
public static SqlSwitchExpressionNode Switch(IEnumerable<SqlSwitchCaseNode> cases, SqlExpressionNode defaultExpression)
Parameters
cases
IEnumerable<SqlSwitchCaseNode>Collection of cases.
defaultExpression
SqlExpressionNodeDefault expression.
Returns
- SqlSwitchExpressionNode
New SqlSwitchExpressionNode instance.
SwitchCase(SqlConditionNode, SqlExpressionNode)
Creates a new SqlSwitchCaseNode instance.
[Pure]
public static SqlSwitchCaseNode SwitchCase(SqlConditionNode condition, SqlExpressionNode expression)
Parameters
condition
SqlConditionNodeUnderlying condition.
expression
SqlExpressionNodeUnderlying expression.
Returns
- SqlSwitchCaseNode
New SqlSwitchCaseNode instance.
Table(ISqlTableBuilder, string?)
Creates a new SqlTableBuilderNode instance.
[Pure]
public static SqlTableBuilderNode Table(ISqlTableBuilder value, string? alias = null)
Parameters
value
ISqlTableBuilderUnderlying ISqlTableBuilder instance.
alias
stringOptional alias of this record set. Equal to null by default.
Returns
- SqlTableBuilderNode
New SqlTableBuilderNode instance.
Table(ISqlTable, string?)
Creates a new SqlTableNode instance.
[Pure]
public static SqlTableNode Table(ISqlTable value, string? alias = null)
Parameters
value
ISqlTableUnderlying ISqlTable instance.
alias
stringOptional alias of this record set. Equal to null by default.
Returns
- SqlTableNode
New SqlTableNode instance.
True()
Creates a new SqlTrueNode instance.
[Pure]
public static SqlTrueNode True()
Returns
- SqlTrueNode
New SqlTrueNode instance.
Truncate(SqlRecordSetNode)
Creates a new SqlTruncateNode instance.
[Pure]
public static SqlTruncateNode Truncate(SqlRecordSetNode table)
Parameters
table
SqlRecordSetNodeTable to truncate.
Returns
- SqlTruncateNode
New SqlTruncateNode instance.
TypeCast(SqlExpressionNode, ISqlColumnTypeDefinition)
Creates a new SqlTypeCastExpressionNode instance.
[Pure]
public static SqlTypeCastExpressionNode TypeCast(SqlExpressionNode expression, ISqlColumnTypeDefinition typeDefinition)
Parameters
expression
SqlExpressionNodeUnderlying value to cast to a different type.
typeDefinition
ISqlColumnTypeDefinitionISqlColumnTypeDefinition instance that defines the target type.
Returns
- SqlTypeCastExpressionNode
New SqlTypeCastExpressionNode instance.
TypeCast(SqlExpressionNode, Type)
Creates a new SqlTypeCastExpressionNode instance.
[Pure]
public static SqlTypeCastExpressionNode TypeCast(SqlExpressionNode expression, Type type)
Parameters
expression
SqlExpressionNodeUnderlying value to cast to a different type.
type
TypeTarget runtime type.
Returns
- SqlTypeCastExpressionNode
New SqlTypeCastExpressionNode instance.
UnionAllWith(SqlQueryExpressionNode)
Creates a new SqlCompoundQueryComponentNode instance with UnionAll operator.
[Pure]
public static SqlCompoundQueryComponentNode UnionAllWith(SqlQueryExpressionNode query)
Parameters
query
SqlQueryExpressionNodeUnderlying query.
Returns
- SqlCompoundQueryComponentNode
New SqlCompoundQueryComponentNode instance.
UnionWith(SqlQueryExpressionNode)
Creates a new SqlCompoundQueryComponentNode instance with Union operator.
[Pure]
public static SqlCompoundQueryComponentNode UnionWith(SqlQueryExpressionNode query)
Parameters
query
SqlQueryExpressionNodeUnderlying query.
Returns
- SqlCompoundQueryComponentNode
New SqlCompoundQueryComponentNode instance.
Update(SqlDataSourceNode, params SqlValueAssignmentNode[])
Creates a new SqlUpdateNode instance.
[Pure]
public static SqlUpdateNode Update(SqlDataSourceNode dataSource, params SqlValueAssignmentNode[] assignments)
Parameters
dataSource
SqlDataSourceNodeData source that defines records to be updated.
assignments
SqlValueAssignmentNode[]Collection of value assignments that this update refers to.
Returns
- SqlUpdateNode
New SqlUpdateNode instance.
Upsert(SqlQueryExpressionNode, SqlRecordSetNode, ReadOnlyArray<SqlDataFieldNode>, Func<SqlRecordSetNode, SqlInternalRecordSetNode, IEnumerable<SqlValueAssignmentNode>>, ReadOnlyArray<SqlDataFieldNode>?)
Creates a new SqlUpsertNode instance.
[Pure]
public static SqlUpsertNode Upsert(SqlQueryExpressionNode query, SqlRecordSetNode recordSet, ReadOnlyArray<SqlDataFieldNode> insertDataFields, Func<SqlRecordSetNode, SqlInternalRecordSetNode, IEnumerable<SqlValueAssignmentNode>> updateAssignments, ReadOnlyArray<SqlDataFieldNode>? conflictTarget = null)
Parameters
query
SqlQueryExpressionNodeSqlQueryExpressionNode source of records to be inserted or updated.
recordSet
SqlRecordSetNodeTable to upsert into.
insertDataFields
ReadOnlyArray<SqlDataFieldNode>Collection of record set data fields that the insertion part of this upsert refers to.
updateAssignments
Func<SqlRecordSetNode, SqlInternalRecordSetNode, IEnumerable<SqlValueAssignmentNode>>Provider of a collection of value assignments that the update part of this upsert refers to. The first parameter is the table to upsert into and the second parameter is the UpdateSource of the created upsert node.
conflictTarget
ReadOnlyArray<SqlDataFieldNode>?Optional collection of data fields from the table that define the insertion conflict target. Empty conflict target may cause the table's primary key to be used instead. Equal to null by default.
Returns
- SqlUpsertNode
New SqlUpsertNode instance.
Upsert(SqlValuesNode, SqlRecordSetNode, ReadOnlyArray<SqlDataFieldNode>, Func<SqlRecordSetNode, SqlInternalRecordSetNode, IEnumerable<SqlValueAssignmentNode>>, ReadOnlyArray<SqlDataFieldNode>?)
Creates a new SqlUpsertNode instance.
[Pure]
public static SqlUpsertNode Upsert(SqlValuesNode values, SqlRecordSetNode recordSet, ReadOnlyArray<SqlDataFieldNode> insertDataFields, Func<SqlRecordSetNode, SqlInternalRecordSetNode, IEnumerable<SqlValueAssignmentNode>> updateAssignments, ReadOnlyArray<SqlDataFieldNode>? conflictTarget = null)
Parameters
values
SqlValuesNodeSqlValuesNode source of records to be inserted or updated.
recordSet
SqlRecordSetNodeTable to upsert into.
insertDataFields
ReadOnlyArray<SqlDataFieldNode>Collection of record set data fields that the insertion part of this upsert refers to.
updateAssignments
Func<SqlRecordSetNode, SqlInternalRecordSetNode, IEnumerable<SqlValueAssignmentNode>>Provider of a collection of value assignments that the update part of this upsert refers to. The first parameter is the table to upsert into and the second parameter is the UpdateSource of the created upsert node.
conflictTarget
ReadOnlyArray<SqlDataFieldNode>?Optional collection of data fields from the table that define the insertion conflict target. Empty conflict target may cause the table's primary key to be used instead. Equal to null by default.
Returns
- SqlUpsertNode
New SqlUpsertNode instance.
Value(SqlConditionNode)
Creates a new SqlConditionValueNode instance.
[Pure]
public static SqlConditionValueNode Value(SqlConditionNode condition)
Parameters
condition
SqlConditionNodeUnderlying condition.
Returns
- SqlConditionValueNode
New SqlConditionValueNode instance.
ValueAssignment(SqlDataFieldNode, SqlExpressionNode)
Creates a new SqlValueAssignmentNode instance.
[Pure]
public static SqlValueAssignmentNode ValueAssignment(SqlDataFieldNode dataField, SqlExpressionNode value)
Parameters
dataField
SqlDataFieldNodeData field to assign value to.
value
SqlExpressionNodeValue to assign.
Returns
- SqlValueAssignmentNode
New SqlValueAssignmentNode instance.
Values(SqlExpressionNode[,])
Creates a new SqlValuesNode instance from a 2-dimensional collection of values.
[Pure]
public static SqlValuesNode Values(SqlExpressionNode[,] expressions)
Parameters
expressions
SqlExpressionNode[,]2-dimensional collection of values.
Returns
- SqlValuesNode
New SqlValuesNode instance.
Values(params SqlExpressionNode[])
Creates a new SqlValuesNode instance from a 1-dimensional collection of values.
[Pure]
public static SqlValuesNode Values(params SqlExpressionNode[] expressions)
Parameters
expressions
SqlExpressionNode[]1-dimensional collection of values.
Returns
- SqlValuesNode
New SqlValuesNode instance.
View(ISqlViewBuilder, string?)
Creates a new SqlViewBuilderNode instance.
[Pure]
public static SqlViewBuilderNode View(ISqlViewBuilder value, string? alias = null)
Parameters
value
ISqlViewBuilderUnderlying ISqlViewBuilder instance.
alias
stringOptional alias of this record set. Equal to null by default.
Returns
- SqlViewBuilderNode
New SqlViewBuilderNode instance.
View(ISqlView, string?)
Creates a new SqlViewNode instance.
[Pure]
public static SqlViewNode View(ISqlView value, string? alias = null)
Parameters
value
ISqlViewUnderlying ISqlView instance.
alias
stringOptional alias of this record set. Equal to null by default.
Returns
- SqlViewNode
New SqlViewNode instance.
WindowDefinition(string, SqlExpressionNode[], SqlOrderByNode[], SqlWindowFrameNode?)
Creates a new SqlWindowDefinitionNode instance.
[Pure]
public static SqlWindowDefinitionNode WindowDefinition(string name, SqlExpressionNode[] partitioning, SqlOrderByNode[] ordering, SqlWindowFrameNode? frame = null)
Parameters
name
stringWindow's name.
partitioning
SqlExpressionNode[]Collection of expressions by which this window partitions the result set.
ordering
SqlOrderByNode[]Collection of ordering expressions used by this window.
frame
SqlWindowFrameNodeOptional SqlWindowFrameNode instance that defines the frame of this window. Equal to null by default.
Returns
- SqlWindowDefinitionNode
New SqlWindowDefinitionNode instance.
WindowDefinition(string, SqlOrderByNode[], SqlWindowFrameNode?)
Creates a new SqlWindowDefinitionNode instance.
[Pure]
public static SqlWindowDefinitionNode WindowDefinition(string name, SqlOrderByNode[] ordering, SqlWindowFrameNode? frame = null)
Parameters
name
stringWindow's name.
ordering
SqlOrderByNode[]Collection of ordering expressions used by this window.
frame
SqlWindowFrameNodeOptional SqlWindowFrameNode instance that defines the frame of this window. Equal to null by default.
Returns
- SqlWindowDefinitionNode
New SqlWindowDefinitionNode instance.
WindowDefinitionTrait(params SqlWindowDefinitionNode[])
Creates a new SqlWindowDefinitionTraitNode instance.
[Pure]
public static SqlWindowDefinitionTraitNode WindowDefinitionTrait(params SqlWindowDefinitionNode[] windows)
Parameters
windows
SqlWindowDefinitionNode[]Collection of window definitions.
Returns
- SqlWindowDefinitionTraitNode
New SqlWindowDefinitionTraitNode instance.
WindowTrait(SqlWindowDefinitionNode)
Creates a new SqlWindowTraitNode instance.
[Pure]
public static SqlWindowTraitNode WindowTrait(SqlWindowDefinitionNode definition)
Parameters
definition
SqlWindowDefinitionNodeUnderlying window definition.
Returns
- SqlWindowTraitNode
New SqlWindowTraitNode instance.