planetscale
Version:
A simple client for connecting to PlanetScale.
22 lines (21 loc) • 789 B
TypeScript
import { Connection, ConnectionOptions } from "mysql2";
export interface PlanetScaleConfig {
readonly branch: string;
readonly tokenName: string;
readonly token: string;
readonly org: string;
readonly db: string;
}
export declare class PlanetScale {
#private;
readonly branch?: string;
readonly tokenName: string;
readonly token: string;
readonly org: string;
readonly db: string;
readonly connectionOptions?: ConnectionOptions;
constructor({ branch, tokenName, token, org, db }: PlanetScaleConfig, connectionOptions?: {});
getConnection(): Promise<Connection>;
}
export default function connect(config: PlanetScaleConfig, connectionOptions?: ConnectionOptions): Promise<Connection>;
export type { ConnectionOptions } from "mysql2";