Blink DB Documentation v1.0.0
Blink DB Documentation
Loading...
Searching...
No Matches
CommandParser Class Reference

Parses and validates commands for a command-line interface. More...

#include <command_parser.hpp>

Public Member Functions

 CommandParser ()=default
 Default constructor for CommandParser.
std::string parser (const std::string &line)
 Parses and executes a command.

Public Attributes

LSMTree db
 Database engine instance.

Detailed Description

Parses and validates commands for a command-line interface.

The CommandParser class provides methods to parse user input, validate commands, and interact with the underlying database engine.

Constructor & Destructor Documentation

◆ CommandParser()

CommandParser::CommandParser ( )
default

Default constructor for CommandParser.

This constructor initializes the CommandParser instance.

Member Function Documentation

◆ parser()

std::string CommandParser::parser ( const std::string & line)
inline

Parses and executes a command.

This method takes a command string, splits it into tokens, validates the command, and executes it using the database engine.

Parameters
lineThe input command string.
Returns
A string representing the result of the command execution.

Member Data Documentation

◆ db

LSMTree CommandParser::db

Database engine instance.

This instance is used to interact with the underlying database engine for executing commands.


The documentation for this class was generated from the following file: