virtuals/sdk/effect/db
此内容尚不支持你的语言。
Classes
Section titled “Classes”AstroDB
Section titled “AstroDB”Defined in: studiocms/packages/studiocms/src/virtuals/sdk/effect/db.ts:27^
Provides an Effect-based service wrapper for interacting with an AstroDB database client.
Remarks
Section titled “Remarks”This service exposes utility functions for executing queries, managing transactions, and composing database effects using the Effect system. It handles error mapping for LibSQL client errors and supports transactional execution with proper error propagation.
Example
Section titled “Example”const result = await AstroDB.execute((client) => client.query('SELECT * FROM users'));
Extends
Section titled “Extends”any
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AstroDB(): AstroDB;
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Effect.Service<AstroDB>()('studiocms/sdk/effect/db/AstroDB', { effect: Effect.gen(function () { const db = client;
const { execute, makeQuery } = yield drizzleDBClientLive({ drizzle: db });
return { db, execute, makeQuery, }; }),}).constructor
References
Section titled “References”LibSQLClientError
Section titled “LibSQLClientError”Re-exports LibSQLClientError