Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

SQLite.ts

19 lines534 Bytes

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>;