import { entityKind } from "../../entity.js";
import { CockroachColumn, CockroachColumnWithArrayBuilder } from "./common.js";
class CockroachFloatBuilder extends CockroachColumnWithArrayBuilder {
  static [entityKind] = "CockroachFloatBuilder";
  constructor(name) {
    super(name, "number", "CockroachFloat");
  }
  /** @internal */
  build(table) {
    return new CockroachFloat(
      table,
      this.config
    );
  }
}
class CockroachFloat extends CockroachColumn {
  static [entityKind] = "CockroachFloat";
  getSQLType() {
    return "float";
  }
  mapFromDriverValue(value) {
    if (typeof value === "string") {
      return Number.parseFloat(value);
    }
    return value;
  }
}
function float(name) {
  return new CockroachFloatBuilder(name ?? "");
}
const doublePrecision = float;
export {
  CockroachFloat,
  CockroachFloatBuilder,
  doublePrecision,
  float
};
//# sourceMappingURL=float.js.map