IF Commons GitHub

physical/adapters/duckdb

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-sql-port FR-009

The port of a DuckDB connection of @duckdb/node-api, typed by the shape of run and runAndReadAll. DuckDB cannot type a binary parameter, so the store gives it bytes as hex (unhex(?) and hex(body)) and the port never sees a binary value. One connection runs one transaction at a time. DuckDB has no index of search that keeps itself current, so a DuckDB store has no search.

import { duckdbPort } from "@intellectual-frontiers/anyfs-sql/duckdb";
// const connection = await (await DuckDBInstance.create(":memory:")).connect();
// const port = duckdbPort(connection);

Source: commons/anyfs-sql/src/physical/adapters/duckdb.ts

1 of 3 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

DuckdbRowsinterfaceno test imports it
interface DuckdbRows

What runAndReadAll gives.

MemberTypeWhat it is
getRowObjects() => readonly unknown[]
DuckdbConnectioninterfaceno test imports it
interface DuckdbConnection

A DuckDB connection.

MemberTypeWhat it is
run(sql: string, values?: SqlValue[] | undefined) => Promise<unknown>
runAndReadAll(sql: string, values?: SqlValue[] | undefined) => Promise<DuckdbRows>
duckdbPortfunction
function duckdbPort(connection: DuckdbConnection, close?: () => Promise<void>): SqlPort

The port of a DuckDB connection; close is the caller's to give where the connection has one.

Imported by 10 tests of the run (10 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.