Skip to main content

Built and signed on GitHub Actions

Helpers for working with DuckDB data in the Lume SSG

This package works with DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
JSR Score
94%
Published
2 weeks ago (0.2.1)
function duckDbLoader
duckDbLoader(options?: DuckDbLoaderOptions): Loader

Factory which generates a DuckDb loader.

The loader generated by this factory loads SQL files from disk into a Query object. This is exposed in Lume as a function.

Examples

Load SQL as DuckDB query

site.loadData(['.sql'], duckLoader())

An SQL called _data/simple.sql file with the following content

select 1 as number;

Can be used in Lume pages as follows (assuming a Vento template).

{{ simple() |> JSON.stringify }}

Parameters

optional
options: DuckDbLoaderOptions

Configuration for factory

Return Type

Loader

DuckDB Loader

Add Package

deno add @dringtech/lume-duck

Import symbol

import { duckDbLoader } from "@dringtech/lume-duck";

Add Package

npx jsr add @dringtech/lume-duck

Import symbol

import { duckDbLoader } from "@dringtech/lume-duck";

Add Package

yarn dlx jsr add @dringtech/lume-duck

Import symbol

import { duckDbLoader } from "@dringtech/lume-duck";

Add Package

pnpm dlx jsr add @dringtech/lume-duck

Import symbol

import { duckDbLoader } from "@dringtech/lume-duck";

Add Package

bunx jsr add @dringtech/lume-duck

Import symbol

import { duckDbLoader } from "@dringtech/lume-duck";