import PostgresDB from '../postgres/postgres-db.js'; interface HypertableOptions { chunkInterval?: string; } interface TimeBucketOptions { aggregates?: string[]; where?: Record; orderBy?: string; limit?: number; } interface ContinuousAggregateOptions { withNoData?: boolean; } interface CompressionOptions { segmentBy?: string; orderBy?: string; } export default class TimescaleDB extends PostgresDB { static extensions: string[]; static configKey: string; constructor(deps?: Record); private get tsDeps(); /** * Convert a table to a TimescaleDB hypertable. * Should be called after the table is created (e.g. after initial migration). */ createHypertable(modelName: string, timeColumn: string, options?: HypertableOptions): Promise; /** * Query time-bucketed aggregations on a hypertable. */ timeBucket(modelName: string, timeColumn: string, bucketSize: string, options?: TimeBucketOptions): Promise[]>; /** * Create a continuous aggregate view on a hypertable. */ createContinuousAggregate(viewName: string, modelName: string, timeColumn: string, bucketSize: string, aggregates: string[], options?: ContinuousAggregateOptions): Promise; /** * Enable compression on a hypertable. */ enableCompression(modelName: string, options?: CompressionOptions): Promise; /** * Add a compression policy to a hypertable. */ addCompressionPolicy(modelName: string, compressAfter: string): Promise; } export {};