sequence.js 617 B

12345678910111213141516171819202122232425
  1. import { entityKind, is } from "../entity.js";
  2. class PgSequence {
  3. constructor(seqName, seqOptions, schema) {
  4. this.seqName = seqName;
  5. this.seqOptions = seqOptions;
  6. this.schema = schema;
  7. }
  8. static [entityKind] = "PgSequence";
  9. }
  10. function pgSequence(name, options) {
  11. return pgSequenceWithSchema(name, options, void 0);
  12. }
  13. function pgSequenceWithSchema(name, options, schema) {
  14. return new PgSequence(name, options, schema);
  15. }
  16. function isPgSequence(obj) {
  17. return is(obj, PgSequence);
  18. }
  19. export {
  20. PgSequence,
  21. isPgSequence,
  22. pgSequence,
  23. pgSequenceWithSchema
  24. };
  25. //# sourceMappingURL=sequence.js.map