import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { MsSqlColumn, MsSqlColumnBuilder } from "./common.js";
class MsSqlTextBuilder extends MsSqlColumnBuilder {
  static [entityKind] = "MsSqlTextBuilder";
  constructor(name, config) {
    super(name, "string", "MsSqlText");
    this.config.enumValues = config.enum;
    this.config.nonUnicode = config.nonUnicode;
  }
  /** @internal */
  build(table) {
    return new MsSqlText(table, this.config);
  }
}
class MsSqlText extends MsSqlColumn {
  static [entityKind] = "MsSqlText";
  enumValues = this.config.enumValues;
  nonUnicode = this.config.nonUnicode;
  constructor(table, config) {
    super(table, config);
  }
  getSQLType() {
    return `${this.nonUnicode ? "n" : ""}text`;
  }
}
function text(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new MsSqlTextBuilder(name, { ...config, nonUnicode: false });
}
function ntext(a, b) {
  const { name, config } = getColumnNameAndConfig(a, b);
  return new MsSqlTextBuilder(name, { ...config, nonUnicode: true });
}
export {
  MsSqlText,
  MsSqlTextBuilder,
  ntext,
  text
};
//# sourceMappingURL=text.js.map