Partager via


PostgresDbClient.ReadAsync(String, String, Boolean, CancellationToken) Method

Definition

Read a entry by its key.

public System.Threading.Tasks.Task<Microsoft.SemanticKernel.Connectors.Postgres.PostgresMemoryEntry?> ReadAsync (string tableName, string key, bool withEmbeddings = false, System.Threading.CancellationToken cancellationToken = default);
abstract member ReadAsync : string * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Nullable<Microsoft.SemanticKernel.Connectors.Postgres.PostgresMemoryEntry>>
override this.ReadAsync : string * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Nullable<Microsoft.SemanticKernel.Connectors.Postgres.PostgresMemoryEntry>>
Public Function ReadAsync (tableName As String, key As String, Optional withEmbeddings As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Nullable(Of PostgresMemoryEntry))

Parameters

tableName
String

The name assigned to a table of entries.

key
String

The key of the entry to read.

withEmbeddings
Boolean

If true, the embeddings will be returned in the entry.

cancellationToken
CancellationToken

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

Returns

Implements

Applies to