1import * as Context from "effect/Context";
2import type * as Effect from "effect/Effect";
3
4import type { SQLiteConnection } from "./SQLiteConnection.ts";
5import type { SQLiteErrorType } from "./SQLiteError.ts";
6
7export class SQLite extends Context.Service<SQLite, SQLiteService>()(
8 "SQLite",
9) {}
10
11/**
12 * SQLite service that provides database connection factory.
13 */
14export interface SQLiteService {
15 /**
16 * Open a SQLite database at the given path.
17 */
18 open(path: string): Effect.Effect<SQLiteConnection, SQLiteErrorType>;
19}