import { entityKind } from "../../entity.js";
import { sql } from "../../sql/sql.js";
import { CockroachColumn, CockroachColumnWithArrayBuilder } from "./common.js";
class CockroachUUIDBuilder extends CockroachColumnWithArrayBuilder {
  static [entityKind] = "CockroachUUIDBuilder";
  constructor(name) {
    super(name, "string", "CockroachUUID");
  }
  /**
   * Adds `default gen_random_uuid()` to the column definition.
   */
  defaultRandom() {
    return this.default(sql`gen_random_uuid()`);
  }
  /** @internal */
  build(table) {
    return new CockroachUUID(
      table,
      this.config
    );
  }
}
class CockroachUUID extends CockroachColumn {
  static [entityKind] = "CockroachUUID";
  getSQLType() {
    return "uuid";
  }
}
function uuid(name) {
  return new CockroachUUIDBuilder(name ?? "");
}
export {
  CockroachUUID,
  CockroachUUIDBuilder,
  uuid
};
//# sourceMappingURL=uuid.js.map