14 lines
357 B
TypeScript
14 lines
357 B
TypeScript
import { drizzle } from "drizzle-orm/d1";
|
|
export { sql, eq, and, or } from "drizzle-orm";
|
|
|
|
import * as schema from "../database/schema";
|
|
|
|
export const tables = schema;
|
|
|
|
export function useDrizzle() {
|
|
return drizzle(hubDatabase(), { schema });
|
|
}
|
|
|
|
export type User = typeof schema.users.$inferSelect;
|
|
export type Tokens = typeof schema.tokens.$inferSelect;
|