import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from "./common.js";
class MsSqlFloatBuilder extends MsSqlColumnBuilderWithIdentity {
  static [entityKind] = "MsSqlFloatBuilder";
  constructor(name, config) {
    super(name, "number", "MsSqlFloat");
    this.config.precision = config?.precision;
  }
  /** @internal */
  build(table) {
    return new MsSqlFloat(table, this.config);
  }
}
class MsSqlFloat extends MsSqlColumnWithIdentity {
  static [entityKind] = "MsSqlFloat";
  precision = this.config.precision;
  getSQLType() {
    const precision = this.precision === void 0 ? "" : `(${this.precision})`;
    return `float${precision}`;
  }
}
function float(a, b = {}) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new MsSqlFloatBuilder(name, config);
}
export {
  MsSqlFloat,
  MsSqlFloatBuilder,
  float
};
//# sourceMappingURL=float.js.map