import { entityKind } from "../../entity.js";
import { MsSqlColumnBuilderWithIdentity, MsSqlColumnWithIdentity } from "./common.js";
class MsSqlTinyIntBuilder extends MsSqlColumnBuilderWithIdentity {
  static [entityKind] = "MsSqlTinyIntBuilder";
  constructor(name) {
    super(name, "number", "MsSqlTinyInt");
  }
  /** @internal */
  build(table) {
    return new MsSqlTinyInt(
      table,
      this.config
    );
  }
}
class MsSqlTinyInt extends MsSqlColumnWithIdentity {
  static [entityKind] = "MsSqlTinyInt";
  getSQLType() {
    return `tinyint`;
  }
  mapFromDriverValue(value) {
    if (typeof value === "string") {
      return Number(value);
    }
    return value;
  }
}
function tinyint(name) {
  return new MsSqlTinyIntBuilder(name ?? "");
}
export {
  MsSqlTinyInt,
  MsSqlTinyIntBuilder,
  tinyint
};
//# sourceMappingURL=tinyint.js.map