32 lines
764 B
Plaintext
32 lines
764 B
Plaintext
import { entityKind } from "../../entity.js";
|
|
import { PgColumn, PgColumnBuilder } from "./common.js";
|
|
class PgSmallSerialBuilder extends PgColumnBuilder {
|
|
static [entityKind] = "PgSmallSerialBuilder";
|
|
constructor(name) {
|
|
super(name, "number", "PgSmallSerial");
|
|
this.config.hasDefault = true;
|
|
this.config.notNull = true;
|
|
}
|
|
/** @internal */
|
|
build(table) {
|
|
return new PgSmallSerial(
|
|
table,
|
|
this.config
|
|
);
|
|
}
|
|
}
|
|
class PgSmallSerial extends PgColumn {
|
|
static [entityKind] = "PgSmallSerial";
|
|
getSQLType() {
|
|
return "smallserial";
|
|
}
|
|
}
|
|
function smallserial(name) {
|
|
return new PgSmallSerialBuilder(name ?? "");
|
|
}
|
|
export {
|
|
PgSmallSerial,
|
|
PgSmallSerialBuilder,
|
|
smallserial
|
|
};
|
|
//# sourceMappingURL=smallserial.js.map |