schema.d.cts 659 B

123456789101112131415
  1. import { entityKind } from "../entity.cjs";
  2. import { SQL, type SQLWrapper } from "../sql/sql.cjs";
  3. import type { gelSequence } from "./sequence.cjs";
  4. import { type GelTableFn } from "./table.cjs";
  5. export declare class GelSchema<TName extends string = string> implements SQLWrapper {
  6. readonly schemaName: TName;
  7. static readonly [entityKind]: string;
  8. constructor(schemaName: TName);
  9. table: GelTableFn<TName>;
  10. sequence: typeof gelSequence;
  11. getSQL(): SQL;
  12. shouldOmitSQLParens(): boolean;
  13. }
  14. export declare function isGelSchema(obj: unknown): obj is GelSchema;
  15. export declare function gelSchema<T extends string>(name: T): GelSchema<T>;