@simonecoelhosfo/optimizely-mcp-server
Version:
Optimizely MCP Server for AI assistants with integrated CLI tools
42 lines • 1.28 kB
TypeScript
import Database from 'better-sqlite3';
/**
* ViewManager handles creation, validation, and maintenance of database views
* This ensures views are always created during database initialization
*/
export declare class ViewManager {
private db;
private viewsDir;
constructor(db: Database.Database);
/**
* Create all views from SQL files
* @param includeDiscovered - Whether to include views from discovered/ subdirectory
* @param progressCallback - Optional callback to report progress on each view created
* @returns Array of created view names
*/
createAllViews(includeDiscovered?: boolean, progressCallback?: (viewName: string) => void): Promise<string[]>;
/**
* Extract view name from CREATE VIEW statement
*/
private extractViewName;
/**
* Validate that all expected views exist
*/
validateViews(): {
valid: boolean;
missing: string[];
extra: string[];
};
/**
* Backup all existing views to SQL files
*/
backupViews(): void;
/**
* Get statistics about views
*/
getViewStats(): Record<string, any>;
/**
* Drop all views (useful for clean recreation)
*/
dropAllViews(): void;
}
//# sourceMappingURL=ViewManager.d.ts.map