UNPKG

@gensx/storage

Version:

Cloud storage, blobs, sqlite, and vector database providers/hooks for GenSX.

23 lines (19 loc) 676 B
/** * Check out the docs at https://www.gensx.com/docs * Find us on Github https://github.com/gensx-inc/gensx * Find us on Discord https://discord.gg/F5BSU8Kc */ import { DatabaseClient } from './databaseClient.js'; /** * Hook to access a database * @param name The name of the database to access * @param options Optional configuration properties for the database * @returns A promise that resolves to a database object for the given name */ async function useDatabase(name, options = {}) { const client = new DatabaseClient(options); const db = await client.getDatabase(name); return db; } export { useDatabase }; //# sourceMappingURL=useDatabase.js.map