Connectors

PlanetScale

Connect DB0 to Planetscale

Read more in planetscale.com.

Usage

For this connector, you need to install @planetscale/database dependency:

npm i @planetscale/database

Use planetscale connector:

import { createDatabase } from "db0";
import planetscale from "db0/connectors/planetscale";

const db = createDatabase(
  planetscale({
    host: "aws.connect.psdb.cloud",
    username: "username",
    password: "password",
  }),
);

Options

host

Planetscale host.

username

Planetscale username.

password

Planetscale password.

'url'

Connection URL string. The host, username and password are extracted from the URL.

Read more in Create a database password.
Read more in @planetscale/database client options.