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
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
- SqlAddExpressionNode
New SqlAddExpressionNode instance.
AddColumn(SqlRecordSetInfo, SqlColumnDefinitionNode)
Creates a new SqlAddColumnNode instance.
[Pure]
public static SqlAddColumnNode AddColumn(SqlRecordSetInfo table, SqlColumnDefinitionNode definition)
Parameters
tableSqlRecordSetInfoSource table.
definitionSqlColumnDefinitionNodeDefinition 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
filterSqlConditionNodeUnderlying predicate.
isConjunctionboolSpecifies 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
expressionsSqlExpressionNode[]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
leftSqlConditionNodeFirst operand.
rightSqlConditionNodeSecond operand.
Returns
- SqlAndConditionNode
New SqlAndConditionNode instance.
Batch(params ISqlStatementNode[])
Creates a new SqlStatementBatchNode instance.
[Pure]
public static SqlStatementBatchNode Batch(params ISqlStatementNode[] statements)
Parameters
statementsISqlStatementNode[]Collection of SQL statements.
Returns
- SqlStatementBatchNode
New SqlStatementBatchNode instance.
BeginTransaction(IsolationLevel)
Creates a new SqlBeginTransactionNode instance.
[Pure]
public static SqlBeginTransactionNode BeginTransaction(IsolationLevel isolationLevel)
Parameters
isolationLevelIsolationLevelTransaction'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
valueSqlExpressionNodeValue to check.
minSqlExpressionNodeMinimum acceptable value.
maxSqlExpressionNodeMaximum 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
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
- SqlBitwiseAndExpressionNode
New SqlBitwiseAndExpressionNode instance.
BitwiseLeftShift(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlBitwiseLeftShiftExpressionNode instance.
[Pure]
public static SqlBitwiseLeftShiftExpressionNode BitwiseLeftShift(SqlExpressionNode left, SqlExpressionNode right)
Parameters
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
BitwiseNot(SqlExpressionNode)
Creates a new SqlBitwiseNotExpressionNode instance.
[Pure]
public static SqlBitwiseNotExpressionNode BitwiseNot(SqlExpressionNode value)
Parameters
valueSqlExpressionNodeOperand.
Returns
- SqlBitwiseNotExpressionNode
New SqlBitwiseNotExpressionNode instance.
BitwiseOr(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlBitwiseOrExpressionNode instance.
[Pure]
public static SqlBitwiseOrExpressionNode BitwiseOr(SqlExpressionNode left, SqlExpressionNode right)
Parameters
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
- SqlBitwiseOrExpressionNode
New SqlBitwiseOrExpressionNode instance.
BitwiseRightShift(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlBitwiseRightShiftExpressionNode instance.
[Pure]
public static SqlBitwiseRightShiftExpressionNode BitwiseRightShift(SqlExpressionNode left, SqlExpressionNode right)
Parameters
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
BitwiseXor(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlBitwiseXorExpressionNode instance.
[Pure]
public static SqlBitwiseXorExpressionNode BitwiseXor(SqlExpressionNode left, SqlExpressionNode right)
Parameters
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
- SqlBitwiseXorExpressionNode
New SqlBitwiseXorExpressionNode instance.
Check(SqlSchemaObjectName, SqlConditionNode)
Creates a new SqlCheckDefinitionNode instance.
[Pure]
public static SqlCheckDefinitionNode Check(SqlSchemaObjectName name, SqlConditionNode condition)
Parameters
nameSqlSchemaObjectNameCheck constraint's name.
conditionSqlConditionNodeCheck 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
namestringColumn's name.
typeDefinitionISqlColumnTypeDefinitionISqlColumnTypeDefinition instance that defines this column's type.
isNullableboolSpecifies whether or not this column should be nullable. Equal to false by default.
defaultValueSqlExpressionNodeColumn's optional default value. Equal to null by default.
computationSqlColumnComputation?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
namestringColumn's name.
typeTypeNullabilityColumn's runtime type.
defaultValueSqlExpressionNodeColumn's optional default value. Equal to null by default.
computationSqlColumnComputation?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
namestringColumn's name.
isNullableboolSpecifies whether or not this column should be nullable. Equal to false by default.
defaultValueSqlExpressionNodeColumn's optional default value. Equal to null by default.
computationSqlColumnComputation?Column's optional computation. Equal to null by default.
Returns
- SqlColumnDefinitionNode
New SqlColumnDefinitionNode instance.
Type Parameters
TColumn'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
commonTableExpressionsSqlCommonTableExpressionNode[]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
firstQuerySqlQueryExpressionNodeFirst underlying query.
followingQueriesSqlCompoundQueryComponentNode[]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
operatorSqlCompoundQueryOperatorCompound query operator with which this query should be included.
querySqlQueryExpressionNodeUnderlying query.
Returns
- SqlCompoundQueryComponentNode
New SqlCompoundQueryComponentNode instance.
Concat(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlConcatExpressionNode instance.
[Pure]
public static SqlConcatExpressionNode Concat(SqlExpressionNode left, SqlExpressionNode right)
Parameters
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond 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
nameSqlSchemaObjectNameIndex's name.
isUniqueboolSpecifies whether or not this index is unique.
tableSqlRecordSetNodeTable on which this index is created.
columnsReadOnlyArray<SqlOrderByNode>Collection of expressions that define this index.
replaceIfExistsboolSpecifies whether or not the index should be replaced if it already exists in DB. Equal to false by default.
filterSqlConditionNodeOptional 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
infoSqlRecordSetInfoTable's name.
columnsSqlColumnDefinitionNode[]Collection of columns.
ifNotExistsboolSpecifies whether or not this table should only be created if it does not already exist in DB. Equal to false by default.
constraintsProviderFunc<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
infoSqlRecordSetInfoView's name.
sourceSqlQueryExpressionNodeUnderlying source query expression that defines this view.
replaceIfExistsboolSpecifies 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
innerRecordSetSqlRecordSetNodeInner SqlRecordSetNode instance.
Returns
- SqlDataSourceJoinOnNode
New SqlDataSourceJoinOnNode instance.
DeleteFrom(SqlDataSourceNode)
Creates a new SqlDeleteFromNode instance.
[Pure]
public static SqlDeleteFromNode DeleteFrom(SqlDataSourceNode dataSource)
Parameters
dataSourceSqlDataSourceNodeData 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
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
- SqlDivideExpressionNode
New SqlDivideExpressionNode instance.
DropColumn(SqlRecordSetInfo, string)
Creates a new SqlDropColumnNode instance.
[Pure]
public static SqlDropColumnNode DropColumn(SqlRecordSetInfo table, string name)
Parameters
tableSqlRecordSetInfoSource table.
namestringColumn'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
tableSqlRecordSetInfoSource table.
nameSqlSchemaObjectNameIndex's name.
ifExistsboolSpecifies 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
tableSqlRecordSetInfoTable's name.
ifExistsboolSpecifies 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
viewSqlRecordSetInfoView's name.
ifExistsboolSpecifies 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
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
- SqlEqualToConditionNode
New SqlEqualToConditionNode instance.
ExceptWith(SqlQueryExpressionNode)
Creates a new SqlCompoundQueryComponentNode instance with Except operator.
[Pure]
public static SqlCompoundQueryComponentNode ExceptWith(SqlQueryExpressionNode query)
Parameters
querySqlQueryExpressionNodeUnderlying query.
Returns
- SqlCompoundQueryComponentNode
New SqlCompoundQueryComponentNode instance.
Exists(SqlQueryExpressionNode)
Creates a new SqlExistsConditionNode instance.
[Pure]
public static SqlExistsConditionNode Exists(SqlQueryExpressionNode query)
Parameters
querySqlQueryExpressionNodeSub-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
filterSqlConditionNodeUnderlying predicate.
isConjunctionboolSpecifies 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
nameSqlSchemaObjectNameForeign key constraint's name.
columnsSqlDataFieldNode[]Collection of columns from source table that this foreign key originates from.
referencedTableSqlRecordSetNodeTable referenced by this foreign key constraint.
referencedColumnsSqlDataFieldNode[]Collection of columns from referenced table referenced by this foreign key constraint.
onDeleteBehaviorReferenceBehaviorSpecifies this foreign key constraint's on delete behavior. Equal to Restrict by default.
onUpdateBehaviorReferenceBehaviorSpecifies 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
innerRecordSetSqlRecordSetNodeInner SqlRecordSetNode instance.
onExpressionSqlConditionNodeCondition 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
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
- SqlGreaterThanConditionNode
New SqlGreaterThanConditionNode instance.
GreaterThanOrEqualTo(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlGreaterThanOrEqualToConditionNode instance.
[Pure]
public static SqlGreaterThanOrEqualToConditionNode GreaterThanOrEqualTo(SqlExpressionNode left, SqlExpressionNode right)
Parameters
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
Iif(SqlConditionNode, SqlExpressionNode, SqlExpressionNode)
Creates a new SqlSwitchExpressionNode instance.
[Pure]
public static SqlSwitchExpressionNode Iif(SqlConditionNode condition, SqlExpressionNode whenTrue, SqlExpressionNode whenFalse)
Parameters
conditionSqlConditionNodeUnderlying condition.
whenTrueSqlExpressionNodeExpression to be returned when the condition returns true.
whenFalseSqlExpressionNodeExpression 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
valueSqlExpressionNodeValue to check.
expressionsSqlExpressionNode[]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
valueSqlExpressionNodeValue to check.
querySqlQueryExpressionNodeSub-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
innerRecordSetSqlRecordSetNodeInner SqlRecordSetNode instance.
onExpressionSqlConditionNodeCondition 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
querySqlQueryExpressionNodeSqlQueryExpressionNode source of records to be inserted.
recordSetSqlRecordSetNodeTable to insert into.
dataFieldsSqlDataFieldNode[]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
valuesSqlValuesNodeSqlValuesNode source of records to be inserted.
recordSetSqlRecordSetNodeTable to insert into.
dataFieldsSqlDataFieldNode[]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
querySqlQueryExpressionNodeUnderlying 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
fromSqlDataSourceNodeSqlDataSourceNode instance from which this data source's definition begins.
joinsSqlDataSourceJoinOnNode[]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
fromSqlDataSourceNodeSqlDataSourceNode instance from which this data source's definition begins.
definitionsSqlJoinDefinition[]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
fromSqlRecordSetNodeFirst SqlRecordSetNode instance from which this data source's definition begins.
joinsSqlDataSourceJoinOnNode[]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
fromSqlRecordSetNodeFirst SqlRecordSetNode instance from which this data source's definition begins.
definitionsSqlJoinDefinition[]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
innerRecordSetSqlRecordSetNodeInner SqlRecordSetNode instance.
onExpressionSqlConditionNodeCondition 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
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
- SqlLessThanConditionNode
New SqlLessThanConditionNode instance.
LessThanOrEqualTo(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlLessThanOrEqualToConditionNode instance.
[Pure]
public static SqlLessThanOrEqualToConditionNode LessThanOrEqualTo(SqlExpressionNode left, SqlExpressionNode right)
Parameters
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
Like(SqlExpressionNode, SqlExpressionNode, SqlExpressionNode?)
Creates a new SqlLikeConditionNode instance.
[Pure]
public static SqlLikeConditionNode Like(SqlExpressionNode value, SqlExpressionNode pattern, SqlExpressionNode? escape = null)
Parameters
valueSqlExpressionNodeValue to check.
patternSqlExpressionNodeString pattern to check the value against.
escapeSqlExpressionNodeOptional 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
valueSqlExpressionNodeUnderlying 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
valueT?Underlying value.
Returns
- SqlExpressionNode
New SqlLiteralNode<T> instance or SqlNullNode instance.
Type Parameters
TValue 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
valueTUnderlying value.
Returns
- SqlExpressionNode
New SqlLiteralNode<T> instance or SqlNullNode instance.
Type Parameters
TValue type.
Modulo(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlModuloExpressionNode instance.
[Pure]
public static SqlModuloExpressionNode Modulo(SqlExpressionNode left, SqlExpressionNode right)
Parameters
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
- SqlModuloExpressionNode
New SqlModuloExpressionNode instance.
Multiply(SqlExpressionNode, SqlExpressionNode)
Creates a new SqlMultiplyExpressionNode instance.
[Pure]
public static SqlMultiplyExpressionNode Multiply(SqlExpressionNode left, SqlExpressionNode right)
Parameters
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
- SqlMultiplyExpressionNode
New SqlMultiplyExpressionNode instance.
NamedFunctionRecordSet(SqlNamedFunctionExpressionNode, string)
Creates a new SqlNamedFunctionRecordSetNode instance.
[Pure]
public static SqlNamedFunctionRecordSetNode NamedFunctionRecordSet(SqlNamedFunctionExpressionNode function, string alias)
Parameters
functionSqlNamedFunctionExpressionNodeUnderlying SqlNamedFunctionExpressionNode instance.
aliasstringAlias of this record set.
Returns
- SqlNamedFunctionRecordSetNode
New SqlNamedFunctionRecordSetNode instance.
Negate(SqlExpressionNode)
Creates a new SqlNegateExpressionNode instance.
[Pure]
public static SqlNegateExpressionNode Negate(SqlExpressionNode value)
Parameters
valueSqlExpressionNodeOperand.
Returns
- SqlNegateExpressionNode
New SqlNegateExpressionNode instance.
NewTableRecordSet(SqlCreateTableNode, string?)
Creates a new SqlNewTableNode instance.
[Pure]
public static SqlNewTableNode NewTableRecordSet(SqlCreateTableNode creationNode, string? alias = null)
Parameters
creationNodeSqlCreateTableNodeUnderlying SqlCreateTableNode instance.
aliasstringOptional 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
creationNodeSqlCreateViewNodeUnderlying SqlCreateViewNode instance.
aliasstringOptional 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
valueSqlExpressionNodeValue to check.
minSqlExpressionNodeMinimum acceptable value.
maxSqlExpressionNodeMaximum 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
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond operand.
Returns
- SqlNotEqualToConditionNode
New SqlNotEqualToConditionNode instance.
NotExists(SqlQueryExpressionNode)
Creates a new negated SqlExistsConditionNode instance.
[Pure]
public static SqlExistsConditionNode NotExists(SqlQueryExpressionNode query)
Parameters
querySqlQueryExpressionNodeSub-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
valueSqlExpressionNodeValue to check.
expressionsSqlExpressionNode[]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
valueSqlExpressionNodeValue to check.
querySqlQueryExpressionNodeSub-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
valueSqlExpressionNodeValue to check.
patternSqlExpressionNodeString pattern to check the value against.
escapeSqlExpressionNodeOptional 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
valueSqlExpressionNodeUnderlying value.
Returns
- SqlOffsetTraitNode
New SqlOffsetTraitNode instance.
Or(SqlConditionNode, SqlConditionNode)
Creates a new SqlOrConditionNode instance.
[Pure]
public static SqlOrConditionNode Or(SqlConditionNode left, SqlConditionNode right)
Parameters
leftSqlConditionNodeFirst operand.
rightSqlConditionNodeSecond operand.
Returns
- SqlOrConditionNode
New SqlOrConditionNode instance.
OrderBy(SqlExpressionNode, OrderBy)
Creates a new SqlOrderByNode instance.
[Pure]
public static SqlOrderByNode OrderBy(SqlExpressionNode expression, OrderBy ordering)
Parameters
expressionSqlExpressionNodeUnderlying expression.
orderingOrderByOrdering 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
expressionSqlExpressionNodeUnderlying expression.
Returns
- SqlOrderByNode
New SqlOrderByNode instance.
OrderByDesc(SqlExpressionNode)
Creates a new SqlOrderByNode instance with Desc ordering.
[Pure]
public static SqlOrderByNode OrderByDesc(SqlExpressionNode expression)
Parameters
expressionSqlExpressionNodeUnderlying expression.
Returns
- SqlOrderByNode
New SqlOrderByNode instance.
OrdinalCommonTableExpression(SqlQueryExpressionNode, string)
Creates a new SqlOrdinalCommonTableExpressionNode instance.
[Pure]
public static SqlOrdinalCommonTableExpressionNode OrdinalCommonTableExpression(SqlQueryExpressionNode query, string name)
Parameters
querySqlQueryExpressionNodeUnderlying query that defines this common table expression.
namestringName 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
namestringParameter's name.
typeTypeNullability?Optional runtime type of this parameter. Equal to null by default.
indexint?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
namestringBase name of all parameters.
countintNumber of parameters.
typeTypeNullability?Optional runtime type of all parameters. Equal to null by default.
firstIndexint?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
countis 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
namestringBase name of all parameters.
countintNumber of parameters.
isNullableboolSpecifies whether or not all parameters should be nullable. Equal to false by default.
firstIndexint?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
TValue type.
Exceptions
- ArgumentOutOfRangeException
When
countis 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
namestringParameter's name.
isNullableboolSpecifies whether or not this parameter should be nullable. Equal to false by default.
indexint?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
TValue type.
PrimaryKey(SqlSchemaObjectName, ReadOnlyArray<SqlOrderByNode>)
Creates a new SqlPrimaryKeyDefinitionNode instance.
[Pure]
public static SqlPrimaryKeyDefinitionNode PrimaryKey(SqlSchemaObjectName name, ReadOnlyArray<SqlOrderByNode> columns)
Parameters
nameSqlSchemaObjectNamePrimary key constraint's name.
columnsReadOnlyArray<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
querySqlQueryExpressionNodeUnderlying SqlQueryExpressionNode instance.
aliasstringAlias 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
dataSourceTDataSourceNodeUnderlying data source.
selectionSqlSelectNode[]Collection of expressions to include in this query's selection.
Returns
- SqlDataSourceQueryExpressionNode<TDataSourceNode>
New SqlDataSourceQueryExpressionNode<TDataSourceNode> instance.
Type Parameters
TDataSourceNodeSQL 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
startSqlWindowFrameBoundaryBeginning SqlWindowFrameBoundary of this frame.
endSqlWindowFrameBoundaryEnding 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
sqlstringRaw SQL condition.
parametersSqlParameterNode[]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
recordSetSqlRecordSetNodeSqlRecordSetNode that this data field belongs to.
namestringName of this data field.
typeTypeNullability?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
sqlstringRaw SQL expression.
parametersSqlParameterNode[]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
sqlstringRaw SQL expression.
typeTypeNullability?Optional runtime type of the result of this expression.
parametersSqlParameterNode[]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
sqlstringRaw SQL query expression.
parametersSqlParameterNode[]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
infoSqlRecordSetInfoSqlRecordSetInfo associated with this record set.
aliasstringOptional 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
namestringRaw name of this record set.
aliasstringOptional 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
sqlstringRaw SQL statement.
parametersSqlParameterNode[]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
querySqlCompoundQueryExpressionNodeUnderlying query that defines this common table expression.
namestringName 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
tableSqlRecordSetInfoSource table.
oldNamestringColumn's new name.
newNamestringColumn'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
infoSqlRecordSetInfoTable's old name.
newNameSqlSchemaObjectNameTable'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
innerRecordSetSqlRecordSetNodeInner SqlRecordSetNode instance.
onExpressionSqlConditionNodeCondition 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
startSqlWindowFrameBoundaryBeginning SqlWindowFrameBoundary of this frame.
endSqlWindowFrameBoundaryEnding 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
dataFieldSqlDataFieldNodeSelected data field.
aliasstringOptional 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
expressionSqlExpressionNodeSelected expression.
aliasstringAlias of the selected expression.
Returns
- SqlSelectFieldNode
New SqlSelectFieldNode instance.
SelectAll(SqlDataSourceNode)
Creates a new SqlSelectAllNode instance.
[Pure]
public static SqlSelectAllNode SelectAll(SqlDataSourceNode dataSource)
Parameters
dataSourceSqlDataSourceNodeData 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
recordSetSqlRecordSetNodeSingle 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
selectNodeSqlSelectNodeUnderlying 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
fromTRecordSetNodeSqlRecordSetNode instance from which this data source's definition begins.
Returns
- SqlSingleDataSourceNode<TRecordSetNode>
New SqlSingleDataSourceNode<TRecordSetNode> instance.
Type Parameters
TRecordSetNodeSQL record set node type.
SortTrait(params SqlOrderByNode[])
Creates a new SqlSortTraitNode instance.
[Pure]
public static SqlSortTraitNode SortTrait(params SqlOrderByNode[] ordering)
Parameters
orderingSqlOrderByNode[]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
leftSqlExpressionNodeFirst operand.
rightSqlExpressionNodeSecond 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
casesIEnumerable<SqlSwitchCaseNode>Collection of cases.
defaultExpressionSqlExpressionNodeDefault expression.
Returns
- SqlSwitchExpressionNode
New SqlSwitchExpressionNode instance.
SwitchCase(SqlConditionNode, SqlExpressionNode)
Creates a new SqlSwitchCaseNode instance.
[Pure]
public static SqlSwitchCaseNode SwitchCase(SqlConditionNode condition, SqlExpressionNode expression)
Parameters
conditionSqlConditionNodeUnderlying condition.
expressionSqlExpressionNodeUnderlying 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
valueISqlTableBuilderUnderlying ISqlTableBuilder instance.
aliasstringOptional 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
valueISqlTableUnderlying ISqlTable instance.
aliasstringOptional 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
tableSqlRecordSetNodeTable 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
expressionSqlExpressionNodeUnderlying value to cast to a different type.
typeDefinitionISqlColumnTypeDefinitionISqlColumnTypeDefinition 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
expressionSqlExpressionNodeUnderlying value to cast to a different type.
typeTypeTarget 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
querySqlQueryExpressionNodeUnderlying query.
Returns
- SqlCompoundQueryComponentNode
New SqlCompoundQueryComponentNode instance.
UnionWith(SqlQueryExpressionNode)
Creates a new SqlCompoundQueryComponentNode instance with Union operator.
[Pure]
public static SqlCompoundQueryComponentNode UnionWith(SqlQueryExpressionNode query)
Parameters
querySqlQueryExpressionNodeUnderlying 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
dataSourceSqlDataSourceNodeData source that defines records to be updated.
assignmentsSqlValueAssignmentNode[]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
querySqlQueryExpressionNodeSqlQueryExpressionNode source of records to be inserted or updated.
recordSetSqlRecordSetNodeTable to upsert into.
insertDataFieldsReadOnlyArray<SqlDataFieldNode>Collection of record set data fields that the insertion part of this upsert refers to.
updateAssignmentsFunc<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.
conflictTargetReadOnlyArray<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
valuesSqlValuesNodeSqlValuesNode source of records to be inserted or updated.
recordSetSqlRecordSetNodeTable to upsert into.
insertDataFieldsReadOnlyArray<SqlDataFieldNode>Collection of record set data fields that the insertion part of this upsert refers to.
updateAssignmentsFunc<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.
conflictTargetReadOnlyArray<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
conditionSqlConditionNodeUnderlying condition.
Returns
- SqlConditionValueNode
New SqlConditionValueNode instance.
ValueAssignment(SqlDataFieldNode, SqlExpressionNode)
Creates a new SqlValueAssignmentNode instance.
[Pure]
public static SqlValueAssignmentNode ValueAssignment(SqlDataFieldNode dataField, SqlExpressionNode value)
Parameters
dataFieldSqlDataFieldNodeData field to assign value to.
valueSqlExpressionNodeValue 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
expressionsSqlExpressionNode[,]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
expressionsSqlExpressionNode[]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
valueISqlViewBuilderUnderlying ISqlViewBuilder instance.
aliasstringOptional 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
valueISqlViewUnderlying ISqlView instance.
aliasstringOptional 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
namestringWindow's name.
partitioningSqlExpressionNode[]Collection of expressions by which this window partitions the result set.
orderingSqlOrderByNode[]Collection of ordering expressions used by this window.
frameSqlWindowFrameNodeOptional 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
namestringWindow's name.
orderingSqlOrderByNode[]Collection of ordering expressions used by this window.
frameSqlWindowFrameNodeOptional 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
windowsSqlWindowDefinitionNode[]Collection of window definitions.
Returns
- SqlWindowDefinitionTraitNode
New SqlWindowDefinitionTraitNode instance.
WindowTrait(SqlWindowDefinitionNode)
Creates a new SqlWindowTraitNode instance.
[Pure]
public static SqlWindowTraitNode WindowTrait(SqlWindowDefinitionNode definition)
Parameters
definitionSqlWindowDefinitionNodeUnderlying window definition.
Returns
- SqlWindowTraitNode
New SqlWindowTraitNode instance.