UNPKG

@gensx/storage

Version:

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

25 lines (20 loc) 718 B
'use strict'; /** * 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 */ var databaseClient = require('./databaseClient.cjs'); /** * 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.DatabaseClient(options); const db = await client.getDatabase(name); return db; } exports.useDatabase = useDatabase; //# sourceMappingURL=useDatabase.cjs.map