Skip to content

Instantly share code, notes, and snippets.

@mldisibio
mldisibio / asyncTvhDemo.cs
Last active November 17, 2024 03:04
Demo of legacy APM pattern for DuckDB.Net to invoke an async table-value-function
[Experimental("DuckDBNET001")]
async Task Main()
{
using var duckDb = new DuckDBConnection("Data Source=:memory:");
duckDb.Open();
// create and fill a table to demonstrate a TVF joined to a table
LoadPlayers(duckDb, "Player");
// register the function
RegisterTVH(duckDb);
// show just the TVH