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) 928 B
import { AxioDB } from '../../../Services/Indexation.operation'; import { TCPResponse } from '../../types/protocol.types'; /** * Database Handler - Handles database-related TCP commands * Uses AxioDB instance directly for idempotent operations */ export default class DBHandler { private controller; private axioDB; constructor(axioDB: AxioDB); /** * Handle CREATE_DB command * Note: This is idempotent - returns database whether it exists or not */ handleCreateDB(requestId: string, params: any): Promise<TCPResponse>; /** * Handle DELETE_DB command */ handleDeleteDB(requestId: string, params: any): Promise<TCPResponse>; /** * Handle DB_EXISTS command */ handleDBExists(requestId: string, params: any): Promise<TCPResponse>; /** * Handle GET_INSTANCE_INFO command */ handleGetInstanceInfo(requestId: string): Promise<TCPResponse>; }