Partager via


PostgresDbClient.UpsertAsync Method

Definition

Upsert entry into a table.

public System.Threading.Tasks.Task UpsertAsync (string tableName, string key, string? metadata, Pgvector.Vector? embedding, DateTime? timestamp, System.Threading.CancellationToken cancellationToken = default);
abstract member UpsertAsync : string * string * string * Pgvector.Vector * Nullable<DateTime> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.UpsertAsync : string * string * string * Pgvector.Vector * Nullable<DateTime> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function UpsertAsync (tableName As String, key As String, metadata As String, embedding As Vector, timestamp As Nullable(Of DateTime), Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

tableName
String

The name assigned to a table of entries.

key
String

The key of the entry to upsert.

metadata
String

The metadata of the entry.

embedding
Pgvector.Vector

The embedding of the entry.

timestamp
Nullable<DateTime>

The timestamp of the entry. Its 'DateTimeKind' must be Utc

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

Implements

Applies to