import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import type { AnyPgTable } from "drizzle-orm/pg-core"; export { booleanQueryParam } from "@voyantjs/schema-kit/query-params"; /** * A more readable alias for Drizzle's InferSelectModel. */ export type SelectModel = InferSelectModel; /** * A more readable alias for Drizzle's InferInsertModel. */ export type InsertModel = InferInsertModel; /** * A simple type guard to check if an error is an instance of Error. */ export declare function isDatabaseError(error: unknown): error is Error; /** * Wraps a Drizzle query promise to provide consistent error logging. * Use this for critical operations that should throw an error on failure. * * @example * const user = await executeQuery(db.query.users.findFirst()); */ export declare function executeQuery(query: Promise): Promise; /** * Wraps a database operation in a try/catch block. * Returns the result on success or a fallback value (defaulting to null) on error. * Use this for non-critical operations that should not crash the application. * * @example * await safeDbOperation(() => db.insert(logs).values({ message: 'User logged in' })); */ export declare function safeDbOperation(operation: () => Promise, fallback?: T): Promise; //# sourceMappingURL=helpers.d.ts.map