Class SqlInsertOrUpdateStatement
public sealed class SqlInsertOrUpdateStatement : SqlStatementWithQueryBase, IQueryElement
- Inheritance
-
objectSqlInsertOrUpdateStatement
- Implements
- Inherited Members
- Extension Methods
Constructors
SqlInsertOrUpdateStatement(SelectQuery?)
public SqlInsertOrUpdateStatement(SelectQuery? selectQuery)
Parameters
selectQuerySelectQuery
Properties
ElementType
AST node type.
public override QueryElementType ElementType { get; }
Property Value
Insert
public SqlInsertClause Insert { get; set; }
Property Value
QueryType
public override QueryType QueryType { get; }
Property Value
Update
public SqlUpdateClause Update { get; set; }
Property Value
UpdateWhere
Optional predicate attached to the UPDATE branch of an upsert (e.g. the
WHERE on ON CONFLICT ... DO UPDATE SET ... WHERE <cond> in
PostgreSQL / SQLite, or the WHEN MATCHED AND <cond> in a
MERGE-based emitter). null when the upsert has no conditional
update gate. Populated by UpsertBuilder from
.Update(v => v.When(...)).
public SqlSearchCondition? UpdateWhere { get; set; }
Property Value
Methods
Accept(QueryElementVisitor)
Visitor support.
public override IQueryElement Accept(QueryElementVisitor visitor)
Parameters
visitorQueryElementVisitor
Returns
GetElementHashCode()
public override int GetElementHashCode()
Returns
GetTableSource(ISqlTableSource, out bool)
public override ISqlTableSource? GetTableSource(ISqlTableSource table, out bool noAlias)
Parameters
tableISqlTableSourcenoAliasbool
Returns
ToString(QueryElementTextWriter)
Generates debug text representation of AST node.
public override QueryElementTextWriter ToString(QueryElementTextWriter writer)
Parameters
writerQueryElementTextWriter