drizzle-orm
Version:
Drizzle ORM package for SQL databases
26 lines (25 loc) • 971 B
TypeScript
import { type Client, type Config } from '@libsql/client';
import { type DrizzleConfig, type IfNotImported, type ImportTypeError } from "../utils.js";
import { type LibSQLDatabase } from "./driver-core.js";
export { LibSQLDatabase } from "./driver-core.js";
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>, TClient extends Client = Client>(...params: IfNotImported<Client, [
ImportTypeError<'@libsql/client'>
], [
TClient | string
] | [
TClient | string,
DrizzleConfig<TSchema>
] | [
(DrizzleConfig<TSchema> & ({
connection: string | Config;
} | {
client: TClient;
}))
]>): LibSQLDatabase<TSchema> & {
$client: TClient;
};
export declare namespace drizzle {
function mock<TSchema extends Record<string, unknown> = Record<string, never>>(config?: DrizzleConfig<TSchema>): LibSQLDatabase<TSchema> & {
$client: '$client is not available on drizzle.mock()';
};
}