Skip to main content
Glama

MCP SQL Server

by ryudg
SchemaChangedEvent.ts1.1 kB
/** * SchemaChangedEvent Domain Event * * Represents an event that occurs when database schema has been changed. * Contains information about the type of change and affected objects. */ export class SchemaChangedEvent { constructor( readonly databaseName: string, readonly changeType: 'CREATE' | 'ALTER' | 'DROP', readonly objectType: 'TABLE' | 'VIEW' | 'PROCEDURE' | 'FUNCTION' | 'INDEX' | 'CONSTRAINT', readonly objectName: string, readonly sql?: string, readonly timestamp: Date = new Date() ) {} /** * Checks if the change is a structural change (table/view creation or deletion) * @returns boolean indicating if it's a structural change */ isStructuralChange(): boolean { return ( (this.objectType === 'TABLE' || this.objectType === 'VIEW') && (this.changeType === 'CREATE' || this.changeType === 'DROP') ); } /** * Creates a summary of the schema change event. * @returns Summary string */ getSummary(): string { return `${this.changeType} ${this.objectType} ${this.objectName} in ${this.databaseName}`; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ryudg/mcp-sql'

If you have feedback or need assistance with the MCP directory API, please join our Discord server