import mssql from "mssql";
import { entityKind } from "../entity.js";
class AutoPool {
  static [entityKind] = "AutoPool";
  pool;
  constructor(config) {
    this.pool = new mssql.ConnectionPool(config);
  }
  async $instance() {
    await this.pool.connect().catch((err) => {
      console.error("\u274C AutoPool failed to connect:", err);
      throw err;
    });
    return this.pool;
  }
}
export {
  AutoPool
};
//# sourceMappingURL=pool.js.map