Method UpsertAsync
- Namespace
- IntentSharp.Data
- Assembly
- IntentSharp.dll
UpsertAsync(string, object, string?, CancellationToken)
Inserts or updates rows from a .NET object or collection into tableName, letting the model map
source fields to target columns. Requires AllowWrites. With DryRun, returns the plan only.
The statement must be one INSERT, UPDATE or MERGE that references no table but tableName, whatever
AllowedTables allows; a DELETE anywhere in it is refused.
public Task<QueryResult> UpsertAsync(string tableName, object sourceData, string? intent = null, CancellationToken cancellationToken = default)
Parameters
tableNamestringsourceDataobjectintentstringcancellationTokenCancellationToken
Returns
- Task<QueryResult>