Skip to content

docs: add minimal duckdb/motherduck documentation #775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions docs/databases/duckdb.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: DuckDB
sidebar_position: 1
---

# Sequelize for DuckDB

To use Sequelize with [DuckDB](https://duckdb.org/docs/), you need to install the `@sequelize/duckdb` dialect package:

```bash npm2yarn
npm i @sequelize/duckdb
```

Then use the `DuckDbDialect` class as the dialect option in the Sequelize constructor:

```ts
import { Sequelize } from '@sequelize/core';
import { DuckDbDialect } from '@sequelize/duckdb';

const sequelize = new Sequelize({
dialect: DuckDbDialect,
database: '/path/to/local/file',
});
```

To connect to [MotherDuck](https://motherduck.com/docs/getting-started/), provide your database path in the `database` field:

```ts
import { Sequelize } from '@sequelize/core';
import { DuckDbDialect } from '@sequelize/duckdb';

const sequelize = new Sequelize({
dialect: DuckDbDialect,
database: 'md:my_db',
});
```
1 change: 1 addition & 0 deletions src/utils/dialects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export const SUPPORTED_DIALECTS = new Set([
'Snowflake',
'db2',
'ibmi',
'duckdb',
]);
Loading