File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export type {
2828 RegionId ,
2929 CreateDatabaseResult ,
3030 DatabaseResult ,
31+ DatabaseError ,
3132 ProgrammaticCreateOptions ,
3233} from "./types.js" ;
3334
@@ -595,6 +596,11 @@ const caller = createRouterClient(router, { context: {} });
595596/**
596597 * Create a new Prisma Postgres database programmatically.
597598 *
599+ * @param options - Options for creating the database
600+ * @param options.region - The AWS region for the database (optional)
601+ * @param options.userAgent - Custom user agent string (optional)
602+ * @returns A promise that resolves to either a {@link DatabaseResult} or {@link DatabaseError}
603+ *
598604 * @example
599605 * ```typescript
600606 * import { create } from "create-db";
@@ -604,6 +610,8 @@ const caller = createRouterClient(router, { context: {} });
604610 * if (result.success) {
605611 * console.log(`Connection string: ${result.connectionString}`);
606612 * console.log(`Claim URL: ${result.claimUrl}`);
613+ * } else {
614+ * console.error(`Error: ${result.message}`);
607615 * }
608616 * ```
609617 */
You can’t perform that action at this time.
0 commit comments