roles.js 615 B

1234567891011121314151617181920212223242526272829303132
  1. import { entityKind } from "../entity.js";
  2. class PgRole {
  3. constructor(name, config) {
  4. this.name = name;
  5. if (config) {
  6. this.createDb = config.createDb;
  7. this.createRole = config.createRole;
  8. this.inherit = config.inherit;
  9. }
  10. }
  11. static [entityKind] = "PgRole";
  12. /** @internal */
  13. _existing;
  14. /** @internal */
  15. createDb;
  16. /** @internal */
  17. createRole;
  18. /** @internal */
  19. inherit;
  20. existing() {
  21. this._existing = true;
  22. return this;
  23. }
  24. }
  25. function pgRole(name, config) {
  26. return new PgRole(name, config);
  27. }
  28. export {
  29. PgRole,
  30. pgRole
  31. };
  32. //# sourceMappingURL=roles.js.map