/** * DuckLake Service - Lakehouse metadata layer for DuckDB * Provides ACID transactions, time travel, and versioning on top of Parquet files * Similar to Delta Lake but optimized for DuckDB */ import { DuckDBService } from '../duckdb/service.js'; import { z } from 'zod'; export declare const DuckLakeOptionsSchema: z.ZodObject<{ format: z.ZodDefault>; versioning: z.ZodDefault; multiTenant: z.ZodDefault; compressionType: z.ZodDefault>; enableTimeTravel: z.ZodDefault; retentionDays: z.ZodDefault; }, z.core.$strip>; export type DuckLakeOptions = z.infer; export declare const DeltaLogEntrySchema: z.ZodObject<{ version: z.ZodNumber; timestamp: z.ZodDate; operation: z.ZodEnum<{ CREATE: "CREATE"; UPDATE: "UPDATE"; DELETE: "DELETE"; APPEND: "APPEND"; MERGE: "MERGE"; OPTIMIZE: "OPTIMIZE"; }>; operationParameters: z.ZodOptional>; files: z.ZodArray>; maxValues: z.ZodOptional>; nullCounts: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>>; metadata: z.ZodOptional>; }, z.core.$strip>; export type DeltaLogEntry = z.infer; export interface ChangeSet { additions: string[]; deletions: string[]; metadata?: Record; } export declare class DuckLakeService { private duckdb; private catalogs; constructor(duckdb: DuckDBService); /** * Create a new DuckLake catalog * A catalog is a collection of tables managed by DuckLake */ createCatalog(name: string, location: string, options?: Partial): Promise; /** * Get an existing catalog */ getCatalog(name: string): Promise; /** * List all available catalogs */ listCatalogs(): Promise; } /** * DuckLake Catalog - Manages a collection of tables with ACID properties */ export declare class DuckLakeCatalog { readonly name: string; readonly location: string; readonly options: DuckLakeOptions; private duckdb; constructor(name: string, location: string, options: DuckLakeOptions, duckdb: DuckDBService); /** * Create a managed table in the catalog */ createTable(tableName: string, schema: string, partitionBy?: string[]): Promise; /** * Time travel query - query data at a specific point in time */ timeTravel(tableName: string, timestamp: Date | number): Promise; /** * Get the current version of a table */ getTableVersion(tableName: string): Promise; /** * Commit a transaction with ACID guarantees */ commitTransaction(tableName: string, changes: ChangeSet, operation?: DeltaLogEntry['operation']): Promise; /** * Get delta log entry for a specific version */ getDeltaLog(tableName: string, version?: number): Promise; /** * Optimize table by compacting small files */ optimizeTable(tableName: string): Promise; /** * Vacuum old versions based on retention policy */ vacuum(tableName: string): Promise; } //# sourceMappingURL=ducklake.d.ts.map