// src/executor-fuma-db.ts
import { fumadb } from "@executor-js/fumadb";
import { drizzleAdapter } from "@executor-js/fumadb/adapters/drizzle";
import { schema as fumaSchema } from "@executor-js/fumadb/schema";
var createExecutorFumaDb = (drizzleDb, options) => {
  const latestSchema = fumaSchema({
    version: options.version,
    tables: options.tables
  });
  const factory = fumadb({
    namespace: options.namespace,
    schemas: [latestSchema]
  });
  const fuma = factory.client(
    drizzleAdapter({
      db: drizzleDb,
      provider: options.provider,
      interactiveTransactions: options.interactiveTransactions,
      maxBoundParameters: options.maxBoundParameters
    })
  );
  return {
    db: fuma.orm(options.version),
    fuma
  };
};

export {
  createExecutorFumaDb
};
//# sourceMappingURL=chunk-I3X6242Q.js.map