UNPKG

axiodb

Version:

The Pure JavaScript Alternative to SQLite. Embedded NoSQL database for Node.js with MongoDB-style queries, zero native dependencies, built-in InMemoryCache, and web GUI. Perfect for desktop apps, CLI tools, and embedded systems. No compilation, no platfor

29 lines (28 loc) 1.01 kB
import { AxioDB } from '../../../Services/Indexation.operation'; import { TCPResponse } from '../../types/protocol.types'; /** * Collection Handler - Handles collection-related TCP commands * Uses AxioDB instance directly for idempotent operations */ export default class CollectionHandler { private controller; private axioDB; constructor(axioDB: AxioDB); /** * Handle CREATE_COLLECTION command * Note: This is idempotent - returns collection whether it exists or not */ handleCreateCollection(requestId: string, params: any): Promise<TCPResponse>; /** * Handle DELETE_COLLECTION command */ handleDeleteCollection(requestId: string, params: any): Promise<TCPResponse>; /** * Handle COLLECTION_EXISTS command */ handleCollectionExists(requestId: string, params: any): Promise<TCPResponse>; /** * Handle GET_COLLECTION_INFO command */ handleGetCollectionInfo(requestId: string, params: any): Promise<TCPResponse>; }