TenantAtlas/apps/platform/.pnpm-store/v10/files/a4/a122eb2ac4abb3d980fcb80a8c14bb75f03a3a01a35cbd403d31efe1aadad6131063797aca5849b07fc81fce252254a77bbaa10722671c3becf7e14fde8ab8
Ahmed Darrazi 9f74f7a658
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 51s
feat: compress governance operator outcomes
2026-04-19 14:15:11 +02:00

38 lines
1013 B
Plaintext

import { entityKind } from "../../entity.js";
import { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from "./common.js";
class SingleStoreSerialBuilder extends SingleStoreColumnBuilderWithAutoIncrement {
static [entityKind] = "SingleStoreSerialBuilder";
constructor(name) {
super(name, "number", "SingleStoreSerial");
this.config.hasDefault = true;
this.config.autoIncrement = true;
}
/** @internal */
build(table) {
return new SingleStoreSerial(
table,
this.config
);
}
}
class SingleStoreSerial extends SingleStoreColumnWithAutoIncrement {
static [entityKind] = "SingleStoreSerial";
getSQLType() {
return "serial";
}
mapFromDriverValue(value) {
if (typeof value === "string") {
return Number(value);
}
return value;
}
}
function serial(name) {
return new SingleStoreSerialBuilder(name ?? "");
}
export {
SingleStoreSerial,
SingleStoreSerialBuilder,
serial
};
//# sourceMappingURL=serial.js.map