type DatabaseProvider = { /** * Creates a new database client for the actor. * The result is passed to the actor context as `c.db`. * @experimental */ createClient: (ctx: { getDatabase: () => Promise; }) => Promise; /** * Runs before the actor has started. * Use this to run migrations or other setup tasks. * @experimental */ onMigrate: (client: DB) => void | Promise; }; type ExecuteFunction = (query: string, ...args: unknown[]) => Promise; type RawAccess = { /** * Executes a raw SQL query. */ execute: ExecuteFunction; }; export type { DatabaseProvider as D, RawAccess as R };